}

/v1/templates/info

https://api.reporting.cloud/v1/templates/info

Returns information about the template including hierarchical structure of merge fields and merge blocks.

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


Success Response

Return Value Description

200 (OK)

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

TemplateInfo

Key Value Type Description
templateName String The filename of the template in the template storage.
userDocumentProperties Dictionary (key, value) of user defined document properties Contains all user defined document properties.
mergeBlocks List of ReportingCloud MergeBlock objects Contains all merge blocks in the template.
mergeFields List of ReportingCloud MergeField objects Contains all merge fields in the template.

MergeBlock

Key Value Type Description
name String The name of the MergeBlock.
mergeBlocks List of ReportingCloud MergeBlock objects Contains all user defined document properties.
mergeFields List of ReportingCloud MergeField objects Contains all merge fields in the template.

MergeField

Key Value Type Description
dateTimeFormat String Specifies a string format which is applied to date / time values.
name String Gets and sets the name of the field.
numericFormat String Specifies a string format which is applied to numeric values.
preserveFormatting Boolean Specifies whether the formatting is preserved.
text String Gets and sets the text of the field.
textAfter String Gets and sets the text after the field.
textBefore String Gets and sets the text before the field.

Error Response

Return Value Description

403 (Forbidden)

A 403 (Forbidden) is returned, if the user is not authorized.

400 (Bad Request)

A 400 (Bad Request) is returned, if the template doesn't exist in the template storage.

Sample Requests

Request:

Results:

Request:

Results:

Get