{
    "specVersion": "3.1.0",
    "specFormat": "openapi",
    "specFile": "openapi.yaml",
    "installSpecPath": "/media/com_nextrestaurant/openapi.yaml",
    "title": "Next Restaurant REST API",
    "summary": "Read a restaurant's locations and live menu, and place orders.",
    "description": "The public integration surface for Next Restaurant: run a kiosk, a booking\nwidget, a delivery or accounting integration, or sync orders, reservations,\nstock and customers into another system.\n\n**It is off by default.** Two switches must both be on: the **API** app under\n*Apps*, and **Enable public API** under *Configuration → REST API*. Then create\nan **API key** there with only the permissions the integration needs. A key is\nshown once and stored only as a hash.\n\n**Permissions (scopes).** `menu:read`, `menu:write`, `inventory:read`,\n`inventory:write`, `orders:read`, `orders:write`, `reservations:read`,\n`reservations:write`, `customers:read`, `payments:read`, `reports:read`,\n`staff:read`. A request without the scope it needs is `403 INSUFFICIENT_SCOPE`.\nA key belongs to the user who created it and never does more than that user's\nrole allows (`403 INSUFFICIENT_PERMISSION`); a key whose owner's account is blocked,\nnot activated or deleted is `403 ACCOUNT_UNUSABLE`. A revoked, switched-off or\nexpired key is `401 INVALID_TOKEN`.\nEach endpoint also needs its app switched on (`403 MODULE_DISABLED`, with\n`meta.module`).\n\n**Rate limits.** Per key, per minute: 300 reads and 60 changes by default\n(adjustable). Every response carries `RateLimit-Limit`, `RateLimit-Remaining`\nand `RateLimit-Reset`; over the limit is `429` with `Retry-After`. An address\nthat sends 20 bad keys in 5 minutes is refused for 5 minutes.\n\n**Safe retries.** Send an `Idempotency-Key` header on POST and PATCH; a retry\nwith the same key replays the first response instead of acting twice.\nPATCH honours `If-Match` with the `ETag` from your last read.\n\n**Lists** return `{data, meta: {limit, next_cursor}}`, ordered by last change.\nFollow `next_cursor` until it is null; pass `updated_since` to fetch only what\nchanged since your last sync.\n\n**Times** are `Y-m-d H:i:s` in UTC with no zone suffix, except where a field\nsays it is the venue's local time. Money is a number in the location's currency.\n\n**Errors** are `{\"errors\":[{title, code, meta?, source?}], \"meta\":{\"request_id\"}}`.\nEvery response carries `X-Request-Id`; quote it when asking for support.\n\nTotals are always recomputed on the server from the menu records, so a submitted\nprice is ignored. An integration never has to replicate your tax or pricing rules,\nand a tampered request buys nothing at the wrong price.\n",
    "apiVersion": "1.1.0",
    "license": {
        "name": "GNU General Public License v2.0 or later",
        "url": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
    },
    "contact": {
        "name": "NextSoftware",
        "url": "https://nextsoftware.dev/",
        "email": "support@nextsoftware.dev"
    },
    "style": "rest-path",
    "guide": "rest-api/getting-started",
    "navSection": "api",
    "navEventsSection": "webhooks",
    "baseUrl": {
        "template": "{protocol}://{host}{basePath}/api/index.php",
        "variables": {
            "protocol": {
                "description": "Use http only for local development.",
                "example": "https",
                "enum": [
                    "https",
                    "http"
                ]
            },
            "host": {
                "description": "The host your Joomla site runs on.",
                "example": "your-site.example",
                "enum": null
            },
            "basePath": {
                "description": "Empty when Joomla is installed at the domain root. Otherwise the subfolder it is installed in, with a leading slash and no trailing slash — for example /restaurant.",
                "example": "",
                "enum": null
            }
        },
        "example": "https://your-site.example/api/index.php"
    },
    "auth": {
        "type": "bearer",
        "header": "Authorization",
        "scheme": "Bearer",
        "queryParam": null,
        "example": "Authorization: Bearer <your-api-token>",
        "alternatives": [
            {
                "type": "header",
                "name": "X-Api-Token",
                "note": "Alternative to the bearer scheme, for clients that cannot set `Authorization`."
            }
        ],
        "enablement": [],
        "notes": [
            "An API key created under *Configuration → REST API*, holding the scopes the\nintegration needs. Shown once and stored only as a SHA-256 hash; revoke it\nthere and its next request is refused. The single token from before 6.1\nstill works for what it could do then (`menu:read`, `orders:write`) until it\nis revoked.\n\nKeep it server-side. Calling this API from browser JavaScript puts the key\nin the page where any visitor can read it, and restricting origins does not\nhelp: CORS is enforced by browsers, not by the server.\n"
        ]
    },
    "conventions": [],
    "groups": [
        {
            "id": "Locations",
            "title": "Locations",
            "description": "The branches an integration may order from."
        },
        {
            "id": "Menu",
            "title": "Menu",
            "description": "What a branch can sell right now."
        },
        {
            "id": "Orders",
            "title": "Orders",
            "description": "Placing and reading orders."
        },
        {
            "id": "Reservations",
            "title": "Reservations",
            "description": "Availability, booking and changing reservations."
        },
        {
            "id": "Stock",
            "title": "Stock",
            "description": "Stock on hand, counts and 86."
        },
        {
            "id": "Customers",
            "title": "Customers",
            "description": "The customer list, for CRM and mailing tools."
        },
        {
            "id": "Payments",
            "title": "Payments",
            "description": "Payments and refunds, for accounting."
        },
        {
            "id": "Reports",
            "title": "Reports",
            "description": "Sales summary and timesheets."
        }
    ],
    "endpoints": [
        {
            "id": "listLocations",
            "slug": "locations",
            "pagePath": "api/locations",
            "group": "Locations",
            "method": "GET",
            "operation": "/v1/nextrestaurant/locations",
            "summary": "List published locations",
            "title": "List Locations",
            "description": "Every published location with its public details. Unpublished locations are\nnever returned. The `id` here is what the menu and order endpoints need.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "The published locations.",
                    "example": {
                        "data": [
                            {
                                "id": 1,
                                "code": "MAIN",
                                "title": "Downtown Bistro",
                                "currency": "USD",
                                "timezone": "America/Chicago",
                                "service_modes": [
                                    "dine_in",
                                    "takeaway",
                                    "delivery",
                                    "qr"
                                ],
                                "opening_hours": {
                                    "mon": {
                                        "open": "11:00",
                                        "close": "22:00"
                                    },
                                    "sat": {
                                        "open": "10:00",
                                        "close": "23:30"
                                    }
                                },
                                "tax_rate": 8.25
                            },
                            {
                                "id": 2,
                                "code": "RIVER",
                                "title": "Riverside Grill",
                                "currency": "USD",
                                "timezone": "America/Chicago",
                                "service_modes": [
                                    "dine_in",
                                    "takeaway",
                                    "delivery",
                                    "qr"
                                ],
                                "opening_hours": {
                                    "mon": {
                                        "open": "11:00",
                                        "close": "22:00"
                                    }
                                },
                                "tax_rate": 8.25
                            }
                        ]
                    },
                    "fields": [
                        {
                            "path": "data[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].code",
                            "type": "string",
                            "description": "Your short branch code."
                        },
                        {
                            "path": "data[].title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data[].currency",
                            "type": "string",
                            "description": "ISO 4217 currency code."
                        },
                        {
                            "path": "data[].timezone",
                            "type": "string",
                            "description": "The venue's IANA timezone, resolved (location setting, else the restaurant default, else the site's). Never blank."
                        },
                        {
                            "path": "data[].service_modes[]",
                            "type": "string[]",
                            "description": "Which ways this branch serves guests. One of `dine_in`, `takeaway`, `delivery`, `qr`."
                        },
                        {
                            "path": "data[].opening_hours",
                            "type": "object",
                            "description": "Keyed `mon`–`sun`. A day that is absent, null or empty means closed."
                        },
                        {
                            "path": "data[].tax_rate",
                            "type": "number|null",
                            "description": "Percentage, e.g. 8.25 for 8.25%."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/locations\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Locations endpoint",
            "seoDescription": "GET /locations returns every published Next Restaurant branch with its currency, timezone, service modes, opening hours and tax rate.",
            "seoKeywords": "list locations, branches, opening hours, service modes, tax rate, restaurant api"
        },
        {
            "id": "getMenu",
            "slug": "locations-menu",
            "pagePath": "api/locations-menu",
            "group": "Menu",
            "method": "GET",
            "operation": "/v1/nextrestaurant/locations/{locationId}/menu",
            "summary": "The live, orderable menu for a location",
            "title": "Get Menu",
            "description": "Categories of items, in the order arranged in the admin, reflecting live\navailability **for this branch**: unpublished items, items switched off for\nthe location and 86'd items are absent, and `price` is the branch's price\nwhere one overrides the base.\n\nEach item carries everything needed to order it — its `variations`, its\n`modifier_groups` with the per-item min/max overrides already applied, and\nits declared `allergens`.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "locationId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": 2,
                    "description": "A published location's id. (min 1, int64)"
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "The menu.",
                    "example": {
                        "data": {
                            "location_id": 2,
                            "categories": [
                                {
                                    "id": 5,
                                    "title": "Pizza",
                                    "items": [
                                        {
                                            "id": 16,
                                            "title": "Margherita Pizza",
                                            "description": "San Marzano tomato, fior di latte and fresh basil.",
                                            "price": 13,
                                            "has_variations": 1,
                                            "image": "images/nextrestaurant/items/16/gallery/ca98f3a212f1aac0.jpg",
                                            "prep_time_minutes": 23,
                                            "calories": null,
                                            "spice_level": 0,
                                            "is_alcohol": 0,
                                            "variations": [
                                                {
                                                    "id": 1,
                                                    "title": "Regular",
                                                    "price": 13,
                                                    "is_default": 1
                                                },
                                                {
                                                    "id": 2,
                                                    "title": "Large",
                                                    "price": 17,
                                                    "is_default": 0
                                                }
                                            ],
                                            "modifier_groups": [
                                                {
                                                    "id": 2,
                                                    "title": "Extra Toppings",
                                                    "selection_type": "multiple",
                                                    "is_required": 0,
                                                    "min_select": 0,
                                                    "max_select": 4,
                                                    "free_quantity": 0,
                                                    "modifiers": [
                                                        {
                                                            "id": 5,
                                                            "title": "Extra Cheese",
                                                            "price": 1.5,
                                                            "is_default": 0,
                                                            "max_quantity": 1
                                                        },
                                                        {
                                                            "id": 6,
                                                            "title": "Mushrooms",
                                                            "price": 1,
                                                            "is_default": 0,
                                                            "max_quantity": 1
                                                        }
                                                    ]
                                                }
                                            ],
                                            "allergens": [
                                                {
                                                    "id": 5,
                                                    "title": "Fish",
                                                    "presence": "contains"
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ]
                        }
                    },
                    "fields": [
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.categories[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.categories[].title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.categories[].items[].title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].description",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].price",
                            "type": "number",
                            "description": "The branch price for the item ordered with no variation. When\n`variations` is non-empty the chosen variation's price replaces this —\nit is not added to it."
                        },
                        {
                            "path": "data.categories[].items[].has_variations",
                            "type": "integer",
                            "description": "1 when the item is sold in sizes or versions. One of `0`, `1`."
                        },
                        {
                            "path": "data.categories[].items[].image",
                            "type": "string|null",
                            "description": "Path relative to the site root. Prefix with your site URL to display it."
                        },
                        {
                            "path": "data.categories[].items[].prep_time_minutes",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].calories",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].spice_level",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].is_alcohol",
                            "type": "integer",
                            "description": "One of `0`, `1`."
                        },
                        {
                            "path": "data.categories[].items[].variations[]",
                            "type": "object[]",
                            "description": "Sizes or versions. Empty when the item has none. When it is non-empty,\npick one and send its `id` — submitting the item without a\n`variation_id` is accepted and charged at the base `price` with no size\nrecorded, which is almost never what a customer meant."
                        },
                        {
                            "path": "data.categories[].items[].variations[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.categories[].items[].variations[].title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].variations[].price",
                            "type": "number",
                            "description": "Replaces the item's price; not added to it."
                        },
                        {
                            "path": "data.categories[].items[].variations[].is_default",
                            "type": "integer",
                            "description": "One of `0`, `1`."
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].selection_type",
                            "type": "string",
                            "description": "One of `single`, `multiple`."
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].is_required",
                            "type": "integer",
                            "description": "One of `0`, `1`."
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].min_select",
                            "type": "integer",
                            "description": "Per-item overrides are already applied — use as given."
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].max_select",
                            "type": "integer",
                            "description": "Per-item overrides are already applied — use as given."
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].free_quantity",
                            "type": "integer",
                            "description": "How many are included before the per-modifier price applies."
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].modifiers[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].modifiers[].title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].modifiers[].price",
                            "type": "number",
                            "description": "Added to the line."
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].modifiers[].is_default",
                            "type": "integer",
                            "description": "One of `0`, `1`."
                        },
                        {
                            "path": "data.categories[].items[].modifier_groups[].modifiers[].max_quantity",
                            "type": "integer|null",
                            "description": "How many times this modifier may be repeated on one line."
                        },
                        {
                            "path": "data.categories[].items[].allergens[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.categories[].items[].allergens[].title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.categories[].items[].allergens[].presence",
                            "type": "string",
                            "description": "One of `contains`, `may_contain`."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "unknown_location"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/locations/2/menu\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Menu endpoint",
            "seoDescription": "GET /locations/{id}/menu returns the live orderable menu for one branch: categories, items, variations, modifier groups and declared allergens.",
            "seoKeywords": "menu api, live menu, variations, modifier groups, allergens, 86'd items, branch price"
        },
        {
            "id": "listOrders",
            "slug": "orders",
            "pagePath": "api/orders",
            "group": "Orders",
            "method": "GET",
            "operation": "/v1/nextrestaurant/orders",
            "summary": "List orders, oldest change first",
            "title": "List Orders",
            "description": "Needs `orders:read` and the Orders app. For syncing: pass `updated_since`\nwith the time of your last sync and follow `next_cursor`.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "location_id",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Only this location. Omit for all. (min 1)"
                },
                {
                    "name": "status",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": "completed",
                    "description": ""
                },
                {
                    "name": "channel",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": "web",
                    "description": ""
                },
                {
                    "name": "updated_since",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": "2026-11-01T00:00:00Z",
                    "description": "Only records changed at or after this UTC date-time (ISO 8601 or `Y-m-d H:i:s`)."
                },
                {
                    "name": "limit",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": 25,
                    "enum": null,
                    "example": null,
                    "description": "Page size. Above 100 is clamped to 100; `meta.limit` says what was used. (min 1, max 100)"
                },
                {
                    "name": "cursor",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `meta.next_cursor` of the previous page. Opaque; do not build one."
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "One page.",
                    "example": {
                        "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"
                        }
                    },
                    "fields": [
                        {
                            "path": "data[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].order_number",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].location_id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].customer_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].table_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].channel",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].source",
                            "type": "string|null",
                            "description": "Where an online order came from (web, qr, api); null for staff-entered orders."
                        },
                        {
                            "path": "data[].status",
                            "type": "string",
                            "description": "`placed` on creation; then confirmed, preparing, ready, served, completed, cancelled or refunded."
                        },
                        {
                            "path": "data[].fulfillment_status",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].guest_count",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].subtotal",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].discount_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].tax_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].service_charge",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].tip_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].delivery_fee",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].grand_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].currency",
                            "type": "string|null",
                            "description": "Often null — take the currency from the location."
                        },
                        {
                            "path": "data[].notes",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].scheduled_for",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].placed_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].completed_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].cancelled_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].cancel_reason",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].updated_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].items[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].items[].item_id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].items[].variation_id",
                            "type": "integer|null",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].items[].name_snapshot",
                            "type": "string",
                            "description": "The line as the kitchen and the receipt will show it, including the\nvariation."
                        },
                        {
                            "path": "data[].items[].qty",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].items[].unit_price",
                            "type": "number",
                            "description": "Resolved from the catalogue. A submitted price is ignored."
                        },
                        {
                            "path": "data[].items[].modifiers_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].items[].discount_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].items[].line_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].items[].status",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].items[].seat_number",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].items[].notes",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].payments[].order_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].location_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].method",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].tip_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].refunded_total",
                            "type": "number",
                            "description": "Sum of the refunds against this payment."
                        },
                        {
                            "path": "data[].payments[].currency",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].status",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].reference",
                            "type": "string|null",
                            "description": "The provider's or the till's transaction reference."
                        },
                        {
                            "path": "data[].payments[].paid_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].payments[].updated_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "meta.limit",
                            "type": "integer",
                            "description": "The page size used."
                        },
                        {
                            "path": "meta.next_cursor",
                            "type": "string|null",
                            "description": "Pass as `cursor` for the next page; null on the last page."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "http_400",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/orders\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "List orders endpoint",
            "seoDescription": "GET /orders lists Next Restaurant orders oldest change first, with location, status, channel and updated_since filters and cursor paging for syncing.",
            "seoKeywords": "list orders, order sync, updated_since, cursor paging, orders api"
        },
        {
            "id": "createOrder",
            "slug": "post-orders",
            "pagePath": "api/post-orders",
            "group": "Orders",
            "method": "POST",
            "operation": "/v1/nextrestaurant/orders",
            "summary": "Place an order",
            "title": "Create Order",
            "description": "Creates an ordinary order: it routes to kitchen stations by your routing\nrules, depletes stock at the status you configured, settles into the payments\nledger, and appears in reports with its channel recorded.\n\nOrders arrive **unpaid** — this endpoint records an order, it does not take\npayment.\n\nNeeds `orders:write` and the Orders app. Open in demo mode, like the\nstorefront. Send an `Idempotency-Key` so a retry after a timeout cannot\ncreate a second order. Also limited to 60 orders per 5 minutes per address.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "Idempotency-Key",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Any unique string up to 255 characters, e.g. a UUID. Send the same key when\nretrying after a timeout: the first response is replayed (with\n`Idempotent-Replayed: true`) and nothing happens twice. Reusing a key for a\ndifferent request is `422 IDEMPOTENCY_MISMATCH`; while the first request is\nstill running it is `409 IDEMPOTENCY_IN_PROGRESS`. Keys are kept 24 hours,\nper API key. (max length 255)"
                }
            ],
            "requestBody": {
                "contentType": "application/json",
                "required": true,
                "description": "",
                "fields": [
                    {
                        "name": "location_id",
                        "type": "integer",
                        "required": true,
                        "description": "Where the order is placed. (int64)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "items",
                        "type": "object[]",
                        "required": true,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": [
                            {
                                "name": "item_id",
                                "type": "integer",
                                "required": true,
                                "description": "(int64)",
                                "enum": null,
                                "default": null,
                                "children": []
                            },
                            {
                                "name": "qty",
                                "type": "number",
                                "required": true,
                                "description": "",
                                "enum": null,
                                "default": null,
                                "children": []
                            },
                            {
                                "name": "variation_id",
                                "type": "integer|null",
                                "required": false,
                                "description": "Required in practice whenever the item has variations. (int64)",
                                "enum": null,
                                "default": null,
                                "children": []
                            },
                            {
                                "name": "notes",
                                "type": "string",
                                "required": false,
                                "description": "",
                                "enum": null,
                                "default": null,
                                "children": []
                            },
                            {
                                "name": "modifiers",
                                "type": "object[]",
                                "required": false,
                                "description": "",
                                "enum": null,
                                "default": null,
                                "children": [
                                    {
                                        "name": "modifier_id",
                                        "type": "integer",
                                        "required": true,
                                        "description": "(int64)",
                                        "enum": null,
                                        "default": null,
                                        "children": []
                                    },
                                    {
                                        "name": "qty",
                                        "type": "integer",
                                        "required": false,
                                        "description": "",
                                        "enum": null,
                                        "default": 1,
                                        "children": []
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "name": "channel",
                        "type": "string",
                        "required": false,
                        "description": "Recorded on the order and visible in reports. Any other value falls back\nto `web` rather than being refused.\n",
                        "enum": [
                            "web",
                            "phone",
                            "takeaway",
                            "delivery"
                        ],
                        "default": "web",
                        "children": []
                    },
                    {
                        "name": "service_mode",
                        "type": "string",
                        "required": false,
                        "description": "Free text stored with the order.",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "notes",
                        "type": "string",
                        "required": false,
                        "description": "Order-level note, shown to the kitchen.",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "customer",
                        "type": "object",
                        "required": false,
                        "description": "Guest details stored with the order. Every field optional.",
                        "enum": null,
                        "default": null,
                        "children": [
                            {
                                "name": "name",
                                "type": "string",
                                "required": false,
                                "description": "",
                                "enum": null,
                                "default": null,
                                "children": []
                            },
                            {
                                "name": "phone",
                                "type": "string",
                                "required": false,
                                "description": "",
                                "enum": null,
                                "default": null,
                                "children": []
                            },
                            {
                                "name": "email",
                                "type": "string",
                                "required": false,
                                "description": "(email)",
                                "enum": null,
                                "default": null,
                                "children": []
                            }
                        ]
                    }
                ],
                "example": {
                    "location_id": 2,
                    "channel": "web",
                    "service_mode": "takeaway",
                    "notes": "Ring the bell at the side door",
                    "customer": {
                        "name": "Dana Whitfield",
                        "phone": "+1 555 0142",
                        "email": "dana@example.com"
                    },
                    "items": [
                        {
                            "item_id": 16,
                            "variation_id": 2,
                            "qty": 1,
                            "notes": "Well done",
                            "modifiers": [
                                {
                                    "modifier_id": 5,
                                    "qty": 1
                                }
                            ]
                        },
                        {
                            "item_id": 1,
                            "qty": 2
                        }
                    ]
                }
            },
            "responses": [
                {
                    "status": 201,
                    "description": "The order was created.",
                    "example": {
                        "data": {
                            "id": 591,
                            "order_number": "ORD-000591",
                            "location_id": 2,
                            "channel": "web",
                            "status": "placed",
                            "fulfillment_status": "in_kitchen",
                            "subtotal": 18.5,
                            "discount_total": 0,
                            "tax_total": 1.53,
                            "service_charge": 0,
                            "delivery_fee": 0,
                            "grand_total": 20.03,
                            "currency": null,
                            "notes": null,
                            "placed_at": "2026-09-07 21:20:26",
                            "updated_at": "2026-09-07 21:20:26",
                            "payments": [],
                            "items": [
                                {
                                    "id": 1300,
                                    "item_id": 16,
                                    "variation_id": 2,
                                    "name_snapshot": "Margherita Pizza (Large)",
                                    "qty": 1,
                                    "unit_price": 17,
                                    "modifiers_total": 1.5,
                                    "line_total": 18.5,
                                    "notes": null
                                }
                            ]
                        }
                    },
                    "fields": [
                        {
                            "path": "data",
                            "type": "object",
                            "description": "An order with its lines and payments — the same object `GET /orders/{id}`\nreturns and every `order.*` webhook carries as `data`. Datetimes are\n`Y-m-d H:i:s` in **UTC** with no zone suffix."
                        },
                        {
                            "path": "data.id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.order_number",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.customer_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.table_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.channel",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.source",
                            "type": "string|null",
                            "description": "Where an online order came from (web, qr, api); null for staff-entered orders."
                        },
                        {
                            "path": "data.status",
                            "type": "string",
                            "description": "`placed` on creation; then confirmed, preparing, ready, served, completed, cancelled or refunded."
                        },
                        {
                            "path": "data.fulfillment_status",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.guest_count",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.subtotal",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.discount_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.tax_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.service_charge",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.tip_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.delivery_fee",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.grand_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.currency",
                            "type": "string|null",
                            "description": "Often null — take the currency from the location."
                        },
                        {
                            "path": "data.notes",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.scheduled_for",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.placed_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.completed_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.cancelled_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.cancel_reason",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.items[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.items[].item_id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.items[].variation_id",
                            "type": "integer|null",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.items[].name_snapshot",
                            "type": "string",
                            "description": "The line as the kitchen and the receipt will show it, including the\nvariation."
                        },
                        {
                            "path": "data.items[].qty",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.items[].unit_price",
                            "type": "number",
                            "description": "Resolved from the catalogue. A submitted price is ignored."
                        },
                        {
                            "path": "data.items[].modifiers_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.items[].discount_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.items[].line_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.items[].status",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.items[].seat_number",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.items[].notes",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.payments[].order_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].location_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].method",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].tip_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].refunded_total",
                            "type": "number",
                            "description": "Sum of the refunds against this payment."
                        },
                        {
                            "path": "data.payments[].currency",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].status",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].reference",
                            "type": "string|null",
                            "description": "The provider's or the till's transaction reference."
                        },
                        {
                            "path": "data.payments[].paid_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_order",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "unknown_location",
                "rate_limited",
                "order_failed"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s -X POST \"https://your-site.example/api/index.php/v1/nextrestaurant/orders\" \\\n  -H \"Authorization: Bearer $API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"location_id\":2,\"channel\":\"web\",\"service_mode\":\"takeaway\",\"notes\":\"Ring the bell at the side door\",\"customer\":{\"name\":\"Dana Whitfield\",\"phone\":\"+1 555 0142\",\"email\":\"dana@example.com\"},\"items\":[{\"item_id\":16,\"variation_id\":2,\"qty\":1,\"notes\":\"Well done\",\"modifiers\":[{\"modifier_id\":5,\"qty\":1}]},{\"item_id\":1,\"qty\":2}]}'"
                }
            ],
            "sections": [],
            "seoTitle": "Create order endpoint",
            "seoDescription": "POST /orders places an order in Next Restaurant. Totals are recomputed server-side; covers variations, modifiers, Idempotency-Key, the 201 response and errors.",
            "seoKeywords": "create order, place order api, kiosk ordering, order totals, rate limit, idempotency"
        },
        {
            "id": "getOrder",
            "slug": "get-orders",
            "pagePath": "api/get-orders",
            "group": "Orders",
            "method": "GET",
            "operation": "/v1/nextrestaurant/orders/{orderId}",
            "summary": "One order, with its lines and payments",
            "title": "Get Order",
            "description": "Needs `orders:read`. The response carries an `ETag`.",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "orderId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "The order.",
                    "example": {
                        "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"
                                }
                            ]
                        }
                    },
                    "fields": [
                        {
                            "path": "data",
                            "type": "object",
                            "description": "An order with its lines and payments — the same object `GET /orders/{id}`\nreturns and every `order.*` webhook carries as `data`. Datetimes are\n`Y-m-d H:i:s` in **UTC** with no zone suffix."
                        },
                        {
                            "path": "data.id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.order_number",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.customer_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.table_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.channel",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.source",
                            "type": "string|null",
                            "description": "Where an online order came from (web, qr, api); null for staff-entered orders."
                        },
                        {
                            "path": "data.status",
                            "type": "string",
                            "description": "`placed` on creation; then confirmed, preparing, ready, served, completed, cancelled or refunded."
                        },
                        {
                            "path": "data.fulfillment_status",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.guest_count",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.subtotal",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.discount_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.tax_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.service_charge",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.tip_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.delivery_fee",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.grand_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.currency",
                            "type": "string|null",
                            "description": "Often null — take the currency from the location."
                        },
                        {
                            "path": "data.notes",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.scheduled_for",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.placed_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.completed_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.cancelled_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.cancel_reason",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.items[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.items[].item_id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.items[].variation_id",
                            "type": "integer|null",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.items[].name_snapshot",
                            "type": "string",
                            "description": "The line as the kitchen and the receipt will show it, including the\nvariation."
                        },
                        {
                            "path": "data.items[].qty",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.items[].unit_price",
                            "type": "number",
                            "description": "Resolved from the catalogue. A submitted price is ignored."
                        },
                        {
                            "path": "data.items[].modifiers_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.items[].discount_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.items[].line_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.items[].status",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.items[].seat_number",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.items[].notes",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.payments[].order_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].location_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].method",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].tip_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].refunded_total",
                            "type": "number",
                            "description": "Sum of the refunds against this payment."
                        },
                        {
                            "path": "data.payments[].currency",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].status",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].reference",
                            "type": "string|null",
                            "description": "The provider's or the till's transaction reference."
                        },
                        {
                            "path": "data.payments[].paid_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.payments[].updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "not_found",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/orders/1\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Get order endpoint",
            "seoDescription": "GET /orders/{id} returns one Next Restaurant order with its lines, payments and totals, and an ETag.",
            "seoKeywords": "get order, order status, order lines, payments, orders api"
        },
        {
            "id": "getAvailability",
            "slug": "locations-availability",
            "pagePath": "api/locations-availability",
            "group": "Reservations",
            "method": "GET",
            "operation": "/v1/nextrestaurant/locations/{locationId}/availability",
            "summary": "Bookable reservation slots for a day",
            "title": "Get Availability",
            "description": "Needs `reservations:read` and the Reservations app. The same slots the\nstorefront's booking form offers: opening hours, lead time, closures and\nremaining seats for the party size. `time` is the venue's wall clock.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "locationId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                },
                {
                    "name": "date",
                    "in": "query",
                    "type": "string",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": "2026-12-24",
                    "description": "The venue's calendar day. (date)"
                },
                {
                    "name": "party_size",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": 2,
                    "enum": null,
                    "example": null,
                    "description": "(min 1, max 100)"
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "The day's slots.",
                    "example": {
                        "data": {
                            "date": "2026-01-01",
                            "location_id": 1,
                            "open": true,
                            "capacity": 1,
                            "message": "string",
                            "slots": [
                                {
                                    "time": "19:30",
                                    "available": true,
                                    "remaining": 1
                                }
                            ]
                        }
                    },
                    "fields": [
                        {
                            "path": "data.date",
                            "type": "string",
                            "description": "(date)"
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.open",
                            "type": "boolean",
                            "description": "false when the venue is closed that day."
                        },
                        {
                            "path": "data.capacity",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.message",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.slots[].time",
                            "type": "string",
                            "description": "Venue wall clock, `HH:MM`."
                        },
                        {
                            "path": "data.slots[].available",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data.slots[].remaining",
                            "type": "integer",
                            "description": "Seats left at that time."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "unknown_location",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/locations/1/availability?date=2026-12-24\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Reservation availability endpoint",
            "seoDescription": "GET /locations/{id}/availability returns the bookable reservation slots for a day and party size, with remaining seats.",
            "seoKeywords": "availability, booking slots, reservations api, party size, opening hours"
        },
        {
            "id": "listReservations",
            "slug": "reservations",
            "pagePath": "api/reservations",
            "group": "Reservations",
            "method": "GET",
            "operation": "/v1/nextrestaurant/reservations",
            "summary": "List reservations, oldest change first",
            "title": "List Reservations",
            "description": "Needs `reservations:read`. Page with `next_cursor`; sync with `updated_since`.",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "location_id",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Only this location. Omit for all. (min 1)"
                },
                {
                    "name": "status",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": [
                        "pending",
                        "confirmed",
                        "seated",
                        "completed",
                        "no_show",
                        "cancelled",
                        "waitlist"
                    ],
                    "example": null,
                    "description": ""
                },
                {
                    "name": "from",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "`reserved_at` on or after this UTC date-time."
                },
                {
                    "name": "to",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "`reserved_at` before this UTC date-time."
                },
                {
                    "name": "updated_since",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": "2026-11-01T00:00:00Z",
                    "description": "Only records changed at or after this UTC date-time (ISO 8601 or `Y-m-d H:i:s`)."
                },
                {
                    "name": "limit",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": 25,
                    "enum": null,
                    "example": null,
                    "description": "Page size. Above 100 is clamped to 100; `meta.limit` says what was used. (min 1, max 100)"
                },
                {
                    "name": "cursor",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `meta.next_cursor` of the previous page. Opaque; do not build one."
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "One page.",
                    "example": {
                        "data": [
                            {
                                "id": 1,
                                "reservation_number": "RES-000109",
                                "location_id": 1,
                                "customer_id": 1,
                                "area_id": 1,
                                "table_ids": [
                                    1
                                ],
                                "guest_name": "string",
                                "guest_phone": "string",
                                "guest_email": "string",
                                "party_size": 1,
                                "reserved_at": "string",
                                "reserved_at_local": "string",
                                "duration_minutes": 1,
                                "status": "pending",
                                "deposit_amount": 1.5,
                                "special_requests": "string",
                                "source": "web",
                                "created_at": "string",
                                "updated_at": "string"
                            }
                        ],
                        "meta": {
                            "limit": 1,
                            "next_cursor": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].reservation_number",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data[].customer_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].area_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].table_ids[]",
                            "type": "integer[]",
                            "description": ""
                        },
                        {
                            "path": "data[].guest_name",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data[].guest_phone",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].guest_email",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].party_size",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data[].reserved_at",
                            "type": "string",
                            "description": "UTC."
                        },
                        {
                            "path": "data[].reserved_at_local",
                            "type": "string|null",
                            "description": "The venue's wall clock — what the guest was told."
                        },
                        {
                            "path": "data[].duration_minutes",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data[].status",
                            "type": "string",
                            "description": "One of `pending`, `confirmed`, `seated`, `completed`, `no_show`, `cancelled`, `waitlist`."
                        },
                        {
                            "path": "data[].deposit_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].special_requests",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].source",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].updated_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "meta.limit",
                            "type": "integer",
                            "description": "The page size used."
                        },
                        {
                            "path": "meta.next_cursor",
                            "type": "string|null",
                            "description": "Pass as `cursor` for the next page; null on the last page."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "http_400",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/reservations\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "List reservations endpoint",
            "seoDescription": "GET /reservations lists Next Restaurant bookings with location, status, date and updated_since filters and cursor paging.",
            "seoKeywords": "list reservations, bookings api, sync, cursor paging"
        },
        {
            "id": "createReservation",
            "slug": "post-reservations",
            "pagePath": "api/post-reservations",
            "group": "Reservations",
            "method": "POST",
            "operation": "/v1/nextrestaurant/reservations",
            "summary": "Book a table",
            "title": "Create Reservation",
            "description": "Needs `reservations:write` and the Reservations app. Created `pending` for\nstaff to confirm, exactly like a storefront booking — the guest gets the same\nacknowledgement email. The slot is re-checked under the location lock, so\ntwo clients cannot both take the last seats. Open in demo mode, like the\nstorefront. Also limited to 30 bookings per 5 minutes per address.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "Idempotency-Key",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Any unique string up to 255 characters, e.g. a UUID. Send the same key when\nretrying after a timeout: the first response is replayed (with\n`Idempotent-Replayed: true`) and nothing happens twice. Reusing a key for a\ndifferent request is `422 IDEMPOTENCY_MISMATCH`; while the first request is\nstill running it is `409 IDEMPOTENCY_IN_PROGRESS`. Keys are kept 24 hours,\nper API key. (max length 255)"
                }
            ],
            "requestBody": {
                "contentType": "application/json",
                "required": true,
                "description": "",
                "fields": [
                    {
                        "name": "location_id",
                        "type": "integer",
                        "required": true,
                        "description": "(min 1)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "guest_name",
                        "type": "string",
                        "required": true,
                        "description": "(min length 1)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "guest_phone",
                        "type": "string|null",
                        "required": false,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "guest_email",
                        "type": "string|null",
                        "required": false,
                        "description": "(email)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "party_size",
                        "type": "integer",
                        "required": true,
                        "description": "(min 1, max 100)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "reserved_at",
                        "type": "string",
                        "required": true,
                        "description": "The **venue's** local time, `Y-m-d H:i`. Pick one from `/availability`.",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "special_requests",
                        "type": "string|null",
                        "required": false,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": []
                    }
                ],
                "example": {
                    "location_id": 2,
                    "guest_name": "Dana Whitfield",
                    "guest_email": "dana@example.com",
                    "party_size": 4,
                    "reserved_at": "2026-12-24 19:30"
                }
            },
            "responses": [
                {
                    "status": 201,
                    "description": "Booked (pending confirmation).",
                    "example": {
                        "data": {
                            "id": 1,
                            "reservation_number": "RES-000109",
                            "location_id": 1,
                            "customer_id": 1,
                            "area_id": 1,
                            "table_ids": [
                                1
                            ],
                            "guest_name": "string",
                            "guest_phone": "string",
                            "guest_email": "string",
                            "party_size": 1,
                            "reserved_at": "string",
                            "reserved_at_local": "string",
                            "duration_minutes": 1,
                            "status": "pending",
                            "deposit_amount": 1.5,
                            "special_requests": "string",
                            "source": "web",
                            "created_at": "string",
                            "updated_at": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data.id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.reservation_number",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.customer_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.area_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.table_ids[]",
                            "type": "integer[]",
                            "description": ""
                        },
                        {
                            "path": "data.guest_name",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.guest_phone",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.guest_email",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.party_size",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.reserved_at",
                            "type": "string",
                            "description": "UTC."
                        },
                        {
                            "path": "data.reserved_at_local",
                            "type": "string|null",
                            "description": "The venue's wall clock — what the guest was told."
                        },
                        {
                            "path": "data.duration_minutes",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.status",
                            "type": "string",
                            "description": "One of `pending`, `confirmed`, `seated`, `completed`, `no_show`, `cancelled`, `waitlist`."
                        },
                        {
                            "path": "data.deposit_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.special_requests",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.source",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_json",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "unknown_location",
                "slot_unavailable",
                "http_413",
                "http_415",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s -X POST \"https://your-site.example/api/index.php/v1/nextrestaurant/reservations\" \\\n  -H \"Authorization: Bearer $API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"location_id\":2,\"guest_name\":\"Dana Whitfield\",\"guest_email\":\"dana@example.com\",\"party_size\":4,\"reserved_at\":\"2026-12-24 19:30\"}'"
                }
            ],
            "sections": [],
            "seoTitle": "Book a table endpoint",
            "seoDescription": "POST /reservations books a table through the same engine as the storefront: hours, lead time and capacity are checked under a lock.",
            "seoKeywords": "book table, create reservation, booking api, slot unavailable, idempotency"
        },
        {
            "id": "getReservation",
            "slug": "get-reservations",
            "pagePath": "api/get-reservations",
            "group": "Reservations",
            "method": "GET",
            "operation": "/v1/nextrestaurant/reservations/{reservationId}",
            "summary": "One reservation",
            "title": "Get Reservation",
            "description": "Needs `reservations:read`. The response carries an `ETag`.",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "reservationId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "The reservation.",
                    "example": {
                        "data": {
                            "id": 1,
                            "reservation_number": "RES-000109",
                            "location_id": 1,
                            "customer_id": 1,
                            "area_id": 1,
                            "table_ids": [
                                1
                            ],
                            "guest_name": "string",
                            "guest_phone": "string",
                            "guest_email": "string",
                            "party_size": 1,
                            "reserved_at": "string",
                            "reserved_at_local": "string",
                            "duration_minutes": 1,
                            "status": "pending",
                            "deposit_amount": 1.5,
                            "special_requests": "string",
                            "source": "web",
                            "created_at": "string",
                            "updated_at": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data.id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.reservation_number",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.customer_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.area_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.table_ids[]",
                            "type": "integer[]",
                            "description": ""
                        },
                        {
                            "path": "data.guest_name",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.guest_phone",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.guest_email",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.party_size",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.reserved_at",
                            "type": "string",
                            "description": "UTC."
                        },
                        {
                            "path": "data.reserved_at_local",
                            "type": "string|null",
                            "description": "The venue's wall clock — what the guest was told."
                        },
                        {
                            "path": "data.duration_minutes",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.status",
                            "type": "string",
                            "description": "One of `pending`, `confirmed`, `seated`, `completed`, `no_show`, `cancelled`, `waitlist`."
                        },
                        {
                            "path": "data.deposit_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.special_requests",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.source",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "not_found",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/reservations/1\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Get reservation endpoint",
            "seoDescription": "GET /reservations/{id} returns one booking with its UTC and venue-local times, tables and status.",
            "seoKeywords": "get reservation, booking, reserved_at_local, reservations api"
        },
        {
            "id": "updateReservation",
            "slug": "patch-reservations",
            "pagePath": "api/patch-reservations",
            "group": "Reservations",
            "method": "PATCH",
            "operation": "/v1/nextrestaurant/reservations/{reservationId}",
            "summary": "Change a reservation",
            "title": "Update Reservation",
            "description": "Needs `reservations:write`. Send only what changes. Moving the time or\ngrowing the party re-checks the slot (this booking is not counted against\nitself) and the assigned tables. `status` follows the same lifecycle as the\nhost stand: pending → confirmed / waitlist / cancelled / no_show,\nconfirmed → seated / cancelled / no_show, seated → completed / cancelled.\nRefused in demo mode.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "reservationId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                },
                {
                    "name": "If-Match",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `ETag` from your last read. When the record has changed since, the change\nis refused with `412 PRECONDITION_FAILED` instead of overwriting someone\nelse's edit. Without it, the last write wins.\n"
                },
                {
                    "name": "Idempotency-Key",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Any unique string up to 255 characters, e.g. a UUID. Send the same key when\nretrying after a timeout: the first response is replayed (with\n`Idempotent-Replayed: true`) and nothing happens twice. Reusing a key for a\ndifferent request is `422 IDEMPOTENCY_MISMATCH`; while the first request is\nstill running it is `409 IDEMPOTENCY_IN_PROGRESS`. Keys are kept 24 hours,\nper API key. (max length 255)"
                }
            ],
            "requestBody": {
                "contentType": "application/json",
                "required": true,
                "description": "",
                "fields": [
                    {
                        "name": "guest_name",
                        "type": "string",
                        "required": false,
                        "description": "(min length 1)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "guest_phone",
                        "type": "string|null",
                        "required": false,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "guest_email",
                        "type": "string|null",
                        "required": false,
                        "description": "(email)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "party_size",
                        "type": "integer",
                        "required": false,
                        "description": "(min 1, max 100)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "reserved_at",
                        "type": "string",
                        "required": false,
                        "description": "The venue's local time, `Y-m-d H:i`.",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "duration_minutes",
                        "type": "integer",
                        "required": false,
                        "description": "(min 15, max 720)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "special_requests",
                        "type": "string|null",
                        "required": false,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "status",
                        "type": "string",
                        "required": false,
                        "description": "",
                        "enum": [
                            "pending",
                            "confirmed",
                            "seated",
                            "completed",
                            "no_show",
                            "cancelled",
                            "waitlist"
                        ],
                        "default": null,
                        "children": []
                    }
                ],
                "example": {
                    "party_size": 6,
                    "status": "confirmed"
                }
            },
            "responses": [
                {
                    "status": 200,
                    "description": "The changed reservation.",
                    "example": {
                        "data": {
                            "id": 1,
                            "reservation_number": "RES-000109",
                            "location_id": 1,
                            "customer_id": 1,
                            "area_id": 1,
                            "table_ids": [
                                1
                            ],
                            "guest_name": "string",
                            "guest_phone": "string",
                            "guest_email": "string",
                            "party_size": 1,
                            "reserved_at": "string",
                            "reserved_at_local": "string",
                            "duration_minutes": 1,
                            "status": "pending",
                            "deposit_amount": 1.5,
                            "special_requests": "string",
                            "source": "web",
                            "created_at": "string",
                            "updated_at": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data.id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data.reservation_number",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.customer_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.area_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.table_ids[]",
                            "type": "integer[]",
                            "description": ""
                        },
                        {
                            "path": "data.guest_name",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.guest_phone",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.guest_email",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.party_size",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.reserved_at",
                            "type": "string",
                            "description": "UTC."
                        },
                        {
                            "path": "data.reserved_at_local",
                            "type": "string|null",
                            "description": "The venue's wall clock — what the guest was told."
                        },
                        {
                            "path": "data.duration_minutes",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.status",
                            "type": "string",
                            "description": "One of `pending`, `confirmed`, `seated`, `completed`, `no_show`, `cancelled`, `waitlist`."
                        },
                        {
                            "path": "data.deposit_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.special_requests",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.source",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_json",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "not_found",
                "slot_unavailable",
                "http_412",
                "http_415",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s -X PATCH \"https://your-site.example/api/index.php/v1/nextrestaurant/reservations/1\" \\\n  -H \"Authorization: Bearer $API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"party_size\":6,\"status\":\"confirmed\"}'"
                }
            ],
            "sections": [],
            "seoTitle": "Change reservation endpoint",
            "seoDescription": "PATCH /reservations/{id} changes a booking or moves it through its status lifecycle, re-checking the slot, with If-Match support.",
            "seoKeywords": "update reservation, confirm booking, cancel reservation, status lifecycle, if-match"
        },
        {
            "id": "updateMenuItem",
            "slug": "menu-items",
            "pagePath": "api/menu-items",
            "group": "Menu",
            "method": "PATCH",
            "operation": "/v1/nextrestaurant/menu-items/{itemId}",
            "summary": "Change an item's base price or publish it",
            "title": "Update Menu Item",
            "description": "Needs `menu:write`. Validated by the same form rules as the admin menu\nscreen. Answers with the item's availability at `location_id` (default: the\nfirst location); the `ETag` is the item's, for a following `If-Match` on\nthis path. Refused in demo mode.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "itemId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                },
                {
                    "name": "location_id",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": ""
                },
                {
                    "name": "If-Match",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `ETag` from your last read. When the record has changed since, the change\nis refused with `412 PRECONDITION_FAILED` instead of overwriting someone\nelse's edit. Without it, the last write wins.\n"
                },
                {
                    "name": "Idempotency-Key",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Any unique string up to 255 characters, e.g. a UUID. Send the same key when\nretrying after a timeout: the first response is replayed (with\n`Idempotent-Replayed: true`) and nothing happens twice. Reusing a key for a\ndifferent request is `422 IDEMPOTENCY_MISMATCH`; while the first request is\nstill running it is `409 IDEMPOTENCY_IN_PROGRESS`. Keys are kept 24 hours,\nper API key. (max length 255)"
                }
            ],
            "requestBody": {
                "contentType": "application/json",
                "required": true,
                "description": "",
                "fields": [
                    {
                        "name": "base_price",
                        "type": "number",
                        "required": false,
                        "description": "(min 0)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "published",
                        "type": "boolean",
                        "required": false,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": []
                    }
                ],
                "example": {
                    "base_price": 12.5
                }
            },
            "responses": [
                {
                    "status": 200,
                    "description": "The item, as it now stands at the location.",
                    "example": {
                        "data": {
                            "item_id": 1,
                            "location_id": 1,
                            "title": "string",
                            "base_price": 1.5,
                            "price": 1.5,
                            "price_override": 1.5,
                            "published": true,
                            "available": true,
                            "is_86": true,
                            "eighty_six_until": "string",
                            "eighty_six_reason": "string",
                            "updated_at": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data.item_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.base_price",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.price",
                            "type": "number",
                            "description": "What the item sells for here."
                        },
                        {
                            "path": "data.price_override",
                            "type": "number|null",
                            "description": ""
                        },
                        {
                            "path": "data.published",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data.available",
                            "type": "boolean",
                            "description": "Can be ordered at this location right now."
                        },
                        {
                            "path": "data.is_86",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data.eighty_six_until",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.eighty_six_reason",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_json",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "not_found",
                "http_412",
                "http_415",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s -X PATCH \"https://your-site.example/api/index.php/v1/nextrestaurant/menu-items/1\" \\\n  -H \"Authorization: Bearer $API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"base_price\":12.5}'"
                }
            ],
            "sections": [],
            "seoTitle": "Update menu item endpoint",
            "seoDescription": "PATCH /menu-items/{id} changes a Next Restaurant menu item's base price or publishes it, through the admin form rules.",
            "seoKeywords": "menu item price, publish item, menu api, menu:write"
        },
        {
            "id": "updateMenuItemAtLocation",
            "slug": "locations-menu-items",
            "pagePath": "api/locations-menu-items",
            "group": "Menu",
            "method": "PATCH",
            "operation": "/v1/nextrestaurant/locations/{locationId}/menu-items/{itemId}",
            "summary": "86 an item, switch it off, or override its price at one location",
            "title": "Update Menu Item At Location",
            "description": "Needs `menu:write`. The same per-location settings as the admin menu screen.\nA change in whether the item can be ordered fires\n`menu_item.availability_changed`. Refused in demo mode.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "locationId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                },
                {
                    "name": "itemId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                },
                {
                    "name": "If-Match",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `ETag` from your last read. When the record has changed since, the change\nis refused with `412 PRECONDITION_FAILED` instead of overwriting someone\nelse's edit. Without it, the last write wins.\n"
                },
                {
                    "name": "Idempotency-Key",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Any unique string up to 255 characters, e.g. a UUID. Send the same key when\nretrying after a timeout: the first response is replayed (with\n`Idempotent-Replayed: true`) and nothing happens twice. Reusing a key for a\ndifferent request is `422 IDEMPOTENCY_MISMATCH`; while the first request is\nstill running it is `409 IDEMPOTENCY_IN_PROGRESS`. Keys are kept 24 hours,\nper API key. (max length 255)"
                }
            ],
            "requestBody": {
                "contentType": "application/json",
                "required": true,
                "description": "",
                "fields": [
                    {
                        "name": "available",
                        "type": "boolean",
                        "required": false,
                        "description": "false switches the item off at this location.",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "is_86",
                        "type": "boolean",
                        "required": false,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "eighty_six_reason",
                        "type": "string|null",
                        "required": false,
                        "description": "(max length 255)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "eighty_six_until",
                        "type": "string|null",
                        "required": false,
                        "description": "UTC date-time when the 86 lifts.",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "price_override",
                        "type": "number|null",
                        "required": false,
                        "description": "null returns to the base price. (min 0)",
                        "enum": null,
                        "default": null,
                        "children": []
                    }
                ],
                "example": {
                    "is_86": true,
                    "eighty_six_reason": "Out of salmon"
                }
            },
            "responses": [
                {
                    "status": 200,
                    "description": "The item at the location.",
                    "example": {
                        "data": {
                            "item_id": 1,
                            "location_id": 1,
                            "title": "string",
                            "base_price": 1.5,
                            "price": 1.5,
                            "price_override": 1.5,
                            "published": true,
                            "available": true,
                            "is_86": true,
                            "eighty_six_until": "string",
                            "eighty_six_reason": "string",
                            "updated_at": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data.item_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.base_price",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.price",
                            "type": "number",
                            "description": "What the item sells for here."
                        },
                        {
                            "path": "data.price_override",
                            "type": "number|null",
                            "description": ""
                        },
                        {
                            "path": "data.published",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data.available",
                            "type": "boolean",
                            "description": "Can be ordered at this location right now."
                        },
                        {
                            "path": "data.is_86",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data.eighty_six_until",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.eighty_six_reason",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_json",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "not_found",
                "http_412",
                "http_415",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s -X PATCH \"https://your-site.example/api/index.php/v1/nextrestaurant/locations/1/menu-items/1\" \\\n  -H \"Authorization: Bearer $API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"is_86\":true,\"eighty_six_reason\":\"Out of salmon\"}'"
                }
            ],
            "sections": [],
            "seoTitle": "86 a menu item endpoint",
            "seoDescription": "PATCH /locations/{id}/menu-items/{item_id} 86es an item, switches it off or overrides its price at one location.",
            "seoKeywords": "86 item, out of stock, price override, menu availability api"
        },
        {
            "id": "listStockLevels",
            "slug": "locations-stock-levels",
            "pagePath": "api/locations-stock-levels",
            "group": "Stock",
            "method": "GET",
            "operation": "/v1/nextrestaurant/locations/{locationId}/stock-levels",
            "summary": "What is on hand at a location",
            "title": "List Stock Levels",
            "description": "Needs `inventory:read` and the Inventory app. Ordered by stock item id.",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "locationId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                },
                {
                    "name": "low",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": [
                        "true",
                        "false"
                    ],
                    "example": null,
                    "description": "`true` = only levels at or below their reorder point."
                },
                {
                    "name": "limit",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": 25,
                    "enum": null,
                    "example": null,
                    "description": "Page size. Above 100 is clamped to 100; `meta.limit` says what was used. (min 1, max 100)"
                },
                {
                    "name": "cursor",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `meta.next_cursor` of the previous page. Opaque; do not build one."
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "One page.",
                    "example": {
                        "data": [
                            {
                                "stock_item_id": 1,
                                "location_id": 1,
                                "sku": "string",
                                "title": "string",
                                "unit": "kg",
                                "quantity": 1.5,
                                "par_level": 1.5,
                                "reorder_point": 1.5,
                                "low": true,
                                "is_86": true,
                                "last_counted_at": "string",
                                "updated_at": "string"
                            }
                        ],
                        "meta": {
                            "limit": 1,
                            "next_cursor": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data[].stock_item_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data[].location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data[].sku",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data[].unit",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].quantity",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].par_level",
                            "type": "number|null",
                            "description": ""
                        },
                        {
                            "path": "data[].reorder_point",
                            "type": "number|null",
                            "description": ""
                        },
                        {
                            "path": "data[].low",
                            "type": "boolean",
                            "description": "At or below the reorder point."
                        },
                        {
                            "path": "data[].is_86",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data[].last_counted_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].updated_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "meta.limit",
                            "type": "integer",
                            "description": "The page size used."
                        },
                        {
                            "path": "meta.next_cursor",
                            "type": "string|null",
                            "description": "Pass as `cursor` for the next page; null on the last page."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "http_400",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "unknown_location",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/locations/1/stock-levels\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Stock levels endpoint",
            "seoDescription": "GET /locations/{id}/stock-levels returns stock on hand, par and reorder points at a location, optionally only low items.",
            "seoKeywords": "stock levels, inventory api, low stock, reorder point"
        },
        {
            "id": "updateStockLevel",
            "slug": "patch-locations-stock-levels",
            "pagePath": "api/patch-locations-stock-levels",
            "group": "Stock",
            "method": "PATCH",
            "operation": "/v1/nextrestaurant/locations/{locationId}/stock-levels/{stockItemId}",
            "summary": "Set a count, par or reorder point, or 86 an ingredient",
            "title": "Update Stock Level",
            "description": "Needs `inventory:write`. A new quantity is recorded as an `adjustment`\nmovement; dropping to the reorder point fires `stock.low`. `is_86` 86es every\nmenu item whose recipe uses this stock item at the location. Refused in demo\nmode.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "locationId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                },
                {
                    "name": "stockItemId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                },
                {
                    "name": "If-Match",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `ETag` from your last read. When the record has changed since, the change\nis refused with `412 PRECONDITION_FAILED` instead of overwriting someone\nelse's edit. Without it, the last write wins.\n"
                },
                {
                    "name": "Idempotency-Key",
                    "in": "header",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Any unique string up to 255 characters, e.g. a UUID. Send the same key when\nretrying after a timeout: the first response is replayed (with\n`Idempotent-Replayed: true`) and nothing happens twice. Reusing a key for a\ndifferent request is `422 IDEMPOTENCY_MISMATCH`; while the first request is\nstill running it is `409 IDEMPOTENCY_IN_PROGRESS`. Keys are kept 24 hours,\nper API key. (max length 255)"
                }
            ],
            "requestBody": {
                "contentType": "application/json",
                "required": true,
                "description": "",
                "fields": [
                    {
                        "name": "quantity",
                        "type": "number",
                        "required": false,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "par_level",
                        "type": "number|null",
                        "required": false,
                        "description": "(min 0)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "reorder_point",
                        "type": "number|null",
                        "required": false,
                        "description": "(min 0)",
                        "enum": null,
                        "default": null,
                        "children": []
                    },
                    {
                        "name": "is_86",
                        "type": "boolean",
                        "required": false,
                        "description": "",
                        "enum": null,
                        "default": null,
                        "children": []
                    }
                ],
                "example": {
                    "quantity": 42.5
                }
            },
            "responses": [
                {
                    "status": 200,
                    "description": "The level as it now stands.",
                    "example": {
                        "data": {
                            "stock_item_id": 1,
                            "location_id": 1,
                            "sku": "string",
                            "title": "string",
                            "unit": "kg",
                            "quantity": 1.5,
                            "par_level": 1.5,
                            "reorder_point": 1.5,
                            "low": true,
                            "is_86": true,
                            "last_counted_at": "string",
                            "updated_at": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data.stock_item_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.sku",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.title",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data.unit",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.quantity",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.par_level",
                            "type": "number|null",
                            "description": ""
                        },
                        {
                            "path": "data.reorder_point",
                            "type": "number|null",
                            "description": ""
                        },
                        {
                            "path": "data.low",
                            "type": "boolean",
                            "description": "At or below the reorder point."
                        },
                        {
                            "path": "data.is_86",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data.last_counted_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_json",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "not_found",
                "http_412",
                "http_415",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s -X PATCH \"https://your-site.example/api/index.php/v1/nextrestaurant/locations/1/stock-levels/1\" \\\n  -H \"Authorization: Bearer $API_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"quantity\":42.5}'"
                }
            ],
            "sections": [],
            "seoTitle": "Update stock level endpoint",
            "seoDescription": "PATCH /locations/{id}/stock-levels/{stock_item_id} sets a stock count, par or reorder point, or 86es an ingredient and its dishes.",
            "seoKeywords": "stock count, inventory api, 86 ingredient, adjustment movement"
        },
        {
            "id": "listCustomers",
            "slug": "customers",
            "pagePath": "api/customers",
            "group": "Customers",
            "method": "GET",
            "operation": "/v1/nextrestaurant/customers",
            "summary": "List customers, oldest change first",
            "title": "List Customers",
            "description": "Needs `customers:read` and the Customers app.",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "email",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Exact match."
                },
                {
                    "name": "marketing_opt_in",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": [
                        "true",
                        "false"
                    ],
                    "example": null,
                    "description": ""
                },
                {
                    "name": "updated_since",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": "2026-11-01T00:00:00Z",
                    "description": "Only records changed at or after this UTC date-time (ISO 8601 or `Y-m-d H:i:s`)."
                },
                {
                    "name": "limit",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": 25,
                    "enum": null,
                    "example": null,
                    "description": "Page size. Above 100 is clamped to 100; `meta.limit` says what was used. (min 1, max 100)"
                },
                {
                    "name": "cursor",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `meta.next_cursor` of the previous page. Opaque; do not build one."
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "One page.",
                    "example": {
                        "data": [
                            {
                                "id": 1,
                                "code": "string",
                                "first_name": "string",
                                "last_name": "string",
                                "email": "string",
                                "phone": "string",
                                "marketing_opt_in": true,
                                "default_location_id": 1,
                                "tags": [
                                    "string"
                                ],
                                "active": true,
                                "created_at": "string",
                                "updated_at": "string"
                            }
                        ],
                        "meta": {
                            "limit": 1,
                            "next_cursor": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data[].id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data[].code",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].first_name",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].last_name",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].email",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].phone",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].marketing_opt_in",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data[].default_location_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].tags[]",
                            "type": "string[]",
                            "description": ""
                        },
                        {
                            "path": "data[].active",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data[].created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].updated_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "meta.limit",
                            "type": "integer",
                            "description": "The page size used."
                        },
                        {
                            "path": "meta.next_cursor",
                            "type": "string|null",
                            "description": "Pass as `cursor` for the next page; null on the last page."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "http_400",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/customers\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "List customers endpoint",
            "seoDescription": "GET /customers lists Next Restaurant customers for CRM and mailing sync, with email, marketing opt-in and updated_since filters.",
            "seoKeywords": "customers api, crm sync, marketing opt-in, mailing list"
        },
        {
            "id": "getCustomer",
            "slug": "get-customers",
            "pagePath": "api/get-customers",
            "group": "Customers",
            "method": "GET",
            "operation": "/v1/nextrestaurant/customers/{customerId}",
            "summary": "One customer",
            "title": "Get Customer",
            "description": "Needs `customers:read`.",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "customerId",
                    "in": "path",
                    "type": "integer",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "(min 1)"
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "The customer.",
                    "example": {
                        "data": {
                            "id": 1,
                            "code": "string",
                            "first_name": "string",
                            "last_name": "string",
                            "email": "string",
                            "phone": "string",
                            "marketing_opt_in": true,
                            "default_location_id": 1,
                            "tags": [
                                "string"
                            ],
                            "active": true,
                            "created_at": "string",
                            "updated_at": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data.id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.code",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.first_name",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.last_name",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.email",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.phone",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.marketing_opt_in",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data.default_location_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.tags[]",
                            "type": "string[]",
                            "description": ""
                        },
                        {
                            "path": "data.active",
                            "type": "boolean",
                            "description": ""
                        },
                        {
                            "path": "data.created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data.updated_at",
                            "type": "string|null",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "not_found",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/customers/1\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Get customer endpoint",
            "seoDescription": "GET /customers/{id} returns one Next Restaurant customer with contact details, tags and marketing opt-in.",
            "seoKeywords": "get customer, customer api, crm"
        },
        {
            "id": "listPayments",
            "slug": "payments",
            "pagePath": "api/payments",
            "group": "Payments",
            "method": "GET",
            "operation": "/v1/nextrestaurant/payments",
            "summary": "Money taken, oldest change first",
            "title": "List Payments",
            "description": "Needs `payments:read` and the POS app.",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "location_id",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Only this location. Omit for all. (min 1)"
                },
                {
                    "name": "status",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": "captured",
                    "description": ""
                },
                {
                    "name": "updated_since",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": "2026-11-01T00:00:00Z",
                    "description": "Only records changed at or after this UTC date-time (ISO 8601 or `Y-m-d H:i:s`)."
                },
                {
                    "name": "limit",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": 25,
                    "enum": null,
                    "example": null,
                    "description": "Page size. Above 100 is clamped to 100; `meta.limit` says what was used. (min 1, max 100)"
                },
                {
                    "name": "cursor",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `meta.next_cursor` of the previous page. Opaque; do not build one."
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "One page.",
                    "example": {
                        "data": [
                            {
                                "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"
                        }
                    },
                    "fields": [
                        {
                            "path": "data[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].order_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].location_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].method",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].tip_amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].refunded_total",
                            "type": "number",
                            "description": "Sum of the refunds against this payment."
                        },
                        {
                            "path": "data[].currency",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].status",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data[].reference",
                            "type": "string|null",
                            "description": "The provider's or the till's transaction reference."
                        },
                        {
                            "path": "data[].paid_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].updated_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "meta.limit",
                            "type": "integer",
                            "description": "The page size used."
                        },
                        {
                            "path": "meta.next_cursor",
                            "type": "string|null",
                            "description": "Pass as `cursor` for the next page; null on the last page."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "http_400",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/payments\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "List payments endpoint",
            "seoDescription": "GET /payments lists payments taken in Next Restaurant with refunded totals, for accounting sync.",
            "seoKeywords": "payments api, accounting, captured payments, refunded total"
        },
        {
            "id": "listRefunds",
            "slug": "refunds",
            "pagePath": "api/refunds",
            "group": "Payments",
            "method": "GET",
            "operation": "/v1/nextrestaurant/refunds",
            "summary": "Money returned, oldest first",
            "title": "List Refunds",
            "description": "Needs `payments:read` and the POS app.",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "location_id",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Only this location. Omit for all. (min 1)"
                },
                {
                    "name": "updated_since",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": "2026-11-01T00:00:00Z",
                    "description": "Only records changed at or after this UTC date-time (ISO 8601 or `Y-m-d H:i:s`)."
                },
                {
                    "name": "limit",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": 25,
                    "enum": null,
                    "example": null,
                    "description": "Page size. Above 100 is clamped to 100; `meta.limit` says what was used. (min 1, max 100)"
                },
                {
                    "name": "cursor",
                    "in": "query",
                    "type": "string",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "The `meta.next_cursor` of the previous page. Opaque; do not build one."
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "One page.",
                    "example": {
                        "data": [
                            {
                                "id": 1,
                                "payment_id": 1,
                                "order_id": 1,
                                "amount": 1.5,
                                "reason": "string",
                                "status": "completed",
                                "reference": "string",
                                "processed_at": "string",
                                "created_at": "string"
                            }
                        ],
                        "meta": {
                            "limit": 1,
                            "next_cursor": "string"
                        }
                    },
                    "fields": [
                        {
                            "path": "data[].id",
                            "type": "integer",
                            "description": "(int64)"
                        },
                        {
                            "path": "data[].payment_id",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data[].order_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data[].amount",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data[].reason",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].status",
                            "type": "string",
                            "description": ""
                        },
                        {
                            "path": "data[].reference",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].processed_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "data[].created_at",
                            "type": "string|null",
                            "description": ""
                        },
                        {
                            "path": "meta.limit",
                            "type": "integer",
                            "description": "The page size used."
                        },
                        {
                            "path": "meta.next_cursor",
                            "type": "string|null",
                            "description": "Pass as `cursor` for the next page; null on the last page."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "http_400",
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/refunds\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "List refunds endpoint",
            "seoDescription": "GET /refunds lists refunds made in Next Restaurant by when they were processed, for accounting sync.",
            "seoKeywords": "refunds api, accounting, refund reason"
        },
        {
            "id": "getSalesSummary",
            "slug": "reports-sales-summary",
            "pagePath": "api/reports-sales-summary",
            "group": "Reports",
            "method": "GET",
            "operation": "/v1/nextrestaurant/reports/sales-summary",
            "summary": "Sales totals and a daily series",
            "title": "Get Sales Summary",
            "description": "Needs `reports:read` and the Reports app. The same numbers as the admin\nReports screen, by **venue** calendar day. At most 366 days per request.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "from",
                    "in": "query",
                    "type": "string",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "First venue calendar day, inclusive. (date)"
                },
                {
                    "name": "to",
                    "in": "query",
                    "type": "string",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Last venue calendar day, inclusive. At most 366 days after `from`. (date)"
                },
                {
                    "name": "location_id",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Only this location. Omit for all. (min 1)"
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "The summary.",
                    "example": {
                        "data": {
                            "from": "2026-01-01",
                            "to": "2026-01-01",
                            "location_id": 1,
                            "totals": {
                                "orders_count": 1,
                                "gross_sales": 1.5,
                                "net_sales": 1.5,
                                "tax_total": 1.5,
                                "service_total": 1.5,
                                "tips_total": 1.5,
                                "discount_total": 1.5,
                                "avg_order_value": 1.5,
                                "comp_total": 1.5,
                                "refund_total": 1.5
                            },
                            "days": [
                                {
                                    "day": "2026-01-01",
                                    "orders_count": 1,
                                    "gross_sales": 1.5
                                }
                            ]
                        }
                    },
                    "fields": [
                        {
                            "path": "data.from",
                            "type": "string",
                            "description": "(date)"
                        },
                        {
                            "path": "data.to",
                            "type": "string",
                            "description": "(date)"
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.totals.orders_count",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.totals.gross_sales",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.totals.net_sales",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.totals.tax_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.totals.service_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.totals.tips_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.totals.discount_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.totals.avg_order_value",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.totals.comp_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.totals.refund_total",
                            "type": "number",
                            "description": ""
                        },
                        {
                            "path": "data.days[].day",
                            "type": "string",
                            "description": "(date)"
                        },
                        {
                            "path": "data.days[].orders_count",
                            "type": "integer",
                            "description": ""
                        },
                        {
                            "path": "data.days[].gross_sales",
                            "type": "number",
                            "description": ""
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "unknown_location",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/reports/sales-summary?from=value&to=value\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Sales summary endpoint",
            "seoDescription": "GET /reports/sales-summary returns sales totals and a daily series by venue day, the same numbers as the admin reports.",
            "seoKeywords": "sales report api, gross sales, tips, refunds, daily series"
        },
        {
            "id": "getTimesheets",
            "slug": "timesheets",
            "pagePath": "api/timesheets",
            "group": "Reports",
            "method": "GET",
            "operation": "/v1/nextrestaurant/timesheets",
            "summary": "Hours worked, overtime and pay",
            "title": "Get Timesheets",
            "description": "Needs `staff:read` and the Staff app. The same figures as Monitoring →\nPayroll, for shifts that started on the venue days in range.\n",
            "stability": "stable",
            "deprecated": null,
            "auth": true,
            "params": [
                {
                    "name": "from",
                    "in": "query",
                    "type": "string",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "First venue calendar day, inclusive. (date)"
                },
                {
                    "name": "to",
                    "in": "query",
                    "type": "string",
                    "required": true,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Last venue calendar day, inclusive. At most 366 days after `from`. (date)"
                },
                {
                    "name": "location_id",
                    "in": "query",
                    "type": "integer",
                    "required": false,
                    "default": null,
                    "enum": null,
                    "example": null,
                    "description": "Only this location. Omit for all. (min 1)"
                }
            ],
            "requestBody": null,
            "responses": [
                {
                    "status": 200,
                    "description": "The timesheets.",
                    "example": {
                        "data": {
                            "from": "2026-01-01",
                            "to": "2026-01-01",
                            "location_id": 1,
                            "staff": [
                                {}
                            ],
                            "days": [
                                {}
                            ],
                            "open_shifts": [
                                {}
                            ]
                        }
                    },
                    "fields": [
                        {
                            "path": "data.from",
                            "type": "string",
                            "description": "(date)"
                        },
                        {
                            "path": "data.to",
                            "type": "string",
                            "description": "(date)"
                        },
                        {
                            "path": "data.location_id",
                            "type": "integer|null",
                            "description": ""
                        },
                        {
                            "path": "data.staff[]",
                            "type": "object[]",
                            "description": "Per person over the range — hours, regular, overtime, break_minutes, hourly_rate, gross, shifts, and a per-week split."
                        },
                        {
                            "path": "data.days[]",
                            "type": "object[]",
                            "description": "Per person per venue day."
                        },
                        {
                            "path": "data.open_shifts[]",
                            "type": "object[]",
                            "description": "Clock-ins with no clock-out, which are not counted until closed."
                        }
                    ],
                    "notes": ""
                }
            ],
            "errors": [
                "invalid_token",
                "insufficient_scope",
                "module_disabled",
                "api_disabled",
                "unknown_location",
                "validation_failed",
                "rate_limited"
            ],
            "rateLimit": null,
            "samples": [
                {
                    "lang": "bash",
                    "label": "curl",
                    "code": "curl -s \"https://your-site.example/api/index.php/v1/nextrestaurant/timesheets?from=value&to=value\" \\\n  -H \"Authorization: Bearer $API_TOKEN\""
                }
            ],
            "sections": [],
            "seoTitle": "Timesheets endpoint",
            "seoDescription": "GET /timesheets returns hours, overtime and pay per employee and day, the same figures as Monitoring → Payroll.",
            "seoKeywords": "timesheets api, payroll, overtime, hours worked"
        }
    ],
    "errors": [
        {
            "id": "invalid_token",
            "status": 401,
            "code": "INVALID_TOKEN",
            "when": "The token is missing, wrong, or none has been generated.",
            "body": {
                "errors": [
                    {
                        "title": "Invalid API token",
                        "code": "INVALID_TOKEN"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "insufficient_scope",
            "status": 403,
            "code": "INSUFFICIENT_SCOPE",
            "when": "This API key does not have the permission this request needs.",
            "body": {
                "errors": [
                    {
                        "title": "This API key does not have the permission this request needs.",
                        "code": "INSUFFICIENT_SCOPE",
                        "meta": {
                            "required_scopes": [
                                "orders:write"
                            ]
                        }
                    }
                ],
                "meta": {
                    "request_id": "req_3f9c2a71b0d84e6f5a1c2b3d"
                }
            },
            "global": false
        },
        {
            "id": "module_disabled",
            "status": 403,
            "code": "MODULE_DISABLED",
            "when": "This module is disabled.",
            "body": {
                "errors": [
                    {
                        "title": "This module is disabled.",
                        "code": "MODULE_DISABLED",
                        "meta": {
                            "module": "reservations"
                        }
                    }
                ]
            },
            "global": false
        },
        {
            "id": "api_disabled",
            "status": 403,
            "code": "API_DISABLED",
            "when": "API is disabled",
            "body": {
                "errors": [
                    {
                        "title": "API is disabled",
                        "code": "API_DISABLED"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "unknown_location",
            "status": 404,
            "code": "UNKNOWN_LOCATION",
            "when": "No such published location.",
            "body": {
                "errors": [
                    {
                        "title": "Unknown location",
                        "code": "UNKNOWN_LOCATION"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "http_400",
            "status": 400,
            "code": null,
            "when": "`INVALID_CURSOR`: use `meta.next_cursor` exactly as given.",
            "body": null,
            "global": true
        },
        {
            "id": "validation_failed",
            "status": 422,
            "code": "VALIDATION_FAILED",
            "when": "One error per invalid field, each with `source.pointer`.",
            "body": {
                "errors": [
                    {
                        "title": "A whole number from 1 to 100.",
                        "code": "VALIDATION_FAILED",
                        "source": {
                            "pointer": "/party_size"
                        }
                    }
                ]
            },
            "global": false
        },
        {
            "id": "rate_limited",
            "status": 429,
            "code": "RATE_LIMITED",
            "when": "Too many requests. `RATE_LIMITED` with a `Retry-After` header: this key used\nits budget for the minute, or this address sent 20 bad tokens in 5 minutes.\nNothing ran, so the request is safe to retry after the wait.\n",
            "body": {
                "errors": [
                    {
                        "title": "Rate limit exceeded for this API key. Slow down and retry after the reset.",
                        "code": "RATE_LIMITED"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "invalid_order",
            "status": 400,
            "code": "INVALID_ORDER",
            "when": "One of the items is no longer available.",
            "body": {
                "errors": [
                    {
                        "title": "One of the items is no longer available.",
                        "code": "INVALID_ORDER"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "order_failed",
            "status": 500,
            "code": "ORDER_FAILED",
            "when": "The order could not be created. The message is deliberately generic;\nthe detail is in the Joomla log under `administrator/logs/`.\n",
            "body": {
                "errors": [
                    {
                        "title": "The order could not be created.",
                        "code": "ORDER_FAILED"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "not_found",
            "status": 404,
            "code": "NOT_FOUND",
            "when": "No such record.",
            "body": {
                "errors": [
                    {
                        "title": "Order not found",
                        "code": "NOT_FOUND"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "invalid_json",
            "status": 400,
            "code": "INVALID_JSON",
            "when": "`INVALID_JSON` (the body is not a JSON object) or `INVALID_IDEMPOTENCY_KEY`.",
            "body": {
                "errors": [
                    {
                        "title": "The request body is not a valid JSON object.",
                        "code": "INVALID_JSON"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "slot_unavailable",
            "status": 409,
            "code": "SLOT_UNAVAILABLE",
            "when": "`SLOT_UNAVAILABLE` (closed, fully booked, too soon — the title says which),\n`TABLE_CONFLICT`, `ILLEGAL_TRANSITION` (`meta.allowed` lists the statuses\nreachable from `meta.from`), or `IDEMPOTENCY_IN_PROGRESS`.\n",
            "body": {
                "errors": [
                    {
                        "title": "That time is fully booked. Please pick another slot.",
                        "code": "SLOT_UNAVAILABLE"
                    }
                ]
            },
            "global": false
        },
        {
            "id": "http_413",
            "status": 413,
            "code": null,
            "when": "`PAYLOAD_TOO_LARGE`: bodies are limited to 64 KB.",
            "body": null,
            "global": true
        },
        {
            "id": "http_415",
            "status": 415,
            "code": null,
            "when": "`UNSUPPORTED_MEDIA_TYPE`: send `Content-Type: application/json`.",
            "body": null,
            "global": true
        },
        {
            "id": "http_412",
            "status": 412,
            "code": null,
            "when": "`PRECONDITION_FAILED`: the record changed since your `If-Match`. Read it again.",
            "body": null,
            "global": true
        }
    ],
    "rateLimits": [],
    "webhooks": {
        "description": "",
        "configuredIn": null,
        "transport": [],
        "envelope": [],
        "signing": [],
        "delivery": [],
        "selection": "",
        "events": [
            {
                "name": "order",
                "slug": "order",
                "pagePath": "api/events/order",
                "summary": "order.placed, order.updated, order.status_changed, order.cancelled, order.completed, order.refunded",
                "trigger": "`data` is the order exactly as `GET /orders/{id}` returns it. `order.cancelled`\nadds `reason`. Every delivery carries `webhook-id`, `webhook-timestamp` and,\nwhen a signing secret is set, `webhook-signature` (Standard Webhooks) and\n`X-NextRestaurant-Signature`. Answer 2xx within 5 seconds; anything else is\nretried after 1m, 5m, 30m, 2h, 6h, 12h and 24h, with the same `webhook-id`.\nAnswer 410 to stop deliveries to this URL for that event.\n",
                "description": "",
                "testOnly": false,
                "fields": [],
                "payload": {
                    "id": "msg_7c1e0f3a9b2d4c6e8f0a1b2c3d4e5f60",
                    "type": "order.placed",
                    "event": "string",
                    "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"
                            }
                        ]
                    },
                    "timestamp": "2026-01-01T12:00:00Z"
                },
                "variants": []
            },
            {
                "name": "payment",
                "slug": "payment",
                "pagePath": "api/events/payment",
                "summary": "payment.captured, payment.failed, payment.refunded",
                "trigger": "`data` is the payment. `payment.failed` adds `error`; `payment.refunded` adds `refund` (id, amount, reason, reference).",
                "description": "",
                "testOnly": false,
                "fields": [],
                "payload": {
                    "id": "msg_7c1e0f3a9b2d4c6e8f0a1b2c3d4e5f60",
                    "type": "order.placed",
                    "event": "string",
                    "data": {
                        "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"
                    },
                    "timestamp": "2026-01-01T12:00:00Z"
                },
                "variants": []
            },
            {
                "name": "reservation",
                "slug": "reservation",
                "pagePath": "api/events/reservation",
                "summary": "reservation.created, .updated, .status_changed, .cancelled, .seated, .no_show",
                "trigger": "`data` is the reservation. A status change sends `reservation.status_changed`\nand, for cancelled / seated / no_show, the specific event as well — both with\n`previous_status`. Subscribe to whichever you need.\n",
                "description": "",
                "testOnly": false,
                "fields": [],
                "payload": {
                    "id": "msg_7c1e0f3a9b2d4c6e8f0a1b2c3d4e5f60",
                    "type": "order.placed",
                    "event": "string",
                    "data": {
                        "id": 1,
                        "reservation_number": "RES-000109",
                        "location_id": 1,
                        "customer_id": 1,
                        "area_id": 1,
                        "table_ids": [
                            1
                        ],
                        "guest_name": "string",
                        "guest_phone": "string",
                        "guest_email": "string",
                        "party_size": 1,
                        "reserved_at": "string",
                        "reserved_at_local": "string",
                        "duration_minutes": 1,
                        "status": "pending",
                        "deposit_amount": 1.5,
                        "special_requests": "string",
                        "source": "web",
                        "created_at": "string",
                        "updated_at": "string"
                    },
                    "timestamp": "2026-01-01T12:00:00Z"
                },
                "variants": []
            },
            {
                "name": "menuItemAvailability",
                "slug": "menu-item-availability",
                "pagePath": "api/events/menu-item-availability",
                "summary": "menu_item.availability_changed",
                "trigger": "An item became orderable or stopped being orderable at a location. `reason`\nis `manual` (admin screen), `api`, or `stock` (auto-86 when an ingredient\nran out, or its return).\n",
                "description": "",
                "testOnly": false,
                "fields": [],
                "payload": {
                    "id": "msg_7c1e0f3a9b2d4c6e8f0a1b2c3d4e5f60",
                    "type": "order.placed",
                    "event": "string",
                    "data": {
                        "item_id": 1,
                        "location_id": 1,
                        "title": "string",
                        "base_price": 1.5,
                        "price": 1.5,
                        "price_override": 1.5,
                        "published": true,
                        "available": true,
                        "is_86": true,
                        "eighty_six_until": "string",
                        "eighty_six_reason": "string",
                        "updated_at": "string"
                    },
                    "timestamp": "2026-01-01T12:00:00Z"
                },
                "variants": []
            },
            {
                "name": "stockLow",
                "slug": "stock-low",
                "pagePath": "api/events/stock-low",
                "summary": "stock.low",
                "trigger": "A stock level just dropped to or below its reorder point (sales, waste or a count).",
                "description": "",
                "testOnly": false,
                "fields": [],
                "payload": {
                    "id": "msg_7c1e0f3a9b2d4c6e8f0a1b2c3d4e5f60",
                    "type": "order.placed",
                    "event": "string",
                    "data": {
                        "stock_item_id": 1,
                        "location_id": 1,
                        "sku": "string",
                        "title": "string",
                        "unit": "kg",
                        "quantity": 1.5,
                        "par_level": 1.5,
                        "reorder_point": 1.5,
                        "low": true,
                        "is_86": true,
                        "last_counted_at": "string",
                        "updated_at": "string"
                    },
                    "timestamp": "2026-01-01T12:00:00Z"
                },
                "variants": []
            },
            {
                "name": "customer",
                "slug": "customer",
                "pagePath": "api/events/customer",
                "summary": "customer.created, customer.updated",
                "trigger": "`data` is the customer. Not sent for imported customers.",
                "description": "",
                "testOnly": false,
                "fields": [],
                "payload": {
                    "id": "msg_7c1e0f3a9b2d4c6e8f0a1b2c3d4e5f60",
                    "type": "order.placed",
                    "event": "string",
                    "data": {
                        "id": 1,
                        "code": "string",
                        "first_name": "string",
                        "last_name": "string",
                        "email": "string",
                        "phone": "string",
                        "marketing_opt_in": true,
                        "default_location_id": 1,
                        "tags": [
                            "string"
                        ],
                        "active": true,
                        "created_at": "string",
                        "updated_at": "string"
                    },
                    "timestamp": "2026-01-01T12:00:00Z"
                },
                "variants": []
            }
        ]
    },
    "seoOverview": {
        "title": "REST API Reference",
        "description": "Next Restaurant REST API reference: scoped API keys, locations and menu, orders, reservations, menu and stock changes, reporting, error codes and webhooks.",
        "keywords": "next restaurant api, rest api, openapi, api keys, scopes, joomla web services, restaurant api"
    },
    "seoEvents": {
        "title": "Webhooks",
        "description": "Next Restaurant webhooks: 19 events for orders, payments, reservations, menu and stock, and customers, with retries and signature verification.",
        "keywords": "webhooks, standard webhooks, hmac signature, order events, reservation events, payment events, retries"
    },
    "changelog": [],
    "generatedBy": "NextExtManager",
    "generated": "2026-11-12T16:14:53+00:00"
}