Create a report template
Creates a new, inactive template version for a document type, either from a supplied layout or by cloning sourceTemplateId. The version number is assigned automatically.
How to use it
- Send reportType, a name and either a layoutJson or a sourceTemplateId (from List report templates, same document type) to copy.
- The layout is checked: only theme, header, partyBlocks, lineItemColumns and footer are allowed, and columns must be valid for the type.
- A new inactive version is created with the next version number; use Activate a report template to put it into use.
BearerAuthAuthorizationBearer <JWT>application/json- body
reportType*stringDocument type: PURCHASE_ORDER, SALES_INVOICE, DAY_END_SUMMARY, ROUTE_SETTLEMENT, DELIVERY_NOTE, CREDIT_NOTE or SALES_QUOTATION. Required; ignored on update.
"PURCHASE_ORDER""SALES_INVOICE""DAY_END_SUMMARY""ROUTE_SETTLEMENT""DELIVERY_NOTE""CREDIT_NOTE""SALES_QUOTATION"name*stringName of the template version. Required, not blank.
layoutJson?Layout object. Allowed keys: theme, header, partyBlocks, lineItemColumns (array of column names valid for the type), footer.
sourceTemplateId?|On create, ID of an existing template of the same type to copy the layout from when layoutJson is omitted.
int64OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request worked, ERROR when it did not.
message*stringShort human-readable message describing the result, for logs or display; do not parse it.
data?The report template version as it now stands.
curl -X POST 'https://beta.iotoms.com/api/v1/reports/templates' \ -H 'Content-Type: application/json' \ -d '{ "reportType": "PURCHASE_ORDER", "name": "string"}'{ "status": "string", "message": "string", "data": { "id": 0, "reportType": "PURCHASE_ORDER", "name": "string", "layoutJson": "string", "version": 0, "isActive": true, "isSystem": true, "createdBy": "string", "createdTime": "2019-08-24T14:15:22Z", "modifiedTime": "2019-08-24T14:15:22Z", "system": true, "active": true }}