Conventions
Money
Every amount is an integer in the minor unit of the site's currency, so for a site trading in pounds 1250 means £12.50.
Prices and totals include tax. Where the tax is known it is given beside the amount, as tax, in the same unit.
The currency is on the site, as an ISO 4217 code:
{ site { currency } }
Dates and times
| Type | Format | Example |
|---|---|---|
DateTime | An exact moment, ISO 8601 | 2026-11-01T18:30:00.000Z |
Date | A calendar date | 2026-11-01 |
DateTime values are returned in UTC. When you send one, include a time zone: either Z or an offset such as +01:00. A date-time without one is rejected.
A range runs from from up to but not including to, so consecutive ranges neither overlap nor leave a gap:
orders(from: "2026-11-01T00:00:00Z", to: "2026-11-02T00:00:00Z")
orders(from: "2026-11-02T00:00:00Z", to: "2026-11-03T00:00:00Z")
Business dates
A night's trading often runs past midnight, so each site has a rollover hour: the local time at which a new trading day starts. A site with a rollover hour of 4 treats a sale at 01:30 on Sunday morning as part of Saturday.
Every order and refund has a businessDate as well as its exact time. It is worked out in the site's own time zone, which saves you doing the calculation:
{
"closedAt": "2026-11-01T01:30:00.000Z",
"businessDate": "2026-10-31"
}
The site tells you its time zone and rollover hour:
{ site { timezone rolloverHour } }
Group by businessDate if your figures should match a day's trading. The exact times are there for when you need the moment itself.
Missing values
A field without ! in the reference can be null, which means the value was not recorded. Lists are never null: an order with no payments has payments: [].
Identifiers
An id is an opaque string: store it as text and do not read meaning into it. Ids do not change, which lets you match records between requests, for example a refund's orderId to an order's id.