Units
Total units sold across transactions in the period.
Returns the total units sold per period — sum of line-item quantities across each transaction in the bucket. One of five metrics returned by the shared metric/transactions/data route — this page focuses on sales_units.
Demographic-free. Point-of-sale records don’t carry visitor demographics. Use
breakdownByDimensions: ["entity"].
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
start | string (ISO 8601) | yes | Inclusive start timestamp with timezone |
end | string (ISO 8601) | yes | Inclusive end timestamp with timezone |
entities | string[] | yes | Array of location, organisation, or recording IDs (matching entityType) |
entityType | "location" | "organisation" | yes | Aggregation level |
facets | string[] | yes | What to include: segments, summary, aggregates |
aggregationPeriod | string | yes | Time granularity — see aggregation period options |
breakdownByDimensions | string[] | yes | Must be ["entity"] |
insideRecordingTimes | boolean | no | true to restrict to opening hours only. Default false |
Example request
{
"action": "metric",
"data": {
"id": "req-units-001",
"route": "transactions/data",
"body": {
"start": "2024-04-01T00:00:00.000Z",
"end": "2024-04-07T23:59:59.000Z",
"entities": ["64a1b2c3d4e5f6a7b8c9d0e3"],
"entityType": "location",
"breakdownByDimensions": ["entity"],
"facets": ["segments", "summary"],
"aggregationPeriod": "day"
}
}
}
Example response
req-units-001|0|0|{
"segments": [
{ "index": "2024-04-01T00:00:00.000", "location": "64a1b2c3d4e5f6a7b8c9d0e3", "sales_units": 392 },
{ "index": "2024-04-02T00:00:00.000", "location": "64a1b2c3d4e5f6a7b8c9d0e3", "sales_units": 358 }
],
"summary": [
{ "location": "64a1b2c3d4e5f6a7b8c9d0e3", "sales_units": 2734 }
],
"meta": {
"units": {
"sales_units": "number"
}
}
}
Update frequency
Transactions update approximately every 30 minutes.