List Orders
GET /v1/nextrestaurant/orders
List orders, oldest change first
Needs orders:read and the Orders app. For syncing: pass updated_since
with the time of your last sync and follow next_cursor.
Request
GET https://your-site.example/api/index.php/v1/nextrestaurant/orders?location_id=<integer>&status=completed&channel=web&updated_since=2026-11-01T00:00:00Z&limit=<integer>&cursor=<string>
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
location_id |
integer |
query |
No | Only this location. Omit for all. (min 1) |
status |
string |
query |
No | |
channel |
string |
query |
No | |
updated_since |
string |
query |
No | Only records changed at or after this UTC date-time (ISO 8601 or Y-m-d H:i:s). |
limit |
integer |
query |
No | Page size. Above 100 is clamped to 100; meta.limit says what was used. (min 1, max 100) Defaults to 25. |
cursor |
string |
query |
No | The meta.next_cursor of the previous page. Opaque; do not build one. |
Responses
200 — One page.
{
"data": [
{
"id": 1,
"order_number": "ORD-000591",
"location_id": 1,
"customer_id": 1,
"table_id": 1,
"channel": "web",
"source": "string",
"status": "placed",
"fulfillment_status": "in_kitchen",
"guest_count": 1,
"subtotal": 1.5,
"discount_total": 1.5,
"tax_total": 1.5,
"service_charge": 1.5,
"tip_total": 1.5,
"delivery_fee": 1.5,
"grand_total": 1.5,
"currency": "string",
"notes": "string",
"scheduled_for": "string",
"placed_at": "string",
"completed_at": "string",
"cancelled_at": "string",
"cancel_reason": "string",
"created_at": "string",
"updated_at": "string",
"items": [
{
"id": 1,
"item_id": 1,
"variation_id": 1,
"name_snapshot": "Margherita Pizza (Large)",
"qty": 1.5,
"unit_price": 1.5,
"modifiers_total": 1.5,
"discount_amount": 1.5,
"line_total": 1.5,
"status": "pending",
"seat_number": 1,
"notes": "string"
}
],
"payments": [
{
"id": 1,
"order_id": 1,
"location_id": 1,
"method": "cash",
"amount": 1.5,
"tip_amount": 1.5,
"refunded_total": 1.5,
"currency": "string",
"status": "captured",
"reference": "string",
"paid_at": "string",
"created_at": "string",
"updated_at": "string"
}
]
}
],
"meta": {
"limit": 1,
"next_cursor": "string"
}
}
| Field | Type | Meaning |
|---|---|---|
data[].id |
integer |
(int64) |
data[].order_number |
string|null |
|
data[].location_id |
integer |
(int64) |
data[].customer_id |
integer|null |
|
data[].table_id |
integer|null |
|
data[].channel |
string|null |
|
data[].source |
string|null |
Where an online order came from (web, qr, api); null for staff-entered orders. |
data[].status |
string |
placed on creation; then confirmed, preparing, ready, served, completed, cancelled or refunded. |
data[].fulfillment_status |
string|null |
|
data[].guest_count |
integer|null |
|
data[].subtotal |
number |
|
data[].discount_total |
number |
|
data[].tax_total |
number |
|
data[].service_charge |
number |
|
data[].tip_total |
number |
|
data[].delivery_fee |
number |
|
data[].grand_total |
number |
|
data[].currency |
string|null |
Often null — take the currency from the location. |
data[].notes |
string|null |
|
data[].scheduled_for |
string|null |
|
data[].placed_at |
string|null |
|
data[].completed_at |
string|null |
|
data[].cancelled_at |
string|null |
|
data[].cancel_reason |
string|null |
|
data[].created_at |
string|null |
|
data[].updated_at |
string|null |
|
data[].items[].id |
integer |
(int64) |
data[].items[].item_id |
integer |
(int64) |
data[].items[].variation_id |
integer|null |
(int64) |
data[].items[].name_snapshot |
string |
The line as the kitchen and the receipt will show it, including the variation. |
data[].items[].qty |
number |
|
data[].items[].unit_price |
number |
Resolved from the catalogue. A submitted price is ignored. |
data[].items[].modifiers_total |
number |
|
data[].items[].discount_amount |
number |
|
data[].items[].line_total |
number |
|
data[].items[].status |
string|null |
|
data[].items[].seat_number |
integer|null |
|
data[].items[].notes |
string|null |
|
data[].payments[].id |
integer |
(int64) |
data[].payments[].order_id |
integer|null |
|
data[].payments[].location_id |
integer|null |
|
data[].payments[].method |
string|null |
|
data[].payments[].amount |
number |
|
data[].payments[].tip_amount |
number |
|
data[].payments[].refunded_total |
number |
Sum of the refunds against this payment. |
data[].payments[].currency |
string|null |
|
data[].payments[].status |
string |
|
data[].payments[].reference |
string|null |
The provider's or the till's transaction reference. |
data[].payments[].paid_at |
string|null |
|
data[].payments[].created_at |
string|null |
|
data[].payments[].updated_at |
string|null |
|
meta.limit |
integer |
The page size used. |
meta.next_cursor |
string|null |
Pass as cursor for the next page; null on the last page. |
Errors
| Status | Code | When |
|---|---|---|
400 |
INVALID_CURSOR: use meta.next_cursor exactly as given. |
|
401 |
INVALID_TOKEN |
The token is missing, wrong, or none has been generated. |
403 |
INSUFFICIENT_SCOPE |
This API key does not have the permission this request needs. |
403 |
MODULE_DISABLED |
This module is disabled. |
403 |
API_DISABLED |
API is disabled |
422 |
VALIDATION_FAILED |
One error per invalid field, each with source.pointer. |
429 |
RATE_LIMITED |
Too many requests. RATE_LIMITED with a Retry-After header: this key used its budget for the minute, or this address sent 20 bad tokens in 5 minutes. Nothing ran, so the request is safe to retry after the wait. |
Examples
curl
curl -s "https://your-site.example/api/index.php/v1/nextrestaurant/orders" \
-H "Authorization: Bearer $API_TOKEN"
PHP
<?php
$ch = curl_init('https://your-site.example/api/index.php/v1/nextrestaurant/orders?location_id=<integer>&status=completed&channel=web&updated_since=2026-11-01T00:00:00Z&limit=<integer>&cursor=<string>');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('API_TOKEN'),
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
JavaScript
const API_TOKEN = process.env.API_TOKEN;
const response = await fetch("https://your-site.example/api/index.php/v1/nextrestaurant/orders?location_id=<integer>&status=completed&channel=web&updated_since=2026-11-01T00:00:00Z&limit=<integer>&cursor=<string>", {
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
},
});
const data = await response.json();