Get sales grouped by one dimension
One endpoint for every dashboard chart and report table. groupBy picks the dimension. Rows are sorted by turnover, highest first. Time groupings (hour, weekday, day, month) are sorted by time instead. hour only returns the company's work hours, like the dashboard. The period can be at most 366 days. Requires scope sales: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.
groupBy*stringThe dimension to group by.
"productGroup""product""location""salesperson""hour""weekday""day""month"from*stringFirst day of the period, as a local date in Europe/Copenhagen.
dateto*stringLast day of the period, included. Local date in Europe/Copenhagen.
datelocationId?array<integer>Only these locations. Repeat the parameter for more than one. Must be locations the key can see. Leave out for all of them.
productGroupId?stringOnly this product group (POS number).
productId?array<string>Only these products (POS numbers). Repeat the parameter for more than one.
orderType?array<>Only these order types. Repeat the parameter for more than one.
salesperson?stringOnly this salesperson, by name as on the register.
vat?stringShow money amounts including or excluding VAT.
"include""include""exclude"limit?integerReturn only the top N rows, for example the 10 most popular products.
1 <= value <= 1000compare?"previousYear"Add last year's figures for the same weekdays.
"previousYear"OK
application/json- response
groupBy*GroupBy"productGroup""product""location""salesperson""hour""weekday""day""month"period*currency*stringvat*string"include""exclude"rows*array<>total*curl -X GET 'https://api.ajour.dk/v1/sales/breakdown?groupBy=productGroup&from=2026-11-01&to=2026-11-21&locationId=1031'{
"groupBy": "productGroup",
"period": {
"from": "2026-11-01",
"to": "2026-11-21"
},
"currency": "DKK",
"vat": "include",
"rows": [
{
"key": "10",
"label": "Kaffe",
"quantity": 7410,
"turnover": 288340,
"share": 59.3
},
{
"key": "20",
"label": "Kage",
"quantity": 3122,
"turnover": 121050,
"share": 24.9
}
],
"total": {
"quantity": 12880,
"turnover": 486210.5
}
}Get key figures for a period GET
The same key figures as the cards on the Ajour dashboard. Add `compare=previousYear` to also get last year's figures for the same weekdays, aligned the same way as the dashboard. The period can be at most 366 days. Requires scope `sales:read`.
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. 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`.