ReportingCloud

POST /v1/processing/review/removetrackedchange

Endpoint

POST https://api.reporting.cloud/v1/processing/review/removetrackedchange

Description

Accepts or rejects one tracked change of a document and returns the changed document. The request body is the document as a Base64 string; id names the change, as POST /v1/processing/review/trackedchanges numbers it, and accept accepts (true) or rejects (false) it. The response holds the document, always in the TX format, and whether the change was removed. Removing a change renumbers the ones after it, so read the ids again before you remove another one. See Tracked Changes.

Warning

Document Quota. Each successful request counts 1 against the document quota. It counts 1 also when nothing is removed, because the document has no change with that id. Plans and Licensing lists the quota of each plan.

Examples

Request:

curl -u username:password \
  -H "Content-Type: application/json" \
  --data "\"CAcBAA4AAAAAAAAAAAAAAAIAAABsAQAAAQ...==\"" \
  -X POST "https://api.reporting.cloud/v1/processing/review/removetrackedchange?id=1&accept=true"

Results:

{"document":"CAcBAA4AAAAAAAAAAAAAAAIAAABsAQAAAQ...==","removed":true}

Authorization

This endpoint requires a "ReportingCloud-APIKey" or a "Basic" user authorization to access the user account, data and templates. Only one of these two methods is required.

API Keys describes how to create an API key, and Authentication explains both header forms.

ReportingCloud-APIKey

Header fieldDescription
AuthorizationRequired. A valid ReportingCloud account is required. The Authorization field is constructed as follows: An API key needs to be generated in the portal or with PUT /v1/account/apikey. The authorization method and a space, "ReportingCloud-APIKey ", is then put before the actual API key string. For example: Authorization: ReportingCloud-APIKey oMDM4MrAqL9QEOpyzupnQW5NjvCNtvE5cVDaaLqxI

Basic

Header fieldDescription
AuthorizationRequired. A valid ReportingCloud account is required. The Authorization field is constructed as follows: The user name and password are combined into a string separated by a colon, for example username:password. The resulting string is encoded using the RFC2045-MIME variant of Base64, except not limited to 76 char/line. The authorization method and a space, "Basic ", is then put before the encoded string. For example: Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l

Request Parameters

NameTypeValueOptional
idIntegerThe id of the tracked change that needs to be removed. This id can be obtained using the /v1/processing/review/trackedchanges endpoint. After a removal, the ids of the changes that follow the removed one decrease by 1: list the changes of the returned document again before removing the next one.no
acceptBooleanSpecifies whether the tracked change should be accepted or not (reject): true or false.no

Request Payload

TypeValue
Base64 encoded stringThe source document encoded as a Base64 string. Possible document formats are .rtf, .doc, .docx and .tx. A document in another format isn't refused: the response says that no change was removed.

Success Response

StatusDescription
200On success, the HTTP status code in the response header is 200 (OK). The response body contains a ModifiedDocument object.

ModifiedDocument

NameTypeValueOptional
documentStringThe modified document encoded as a Base64 string in the internal TX Text Control format (TX), whatever the format of the source document. null, if no change was removed.no
removedBooleanSpecifies whether the specified tracked change has been removed or not. false, if the document has no change with the given id.no

Error Response

StatusDescription
400A 400 (Bad Request) with the JSON body {"Message":"The request is invalid."} is returned, if id is not an integer, accept is not true or false, or either is given without a value.
403A 403 (Forbidden) is returned, if the user is not authorized or the document quota is exceeded.
404A 404 (Not Found) is returned, if a required query parameter is missing.
405A 405 (Method Not Allowed) is returned, if the request uses another HTTP method than POST. The Allow header of the response names POST.
411A 411 (Length Required) is returned, if the request has neither a body nor a Content-Length header.
415A 415 (Unsupported Media Type) is returned, if the request has a body but no Content-Type header, or a Content-Type such as text/plain that the endpoint doesn't read. Send Content-Type: application/json.
500A 500 (Internal Server Error) is returned, if the request has no Authorization header, an empty one or one that is not the authorization method, a space and the credentials, or if the request body is empty or is not a JSON string of valid Base64 data.