List report types
Each report you can download, with its formats and the filters it accepts besides from and to. Reports with customer card data show only when the key has the customers:read scope. Reports that always cover all locations are left out for keys limited to some locations. Requires scope reports:read.
apiKeyAuthorizationBearer <ajr_live_<keyId>_<secret>>An Ajour API key, sent as Authorization: Bearer <key>. Create keys in the Ajour back office under Settings → API keys. Each key has scopes: catalog:read, sales:read, reports:read and customers:read.
OK
application/json- response
data*array<>The items on this page.
nextCursor?|Pass as cursor to get the next page. null on the last page.
curl -X GET 'https://api.ajour.dk/v1/reports'{
"data": [
{
"type": "total-sales",
"name": "Total sales",
"formats": [
"pdf",
"xlsx"
],
"filters": [
"locationId",
"productGroupId",
"productId",
"orderType",
"salesperson"
]
},
{
"type": "turnover-per-guest",
"name": "Turnover per guest",
"formats": [
"pdf",
"xlsx"
],
"filters": [
"locationId",
"salesperson"
]
}
],
"nextCursor": null
}List sales lines GET
Every receipt line, for when you build your own figures or copy data to a data warehouse. Lines with the same `receiptNumber` and `locationId` make one receipt. These are the lines the dashboard counts, so the sum of `amountInclVat` matches `totalTurnover` of the summary. `vat` has no effect here; each line has both amounts. Sorted by date, then id. For a nightly copy, store the newest `syncedAt` you have and pass it as `syncedSince` next time. The period can be at most 92 days. Requires scope `sales:read`.
Download a report as PDF or Excel GET
Builds the report and returns the file: the same PDF or Excel file as in the Ajour back office. Choose the format with `format` or the `Accept` header. A report covers one location or all the key's locations, so a key limited to several locations must pass one `locationId`. Large periods can take up to 90 seconds. Requires scope `reports:read`. `sales-per-client` and `client-card-balances` also need `customers:read`. At most 10 report files per minute per key.