Endpoints related to Reports.
Request a report run.
Create a report run. Report generation is performed asynchronously.
The request body is a report-run object with type and parameters. The returned object
may differ from the request: omitted pageSize gets the default; values above 100 are
capped at 100; other default parameters may be added; status is IN_PROCESS.
Use the returned id with Get Report Run to poll for
completion. After the initial POST, wait about 10 seconds before the first GET, then
use exponential back-off (20s, 40s, 80s). Most runs finish in several seconds; if still
IN_PROCESS after one minute, send the create request again.
On success status becomes SUCCESS. On failure it becomes FAILED.
parameters is either stock-on-hand or bulk-charges, matching type.
Stock on hand aggregateBy: inboundOrder, location (unlimited-customer clients
only), productGroup, productType. productStatus and unitOfMeasure are always
applied. Custom product or purchase-order product fields may also be used.
Bulk charges dateFilter: date_added (charge created), date_invoice (invoice
dates), date_activity (consignment delivered, manifest added, purchase order
allocated, run sheet delivery date, sale order packed, storage period start/end).
Required role depends on the report type:
STOCK_ON_HAND: “WMS Create Job”BULK_CHARGES: “Internal Field Access”
path Parameters
tenantIdTenant ID. Can be found in organisation settings
Headers
Accept-VersionAll API end points require Accept-Version in the request header.
Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.
Request a report run. › Request Body
typestatusreportTimeTime the report was generated.
idRequest a report run. › Responses
Created. Body is the report-run object (status is IN_PROCESS).
typestatusreportTimeTime the report was generated.
idGet Report Run
Retrieve the report run and, when complete, its result rows.
A successful HTTP status is 200 OK in all of these cases:
SUCCESS—itemsis the current page of rows (may be empty). Use pagination headers to iterate pages (see Pagination).FAILED—failureDetailsdescribes the error. HTTP status remains200 OK.IN_PROCESS— generation is still running; poll again.
Report data is retained for 7 days from processing. Older runs return 404 Not Found.
Required role depends on the report type:
STOCK_ON_HAND: “WMS Create Job”BULK_CHARGES: “Internal Field Access”
path Parameters
tenantIdTenant ID. Can be found in organisation settings
reportRunIdReport run ID
query Parameters
pageThe page number to return results for
Headers
Accept-VersionAll API end points require Accept-Version in the request header.
Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.
Get Report Run › Responses
Report run. Choose the schema variant that matches type and status.
SUCCESS includes items (the current page of rows; may be empty). FAILED includes
failureDetails and not items. IN_PROCESS includes neither.
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = object · requires: type, items | |
| type = object · requires: type, items | |
| type = object · requires: type, failureDetails |
typeStock rows. Present when status is SUCCESS.
statusreportTimeTime the report was generated.
id