}

/v1/document/append/

https://api.reporting.cloud/v1/document/append

Combines documents by appending them divided by a new section, paragraph or nothing.

Document Quota

This method counts against the document quota. For each successful request, the quota count is increased by 1.

Authorization

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

ReportingCloud-APIKey
Header field Description
Authorization

Required. A valid ReportingCloud account is required. The Authorization field is constructed as follows:

An API Key needs to be generated using the portal or /v1/account/apikey endpoint. The authorization method and a space i.e. "ReportingCloud-APIKey " is then put before the actual API Key string.

Sample:

Authorization: ReportingCloud-APIKey oMDM4MrAqL9QEOpyzupnQW5NjvCNtvE5cVDaaLqxI

Basic
Header field Description
Authorization

Required. A valid ReportingCloud account is required. The Authorization field is constructed as follows:

The username and password are combined into a string separated by a colon, e.g.: 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 i.e. "Basic " is then put before the encoded string.

Sample:

Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l


Request Parameters

Query Parameter Value Type Description
returnFormat String A string that specifies the format of the created document. Possible values are: PDF, PDFA, RTF, DOC, DOCX, HTML, TXT and TX.
test Boolean Optional. Specifies whether it is a test run or not. A test run is not counted against the quota and created documents contain a watermark. Not possible using the Free or Trial license.

Request Payload

Value Type Description
AppendBody The AppendBody object contains the templates encoded as a Base64 strings and a ReportingCloud DocumentSettings object.

AppendBody

Key Value Type Description
documents ReportingCloud AppendDocument object The documents that are appended including divider options.
documentSettings ReportingCloud DocumentSettings object Optional. Document settings to specify document properties such as title and author.

AppendDocument

Key Value Type Description
document String The document as a Base64 encoded string.
documentDivider Integer The document divider option. Possible values: 1 (None), 2 (NewParagraph), 3 (NewSection).

DocumentSettings

Key Value Type Description
author String Optional. Sets the document's author.
creationDate DateTime (String) Optional. Sets the document's creation date which will be saved in the document.
lastModificationDate DateTime (String) Optional. Sets the date the document is last modified.
creatorApplication String Optional. Optional. Sets the application, which has created the document.
documentSubject DateTime (String) Optional. Optional. Sets the document's subject string which will be saved in the document.
documentTitle DateTime (String) Optional. Optional. Sets the document's title that will be saved in the document.
userPassword DateTime (String) Optional. Optional. Specifies the password for the user to open the document.

Success Response

Return Value Description

200 (OK)

On success, the HTTP status code in the response header is 200 (OK). The response body contains the resulting document encoded as a Base64 encoded string.

Error Response

Return Value Description

403 (Forbidden)

A 403 (Forbidden) is returned, if the user is not authorized or the document quota is exceeded.

400 (Bad Request)

A 400 (Bad Request) is returned, if no data is found in the AppendBody object or no documents uploaded.
Timeout Limitation

The pure processing time is limited to a maximum of 60 seconds. After this period of time, the task is cancelled.

A typical document should not take more than 5 seconds. If your requests takes longer, please decrease the number of data rows and reduce the template size.


Sample Requests

Request:

Results:

Request:

Results: