Orders
Create, retrieve, and update the status of restaurant orders.
List orders#
/api/v1/ordersNewest first, scoped to the restaurant belonging to your key. Defaults to 25 orders per page. Follow links.next until null.
Authentication: IntegrationKey · Scope: orders.read
Query parameters
| Parameter | Type | Description |
|---|---|---|
statusOptional | string | Filter by order status.pending · accepted · preparing · ready · completed · cancelled |
per_pageOptional | integer | Page size, 1–100. Default 25. |
pageOptional | integer | Page number, starting at 1. |
curl --request GET \
"https://api.rinili.com/api/v1/orders" \
--header "Accept: application/json" \
--header "Authorization: Bearer YOUR_API_KEY"const response = await fetch("https://api.rinili.com/api/v1/orders", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = response.status === 204 ? null : await response.text();import requests
response = requests.request(
"GET",
"https://api.rinili.com/api/v1/orders",
headers={'Accept': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY'},
timeout=15,
)
response.raise_for_status()
print(response.json())Response · 200
Illustrative response. Empty summary objects stand for configuration-dependent fields.
{
"data": [
{
"id": 42,
"restaurant_id": 7,
"branch_id": 12,
"reference": "POS-1042",
"customer_name": "Sample customer",
"customer_phone": null,
"total": "12.50",
"currency": "JOD",
"status": "pending",
"items": [
{
"name": "Lunch bowl",
"quantity": 1,
"unit_price": 12.5
}
],
"notes": null,
"version": 1,
"created_at": "2026-11-02T09:00:00.000000Z",
"updated_at": "2026-11-02T09:00:00.000000Z"
}
],
"links": {
"first": "https://api.rinili.com/api/v1/orders?page=1",
"last": "https://api.rinili.com/api/v1/orders?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://api.rinili.com/api/v1/orders",
"per_page": 25,
"to": 1,
"total": 1
}
}Retrieve an order#
/api/v1/orders/{id}Returns a single restaurant-owned order. Missing orders and orders outside your restaurant return 404.
Authentication: IntegrationKey · Scope: orders.read
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | integer | Resource identifier in this API’s scope. |
curl --request GET \
"https://api.rinili.com/api/v1/orders/42" \
--header "Accept: application/json" \
--header "Authorization: Bearer YOUR_API_KEY"const response = await fetch("https://api.rinili.com/api/v1/orders/42", {
method: "GET",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = response.status === 204 ? null : await response.text();import requests
response = requests.request(
"GET",
"https://api.rinili.com/api/v1/orders/42",
headers={'Accept': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY'},
timeout=15,
)
response.raise_for_status()
print(response.json())Response · 200
Illustrative response. Empty summary objects stand for configuration-dependent fields.
{
"data": {
"id": 42,
"restaurant_id": 7,
"branch_id": 12,
"reference": "POS-1042",
"customer_name": "Sample customer",
"customer_phone": null,
"total": "12.50",
"currency": "JOD",
"status": "pending",
"items": [
{
"name": "Lunch bowl",
"quantity": 1,
"unit_price": 12.5
}
],
"notes": null,
"version": 1,
"created_at": "2026-11-02T09:00:00.000000Z",
"updated_at": "2026-11-02T09:00:00.000000Z"
}
}Create an order#
/api/v1/ordersCreates a pending order. Do not send restaurant_id: the key determines ownership. Reference must be globally unique; when omitted the server generates RN- followed by a random suffix. Currency defaults to the platform setting or JOD. Platform order-total limits also apply. No general Idempotency-Key support is implemented.
Authentication: IntegrationKey · Scope: orders.write
Request body
| Parameter | Type | Description |
|---|---|---|
branch_idRequired | integer | An active, non-deleted branch in your restaurant. |
customer_nameRequired | string | Maximum 255 characters. |
totalRequired | number | Non-negative total, subject to the configured platform limit. |
referenceOptional | string | Optional unique reference. Maximum 100 characters. |
customer_phoneOptional | string | Optional phone, maximum 40 characters. |
currencyOptional | string | Supported ISO currency.JOD · USD · EUR · SAR · AED |
itemsOptional | array | Up to 100 items. Each requires name (≤200), quantity (1–1000), unit_price (≥0). |
notesOptional | string | Optional notes, maximum 10,000 characters. |
curl --request POST \
"https://api.rinili.com/api/v1/orders" \
--header "Accept: application/json" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"branch_id": 12, "customer_name": "Sample customer", "total": 12.5, "reference": "POS-1042", "currency": "JOD", "items": [{"name": "Lunch bowl", "quantity": 1, "unit_price": 12.5}]}'const response = await fetch("https://api.rinili.com/api/v1/orders", {
method: "POST",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"branch_id": 12,
"customer_name": "Sample customer",
"total": 12.5,
"reference": "POS-1042",
"currency": "JOD",
"items": [
{
"name": "Lunch bowl",
"quantity": 1,
"unit_price": 12.5
}
]
})
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = response.status === 204 ? null : await response.text();import requests
response = requests.request(
"POST",
"https://api.rinili.com/api/v1/orders",
headers={'Accept': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'},
json={'branch_id': 12, 'customer_name': 'Sample customer', 'total': 12.5, 'reference': 'POS-1042', 'currency': 'JOD', 'items': [{'name': 'Lunch bowl', 'quantity': 1, 'unit_price': 12.5}]},
timeout=15,
)
response.raise_for_status()
print(response.json())Response · 201
Illustrative response. Empty summary objects stand for configuration-dependent fields.
{
"data": {
"id": 42,
"restaurant_id": 7,
"branch_id": 12,
"reference": "POS-1042",
"customer_name": "Sample customer",
"customer_phone": null,
"total": "12.50",
"currency": "JOD",
"status": "pending",
"items": [
{
"name": "Lunch bowl",
"quantity": 1,
"unit_price": 12.5
}
],
"notes": null,
"version": 1,
"created_at": "2026-11-02T09:00:00.000000Z",
"updated_at": "2026-11-02T09:00:00.000000Z"
}
}Update order status#
/api/v1/orders/{id}/statusRead the current order first. Transitions: pending → accepted → preparing → ready → completed. Cancellation is allowed from non-terminal states only when platform settings permit. Completed and cancelled orders cannot reopen. Invalid transitions return 422; stale versions return 409.
Authentication: IntegrationKey · Scope: orders.write
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | integer | Resource identifier in this API’s scope. |
Request body
| Parameter | Type | Description |
|---|---|---|
statusRequired | string | Next allowed status.accepted · preparing · ready · completed · cancelled |
versionRequired | integer | Current record version from the latest GET. Minimum 1. A stale version returns 409. |
curl --request PATCH \
"https://api.rinili.com/api/v1/orders/42/status" \
--header "Accept: application/json" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{"status": "accepted", "version": 1}'const response = await fetch("https://api.rinili.com/api/v1/orders/42/status", {
method: "PATCH",
headers: {
"Accept": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"status": "accepted",
"version": 1
})
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = response.status === 204 ? null : await response.text();import requests
response = requests.request(
"PATCH",
"https://api.rinili.com/api/v1/orders/42/status",
headers={'Accept': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'},
json={'status': 'accepted', 'version': 1},
timeout=15,
)
response.raise_for_status()
print(response.json())Response · 200
Illustrative response. Empty summary objects stand for configuration-dependent fields.
{
"data": {
"id": 42,
"restaurant_id": 7,
"branch_id": 12,
"reference": "POS-1042",
"customer_name": "Sample customer",
"customer_phone": null,
"total": "12.50",
"currency": "JOD",
"status": "accepted",
"items": [
{
"name": "Lunch bowl",
"quantity": 1,
"unit_price": 12.5
}
],
"notes": null,
"version": 2,
"created_at": "2026-11-02T09:00:00.000000Z",
"updated_at": "2026-11-02T09:00:00.000000Z"
}
}