iotoms Docs

Activate a report template

POST
/api/v1/reports/templates/{templateId}/activate

Makes this template the one used for its document type and deactivates whichever version was active before.

How to use it

  1. Get the template ID from List report templates.
  2. Send the request; this version becomes active and the previously active version of the same document type is deactivated.
  3. New PDFs of that type use it from now on; an active version can no longer be edited.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

templateId*integer

ID of the template version to activate, from List report templates.

Formatint64

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short human-readable message describing the result, for logs or display; do not parse it.

data?

The report template version as it now stands.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/reports/templates/0/activate'
Example Response
{  "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  }}