Skip to main content

Orders and refunds

Needs the read:reports permission.

Sales come as two lists, orders and refunds, holding the raw records exactly as the tills recorded them. No totals are worked out here. For those, see the daily summary.

Orders​

orders goes by the time an order was closed: it returns those closed from from up to but not including to, oldest first. It is paginated, and a single request can cover at most 92 days.

Request

{
site {
orders(from: "2026-11-01T00:00:00Z", to: "2026-11-02T00:00:00Z", first: 200) {
nodes {
id
number
reference
businessDate
openedAt
closedAt
orderMode
covers
total
tax
voided
voidedAt
items {
id
type
name
productId
categoryId
category
price
tax
modifiers { name price tax }
discounts
notes
voided
refunded
}
payments { id type scheme amount changeDue paidAt }
refundIds
}
nextCursor
}
}
}

Try it in the explorer

Response

{
"data": {
"site": {
"orders": {
"nodes": [
{
"id": "6724c1f0a3b1c2d4e5f60718",
"number": 1042,
"reference": "ORD-1793536867000",
"businessDate": "2026-11-01",
"openedAt": "2026-11-01T12:21:07.000Z",
"closedAt": "2026-11-01T12:41:07.512Z",
"orderMode": "Sit In",
"covers": 2,
"total": 4114,
"tax": 686,
"voided": false,
"voidedAt": null,
"items": [
{
"id": "6724c1f4a3b1c2d4e5f60719",
"type": "product",
"name": "Steak",
"productId": "66336eae98f4389e8af4dcc2",
"categoryId": "6622784e10530e5203265c55",
"category": "Hot Food",
"price": 2500,
"tax": 417,
"modifiers": [
{ "name": "Rare", "price": 0, "tax": 0 },
{ "name": "Bearnaise Sauce", "price": 250, "tax": 42 }
],
"discounts": [],
"notes": [],
"voided": false,
"refunded": false
},
{
"id": "6724c1f9a3b1c2d4e5f6071a",
"type": "product",
"name": "Fishcakes",
"productId": "66336f226c8580a9aeae02d9",
"categoryId": "6622784e10530e5203265c55",
"category": "Hot Food",
"price": 990,
"tax": 165,
"modifiers": [],
"discounts": ["10%"],
"notes": [],
"voided": false,
"refunded": false
},
{
"id": "6724c1fda3b1c2d4e5f6071b",
"type": "serviceCharge",
"name": "Service Charge",
"productId": null,
"categoryId": null,
"category": null,
"price": 374,
"tax": 62,
"modifiers": [],
"discounts": [],
"notes": [],
"voided": false,
"refunded": false
}
],
"payments": [
{
"id": "6724c213a3b1c2d4e5f6071c",
"type": "CASH",
"scheme": null,
"amount": 5000,
"changeDue": 886,
"paidAt": "2026-11-01T12:41:07.334Z"
}
],
"refundIds": []
}
],
"nextCursor": null
}
}
}
}

Order lines​

Each entry in items is one line on the order. type says what kind:

typeMeaning
productSomething sold from the product library
serviceChargeA service charge added to the order
gratuityA tip
paidOutCash paid out of the till
noSaleThe till drawer opened without a sale

Treat a type you do not recognise as a line that is not a product. More may be added.

A line's price is what was charged for it, including tax and after any discount. The discount amount is not recorded separately, so discounts gives the names of the discounts applied. In the example above the Fishcakes sell for £11.00 and were charged at £9.90 with the 10% discount.

modifiers are the choices made on the line. A modifier's price is the extra charged for it, and is zero when the choice was free. It is charged on top of the line's price: the Steak above is £25.00 plus £2.50 for the sauce.

Totals​

An order's total is the sum of its lines' prices and their modifiers' prices, leaving out voided lines. It includes tax and any service charge. In the example: 2500 + 250 + 990 + 374 = 4114.

A gratuity is not part of total. It appears as its own line and in the payment.

tax adds up the same way, from the lines' and modifiers' tax.

Payments​

FieldMeaning
typeHow it was paid, as named on the till: CASH, CARD, or the name of the card provider
schemeThe card scheme, such as VISA, where the till recorded one
amountWhat was handed over or charged
changeDueChange given back out of amount

For cash, amount is what the customer handed over, which can be more than was owed. What the till kept is amount minus changeDue: in the example, £50.00 was handed over, £8.86 change was given, and the order came to £41.14.

When a card payment is refunded, the money going back is also recorded on the order as a payment with a negative amount. The refund itself is in refunds, described below.

Voids​

Voided orders and voided lines stay in the results with a flag on them, so you can see what was rung in and then removed.

An order with voided: true was cancelled as a whole, and voidedAt says when. A line with voided: true was removed from an order that otherwise stands. Leave both out when you add up sales.

Refunds​

A refund is a record of its own, dated when it happened. A sale on Monday that is refunded on Wednesday appears as an order on Monday and a refund on Wednesday, which is how it affects each day's takings.

refunds is paginated and limited to 92 days per request, like orders.

Request

{
site {
refunds(from: "2026-11-01T00:00:00Z", to: "2026-11-02T00:00:00Z") {
nodes {
id
orderId
businessDate
refundedAt
amount
tax
paymentId
itemIds
}
nextCursor
}
}
}

Try it in the explorer

Response

{
"data": {
"site": {
"refunds": {
"nodes": [
{
"id": "6724d8faa3b1c2d4e5f6437d",
"orderId": "6724c1f0a3b1c2d4e5f60718",
"businessDate": "2026-11-01",
"refundedAt": "2026-11-01T13:58:16.074Z",
"amount": 990,
"tax": 165,
"paymentId": "6724d8faa3b1c2d4e5f6437c",
"itemIds": ["6724c1f9a3b1c2d4e5f6071a"]
}
],
"nextCursor": null
}
}
}
}
FieldMeaning
orderIdThe order that was refunded. Matches an order's id
itemIdsThe order lines the refund covers. Each matches a line's id
paymentIdThe payment that returned the money
amountThe amount refunded, in pence, as a positive number

The link works both ways: an order's refundIds lists the refunds made against it, and a refunded line has refunded: true.

Staff​

With the read:staff permission you can also ask who handled a sale.

Request

{
site {
orders(from: "2026-11-01T00:00:00Z", to: "2026-11-02T00:00:00Z") {
nodes {
number
openedBy { id name }
closedBy { id name }
}
}
}
}

Try it in the explorer

Response

{
"data": {
"site": {
"orders": {
"nodes": [
{
"number": 1042,
"openedBy": { "id": "66159dbc4cd289f22a12a7cf", "name": "Sam" },
"closedBy": { "id": "66159dbc4cd289f22a12a7cf", "name": "Sam" }
}
]
}
}
}
}

Order lines have addedBy and refunds have refundedBy in the same way. Any of these can be null where the till did not record who it was. Leave these fields out if your key does not have the permission.

Working out a day's sales​

To total a business date from the raw records:

  1. Add up total for the orders with that businessDate, leaving out voided orders.
  2. Take off amount for the refunds with that businessDate.

The result matches gross in the daily summary for that date.