/ docsWebsite

Orders

Create, retrieve, and update the status of restaurant orders.

Server-to-server · Bearer API key · Restaurant scoped

List orders#

GET/api/v1/orders

Newest 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

ParameterTypeDescription
statusOptionalstringFilter by order status.
pending · accepted · preparing · ready · completed · cancelled
per_pageOptionalintegerPage size, 1–100. Default 25.
pageOptionalintegerPage number, starting at 1.
curl
curl --request GET \
  "https://api.rinili.com/api/v1/orders" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY"

Response · 200

Illustrative response. Empty summary objects stand for configuration-dependent fields.

JSON
{
  "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#

GET/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

ParameterTypeDescription
idRequiredintegerResource identifier in this API’s scope.
curl
curl --request GET \
  "https://api.rinili.com/api/v1/orders/42" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY"

Response · 200

Illustrative response. Empty summary objects stand for configuration-dependent fields.

JSON
{
  "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#

POST/api/v1/orders

Creates 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

ParameterTypeDescription
branch_idRequiredintegerAn active, non-deleted branch in your restaurant.
customer_nameRequiredstringMaximum 255 characters.
totalRequirednumberNon-negative total, subject to the configured platform limit.
referenceOptionalstringOptional unique reference. Maximum 100 characters.
customer_phoneOptionalstringOptional phone, maximum 40 characters.
currencyOptionalstringSupported ISO currency.
JOD · USD · EUR · SAR · AED
itemsOptionalarrayUp to 100 items. Each requires name (≤200), quantity (1–1000), unit_price (≥0).
notesOptionalstringOptional notes, maximum 10,000 characters.
curl
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}]}'

Response · 201

Illustrative response. Empty summary objects stand for configuration-dependent fields.

JSON
{
  "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#

PATCH/api/v1/orders/{id}/status

Read 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

ParameterTypeDescription
idRequiredintegerResource identifier in this API’s scope.

Request body

ParameterTypeDescription
statusRequiredstringNext allowed status.
accepted · preparing · ready · completed · cancelled
versionRequiredintegerCurrent record version from the latest GET. Minimum 1. A stale version returns 409.
curl
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}'

Response · 200

Illustrative response. Empty summary objects stand for configuration-dependent fields.

JSON
{
  "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"
  }
}

Search guides, endpoints, parameters and authentication.