iotoms Docs

Generate the route settlement PDF

POST
/api/v1/ops/day-cycles/{dayCycleId}/route-settlement

Renders the route settlement PDF for a day cycle using the tenant's active report template, or a specific templateId, stores it and returns a link to the file. The result is marked final only when the day cycle is closed.

How to use it

  1. Get the dayCycleId from List day cycles; optionally pick a ROUTE_SETTLEMENT template ID from List report templates.
  2. Send the request; without templateId the active ROUTE_SETTLEMENT template is used, and the call fails if none is active.
  3. Download the PDF from pdfUrl in the response; the link is temporary, so call Get the route settlement PDF later for a fresh one.
  4. The file counts toward the merchant's storage quota. It is stored as final only when the day cycle is closed.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

dayCycleId*string

ID of the day cycle, from List day cycles or Get the active day cycle.

Formatuuid

Query Parameters

templateId?integer

Optional ID of a report template to render with instead of the active one; see List report templates. Pick a ROUTE_SETTLEMENT template: the server does not check the template's document type.

Formatint64

Header Parameters

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?|

Key-value result. For PDF endpoints: pdfUrl (a temporary signed download link), templateId, templateVersion, generatedAt plus document keys such as dayCycleId.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/ops/day-cycles/497f6eca-6276-4993-bfeb-53cbbbba6f08/route-settlement'
Example Response
{  "status": "string",  "message": "string",  "data": {    "property1": {},    "property2": {}  }}