{"openapi":"3.0.3","info":{"title":"Rosuii Public API","description":"REST API for integrating your restaurant's Rosuii data with any third-party platform —\nyour own website/app, dispatch tools, aggregators or automations.\n\n### Authentication\nCreate an API key in **Panel → Settings → API access**, then send it with every request:\n\n```\nx-api-key: rsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n\n(`Authorization: Bearer rsk_…` also works.) The key identifies your restaurant — no other\ntenant information is needed.\n\n### Conventions\n- Base URL: `https://api.rosuii.com/v1`\n- JSON in/out, `snake_case` fields, amounts in BDT with 2 decimals.\n- Paginated lists return `{ data: [...], pagination: { page, per_page, total, last_page } }`.\n- Validation errors return **422** with `{ message, errors[] }`; plan limits return **402**.","version":"1.0.0"},"servers":[{"url":"https://api.rosuii.com"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{}},"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Restaurant","description":"Key verification / account info"},{"name":"Categories","description":"Menu categories"},{"name":"Menu items","description":"Menu items with variations, addons and images"},{"name":"Orders","description":"Create orders, track/update status, settle payments, dispatch riders"},{"name":"Riders","description":"Delivery riders"},{"name":"Reservations","description":"Table reservations"},{"name":"Staff","description":"Staff management"},{"name":"Customers","description":"CRM customers"},{"name":"Tables, branches & payment methods","description":"Reference data"}],"paths":{"/v1/oauth/register":{"post":{"operationId":"postV1OauthRegister","responses":{"200":{}}}},"/v1/oauth/client":{"get":{"operationId":"getV1OauthClient","responses":{"200":{}}}},"/v1/oauth/approve":{"post":{"operationId":"postV1OauthApprove","responses":{"200":{}}}},"/v1/oauth/token":{"post":{"operationId":"postV1OauthToken","responses":{"200":{}}}},"/v1/oauth/cleanup":{"get":{"operationId":"getV1OauthCleanup","responses":{"200":{}}}},"/v1/mcp":{"post":{"operationId":"postV1Mcp","tags":["MCP"],"summary":"Growth MCP (JSON-RPC)","description":"Model Context Protocol server for this restaurant's public profile, menu descriptions and website FAQ. Send JSON-RPC 2.0: initialize, tools/list, tools/call. Authenticate with x-api-key.","responses":{"200":{}}}},"/v1/me":{"get":{"operationId":"getV1Me","tags":["Restaurant"],"summary":"Who am I","description":"Returns the restaurant this API key belongs to. Use it to verify a key.","responses":{"200":{}}}},"/v1/categories":{"get":{"parameters":[{"description":"Set to `true` to return only active categories.","schema":{"type":"string"},"in":"query","name":"active","required":false}],"operationId":"getV1Categories","tags":["Categories"],"summary":"List categories","responses":{"200":{}}},"post":{"parameters":[],"operationId":"postV1Categories","tags":["Categories"],"summary":"Create a category","description":"The slug is generated automatically from the name.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"is_active":{"type":"boolean"},"sort_order":{"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"is_active":{"type":"boolean"},"sort_order":{"type":"number"}}}},"text/plain":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"is_active":{"type":"boolean"},"sort_order":{"type":"number"}}}}}},"responses":{"200":{}}}},"/v1/categories/{id}":{"get":{"operationId":"getV1CategoriesById","tags":["Categories"],"summary":"Get one category","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}},"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"patchV1CategoriesById","tags":["Categories"],"summary":"Update a category","description":"The slug stays stable when the name changes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"is_active":{"type":"boolean"},"sort_order":{"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"is_active":{"type":"boolean"},"sort_order":{"type":"number"}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"is_active":{"type":"boolean"},"sort_order":{"type":"number"}}}}}},"responses":{"200":{}}},"delete":{"operationId":"deleteV1CategoriesById","tags":["Categories"],"summary":"Delete a category","description":"⚠️ Deleting a category also deletes its menu items (database cascade).","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}}},"/v1/menu-items":{"get":{"parameters":[{"description":"Filter by category id.","schema":{"type":"string"},"in":"query","name":"category_id","required":false},{"description":"Set to `true` for active items only.","schema":{"type":"string"},"in":"query","name":"active","required":false},{"description":"Name contains …","schema":{"type":"string"},"in":"query","name":"search","required":false},{"description":"Page number (default 1).","schema":{"type":"string"},"in":"query","name":"page","required":false},{"description":"Rows per page, max 100 (default 25).","schema":{"type":"string"},"in":"query","name":"per_page","required":false}],"operationId":"getV1Menu-items","tags":["Menu items"],"summary":"List menu items","description":"Each item embeds its category, variations, addons, image URL and the computed `final_price` (null when the item is priced per variation).","responses":{"200":{}}},"post":{"parameters":[],"operationId":"postV1Menu-items","tags":["Menu items"],"summary":"Create a menu item","description":"Creates a simple (non-variation) item; variations/addons/images are managed from the panel. Subject to the plan's menu-item limit (402 when reached).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["category_id","name"],"properties":{"category_id":{"type":"number"},"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"regular_price":{"minimum":0,"type":"number"},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"description":"`fixed` (default) or `percentage`.","type":"string"},"is_active":{"type":"boolean"},"is_featured":{"type":"boolean"},"sort_order":{"type":"number"},"preparation_time":{"description":"Minutes.","type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["category_id","name"],"properties":{"category_id":{"type":"number"},"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"regular_price":{"minimum":0,"type":"number"},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"description":"`fixed` (default) or `percentage`.","type":"string"},"is_active":{"type":"boolean"},"is_featured":{"type":"boolean"},"sort_order":{"type":"number"},"preparation_time":{"description":"Minutes.","type":"number"}}}},"text/plain":{"schema":{"type":"object","required":["category_id","name"],"properties":{"category_id":{"type":"number"},"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"regular_price":{"minimum":0,"type":"number"},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"description":"`fixed` (default) or `percentage`.","type":"string"},"is_active":{"type":"boolean"},"is_featured":{"type":"boolean"},"sort_order":{"type":"number"},"preparation_time":{"description":"Minutes.","type":"number"}}}}}},"responses":{"200":{}}}},"/v1/menu-items/{id}":{"get":{"operationId":"getV1Menu-itemsById","tags":["Menu items"],"summary":"Get one menu item","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}},"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"patchV1Menu-itemsById","tags":["Menu items"],"summary":"Update a menu item","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"category_id":{"type":"number"},"regular_price":{"minimum":0,"type":"number"},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"type":"string"},"is_active":{"type":"boolean"},"is_featured":{"type":"boolean"},"sort_order":{"type":"number"},"preparation_time":{"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"category_id":{"type":"number"},"regular_price":{"minimum":0,"type":"number"},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"type":"string"},"is_active":{"type":"boolean"},"is_featured":{"type":"boolean"},"sort_order":{"type":"number"},"preparation_time":{"type":"number"}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"description":{"maxLength":255,"type":"string"},"category_id":{"type":"number"},"regular_price":{"minimum":0,"type":"number"},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"type":"string"},"is_active":{"type":"boolean"},"is_featured":{"type":"boolean"},"sort_order":{"type":"number"},"preparation_time":{"type":"number"}}}}}},"responses":{"200":{}}},"delete":{"operationId":"deleteV1Menu-itemsById","tags":["Menu items"],"summary":"Delete a menu item","description":"Past order lines keep their snapshot of the item name/price.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}}},"/v1/attendance/punches":{"post":{"operationId":"postV1AttendancePunches","tags":["Orders"],"summary":"Post attendance punches (bridge agent)","description":"Body { deviceId, punches: [{ deviceUserNo, time, direction, verifyMode, raw }] }, at most 1000 per call. The device must belong to this restaurant and the restaurant must have attendance devices switched on (Payroll plan). Duplicates are ignored, so a batch can safely be sent again.","responses":{"200":{}}}},"/v1/orders":{"get":{"parameters":[{"description":"pending | confirmed | preparing | ready | served | delivered | completed | cancelled","schema":{"type":"string"},"in":"query","name":"status","required":false},{"description":"unpaid | partial | paid","schema":{"type":"string"},"in":"query","name":"payment_status","required":false},{"description":"dine-in | takeaway | delivery","schema":{"type":"string"},"in":"query","name":"order_type","required":false},{"description":"assigned | picked_up | on_the_way | delivered | rejected","schema":{"type":"string"},"in":"query","name":"delivery_status","required":false},{"description":"YYYY-MM-DD (created from, inclusive).","schema":{"type":"string"},"in":"query","name":"from","required":false},{"description":"YYYY-MM-DD (created to, inclusive).","schema":{"type":"string"},"in":"query","name":"to","required":false},{"description":"Page number (default 1).","schema":{"type":"string"},"in":"query","name":"page","required":false},{"description":"Rows per page, max 100 (default 25).","schema":{"type":"string"},"in":"query","name":"per_page","required":false}],"operationId":"getV1Orders","tags":["Orders"],"summary":"List orders","responses":{"200":{}}},"post":{"parameters":[],"operationId":"postV1Orders","tags":["Orders"],"summary":"Create an order","description":"Server-trusted pricing: line prices, VAT/service charge, coupon and loyalty are computed from the restaurant's own data — item prices in the request body are ignored. Returns 402 when the plan's daily order limit is reached.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["order_type","items"],"properties":{"order_type":{"description":"dine-in | takeaway | delivery","type":"string"},"items":{"minItems":1,"type":"array","items":{"type":"object","required":["menu_item_id"],"properties":{"menu_item_id":{"type":"number"},"menu_variation_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"quantity":{"minimum":1,"type":"number"},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"addons":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"number"}}}}}}},"customer_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"maxLength":32,"description":"Existing customers are matched (and new ones created) by phone.","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"payment_method_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"description":"`fixed` (default) or `percentage`.","type":"string"},"service_charge_percentage":{"minimum":0,"type":"number"},"coupon_code":{"nullable":true,"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"status":{"description":"Initial status (default `pending`).","type":"string"},"payment_status":{"description":"Send `paid` to create the order as fully paid (records the ledger entry).","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["order_type","items"],"properties":{"order_type":{"description":"dine-in | takeaway | delivery","type":"string"},"items":{"minItems":1,"type":"array","items":{"type":"object","required":["menu_item_id"],"properties":{"menu_item_id":{"type":"number"},"menu_variation_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"quantity":{"minimum":1,"type":"number"},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"addons":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"number"}}}}}}},"customer_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"maxLength":32,"description":"Existing customers are matched (and new ones created) by phone.","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"payment_method_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"description":"`fixed` (default) or `percentage`.","type":"string"},"service_charge_percentage":{"minimum":0,"type":"number"},"coupon_code":{"nullable":true,"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"status":{"description":"Initial status (default `pending`).","type":"string"},"payment_status":{"description":"Send `paid` to create the order as fully paid (records the ledger entry).","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["order_type","items"],"properties":{"order_type":{"description":"dine-in | takeaway | delivery","type":"string"},"items":{"minItems":1,"type":"array","items":{"type":"object","required":["menu_item_id"],"properties":{"menu_item_id":{"type":"number"},"menu_variation_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"quantity":{"minimum":1,"type":"number"},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"addons":{"type":"array","items":{"type":"object","required":["id"],"properties":{"id":{"type":"number"}}}}}}},"customer_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"customer_name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"customer_phone":{"nullable":true,"anyOf":[{"maxLength":32,"description":"Existing customers are matched (and new ones created) by phone.","type":"string"},{"type":"null"}]},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"payment_method_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"discount_amount":{"minimum":0,"type":"number"},"discount_type":{"description":"`fixed` (default) or `percentage`.","type":"string"},"service_charge_percentage":{"minimum":0,"type":"number"},"coupon_code":{"nullable":true,"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"status":{"description":"Initial status (default `pending`).","type":"string"},"payment_status":{"description":"Send `paid` to create the order as fully paid (records the ledger entry).","type":"string"}}}}}},"responses":{"200":{}}}},"/v1/orders/{id}":{"get":{"operationId":"getV1OrdersById","tags":["Orders"],"summary":"Get one order (with line items)","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}}},"/v1/orders/{id}/status":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"patchV1OrdersByIdStatus","tags":["Orders"],"summary":"Update order status","description":"Cancelling an order whose recipe stock was deducted credits the ingredients back (and vice-versa on re-activation).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"description":"pending | confirmed | preparing | ready | served | delivered | completed | cancelled","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["status"],"properties":{"status":{"description":"pending | confirmed | preparing | ready | served | delivered | completed | cancelled","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["status"],"properties":{"status":{"description":"pending | confirmed | preparing | ready | served | delivered | completed | cancelled","type":"string"}}}}}},"responses":{"200":{}}}},"/v1/orders/{id}/mark-paid":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"postV1OrdersByIdMark-paid","tags":["Orders"],"summary":"Mark an order fully paid","description":"Settles the remaining due (records it into the payment-method ledger) and awards loyalty points on the unpaid → paid transition.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payment_method_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"payment_method_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]}}}},"text/plain":{"schema":{"type":"object","properties":{"payment_method_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"note":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{}}}},"/v1/orders/{id}/assign-rider":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"postV1OrdersByIdAssign-rider","tags":["Orders"],"summary":"Assign a delivery rider","description":"Delivery orders only. Pass `rider_id: null` to unassign.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rider_id"],"properties":{"rider_id":{"nullable":true,"anyOf":[{"description":"Staff id of an active rider, or null to unassign.","type":"number"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["rider_id"],"properties":{"rider_id":{"nullable":true,"anyOf":[{"description":"Staff id of an active rider, or null to unassign.","type":"number"},{"type":"null"}]}}}},"text/plain":{"schema":{"type":"object","required":["rider_id"],"properties":{"rider_id":{"nullable":true,"anyOf":[{"description":"Staff id of an active rider, or null to unassign.","type":"number"},{"type":"null"}]}}}}}},"responses":{"200":{}}}},"/v1/orders/{id}/delivery-status":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"patchV1OrdersByIdDelivery-status","tags":["Orders"],"summary":"Update delivery status","description":"`delivered` also marks the order itself delivered.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"description":"picked_up | on_the_way | delivered","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["status"],"properties":{"status":{"description":"picked_up | on_the_way | delivered","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["status"],"properties":{"status":{"description":"picked_up | on_the_way | delivered","type":"string"}}}}}},"responses":{"200":{}}}},"/v1/riders":{"get":{"operationId":"getV1Riders","tags":["Riders"],"summary":"List active riders","description":"Staff with the Rider type, with their current live-delivery count.","responses":{"200":{}}}},"/v1/reservations":{"get":{"parameters":[{"description":"Exact reservation date (YYYY-MM-DD).","schema":{"type":"string"},"in":"query","name":"date","required":false},{"description":"pending | confirmed | cancelled","schema":{"type":"string"},"in":"query","name":"status","required":false},{"description":"Page number (default 1).","schema":{"type":"string"},"in":"query","name":"page","required":false},{"description":"Rows per page, max 100 (default 25).","schema":{"type":"string"},"in":"query","name":"per_page","required":false}],"operationId":"getV1Reservations","tags":["Reservations"],"summary":"List reservations","responses":{"200":{}}},"post":{"parameters":[],"operationId":"postV1Reservations","tags":["Reservations"],"summary":"Create a reservation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customer_name","customer_phone","party_size","reservation_date","reservation_time"],"properties":{"customer_name":{"minLength":1,"maxLength":255,"type":"string"},"customer_phone":{"minLength":4,"maxLength":32,"type":"string"},"party_size":{"minimum":1,"type":"number"},"reservation_date":{"description":"YYYY-MM-DD","type":"string"},"reservation_time":{"description":"e.g. 19:30","type":"string"},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"special_requests":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"status":{"description":"pending (default) | confirmed | cancelled","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["customer_name","customer_phone","party_size","reservation_date","reservation_time"],"properties":{"customer_name":{"minLength":1,"maxLength":255,"type":"string"},"customer_phone":{"minLength":4,"maxLength":32,"type":"string"},"party_size":{"minimum":1,"type":"number"},"reservation_date":{"description":"YYYY-MM-DD","type":"string"},"reservation_time":{"description":"e.g. 19:30","type":"string"},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"special_requests":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"status":{"description":"pending (default) | confirmed | cancelled","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["customer_name","customer_phone","party_size","reservation_date","reservation_time"],"properties":{"customer_name":{"minLength":1,"maxLength":255,"type":"string"},"customer_phone":{"minLength":4,"maxLength":32,"type":"string"},"party_size":{"minimum":1,"type":"number"},"reservation_date":{"description":"YYYY-MM-DD","type":"string"},"reservation_time":{"description":"e.g. 19:30","type":"string"},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"special_requests":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"status":{"description":"pending (default) | confirmed | cancelled","type":"string"}}}}}},"responses":{"200":{}}}},"/v1/reservations/{id}":{"get":{"operationId":"getV1ReservationsById","tags":["Reservations"],"summary":"Get one reservation","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}},"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"patchV1ReservationsById","tags":["Reservations"],"summary":"Update a reservation","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_name":{"maxLength":255,"type":"string"},"customer_phone":{"maxLength":32,"type":"string"},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"party_size":{"minimum":1,"type":"number"},"reservation_date":{"type":"string"},"reservation_time":{"type":"string"},"status":{"description":"pending | confirmed | cancelled","type":"string"},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"special_requests":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"customer_name":{"maxLength":255,"type":"string"},"customer_phone":{"maxLength":32,"type":"string"},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"party_size":{"minimum":1,"type":"number"},"reservation_date":{"type":"string"},"reservation_time":{"type":"string"},"status":{"description":"pending | confirmed | cancelled","type":"string"},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"special_requests":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]}}}},"text/plain":{"schema":{"type":"object","properties":{"customer_name":{"maxLength":255,"type":"string"},"customer_phone":{"maxLength":32,"type":"string"},"customer_email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"party_size":{"minimum":1,"type":"number"},"reservation_date":{"type":"string"},"reservation_time":{"type":"string"},"status":{"description":"pending | confirmed | cancelled","type":"string"},"table_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"special_requests":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"notes":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{}}},"delete":{"operationId":"deleteV1ReservationsById","tags":["Reservations"],"summary":"Delete a reservation","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}}},"/v1/staff":{"get":{"parameters":[{"description":"admin | waiter | chef | staff | rider","schema":{"type":"string"},"in":"query","name":"type","required":false},{"description":"Set to `true` for active staff only.","schema":{"type":"string"},"in":"query","name":"active","required":false}],"operationId":"getV1Staff","tags":["Staff"],"summary":"List staff","description":"Password hashes are never returned.","responses":{"200":{}}},"post":{"parameters":[],"operationId":"postV1Staff","tags":["Staff"],"summary":"Create a staff member","description":"The password is bcrypt-hashed before storage. Creating `admin` accounts via the API is not allowed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email","password"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"email":{"minLength":3,"maxLength":255,"type":"string"},"password":{"minLength":6,"maxLength":100,"type":"string"},"type":{"description":"waiter | chef | staff (default) | rider","type":"string"},"phone":{"nullable":true,"anyOf":[{"maxLength":32,"type":"string"},{"type":"null"}]},"role_id":{"nullable":true,"anyOf":[{"description":"Panel role id (see Settings → Roles) controlling panel permissions.","type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"salary":{"nullable":true,"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}]},"joining_date":{"nullable":true,"anyOf":[{"description":"YYYY-MM-DD","type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","email","password"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"email":{"minLength":3,"maxLength":255,"type":"string"},"password":{"minLength":6,"maxLength":100,"type":"string"},"type":{"description":"waiter | chef | staff (default) | rider","type":"string"},"phone":{"nullable":true,"anyOf":[{"maxLength":32,"type":"string"},{"type":"null"}]},"role_id":{"nullable":true,"anyOf":[{"description":"Panel role id (see Settings → Roles) controlling panel permissions.","type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"salary":{"nullable":true,"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}]},"joining_date":{"nullable":true,"anyOf":[{"description":"YYYY-MM-DD","type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"}}}},"text/plain":{"schema":{"type":"object","required":["name","email","password"],"properties":{"name":{"minLength":1,"maxLength":255,"type":"string"},"email":{"minLength":3,"maxLength":255,"type":"string"},"password":{"minLength":6,"maxLength":100,"type":"string"},"type":{"description":"waiter | chef | staff (default) | rider","type":"string"},"phone":{"nullable":true,"anyOf":[{"maxLength":32,"type":"string"},{"type":"null"}]},"role_id":{"nullable":true,"anyOf":[{"description":"Panel role id (see Settings → Roles) controlling panel permissions.","type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"salary":{"nullable":true,"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}]},"joining_date":{"nullable":true,"anyOf":[{"description":"YYYY-MM-DD","type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"}}}}}},"responses":{"200":{}}}},"/v1/staff/{id}":{"get":{"operationId":"getV1StaffById","tags":["Staff"],"summary":"Get one staff member","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}},"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"patchV1StaffById","tags":["Staff"],"summary":"Update a staff member","description":"Admin accounts are protected from API modification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"maxLength":255,"type":"string"},"phone":{"nullable":true,"anyOf":[{"maxLength":32,"type":"string"},{"type":"null"}]},"type":{"description":"waiter | chef | staff | rider","type":"string"},"role_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"is_active":{"description":"Set false to deactivate (there is no staff DELETE).","type":"boolean"},"salary":{"nullable":true,"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}]},"joining_date":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"password":{"minLength":6,"maxLength":100,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"maxLength":255,"type":"string"},"phone":{"nullable":true,"anyOf":[{"maxLength":32,"type":"string"},{"type":"null"}]},"type":{"description":"waiter | chef | staff | rider","type":"string"},"role_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"is_active":{"description":"Set false to deactivate (there is no staff DELETE).","type":"boolean"},"salary":{"nullable":true,"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}]},"joining_date":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"password":{"minLength":6,"maxLength":100,"type":"string"}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"maxLength":255,"type":"string"},"phone":{"nullable":true,"anyOf":[{"maxLength":32,"type":"string"},{"type":"null"}]},"type":{"description":"waiter | chef | staff | rider","type":"string"},"role_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"branch_id":{"nullable":true,"anyOf":[{"type":"number"},{"type":"null"}]},"is_active":{"description":"Set false to deactivate (there is no staff DELETE).","type":"boolean"},"salary":{"nullable":true,"anyOf":[{"minimum":0,"type":"number"},{"type":"null"}]},"joining_date":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"password":{"minLength":6,"maxLength":100,"type":"string"}}}}}},"responses":{"200":{}}}},"/v1/customers":{"get":{"parameters":[{"description":"Name or phone contains …","schema":{"type":"string"},"in":"query","name":"search","required":false},{"description":"Page number (default 1).","schema":{"type":"string"},"in":"query","name":"page","required":false},{"description":"Rows per page, max 100 (default 25).","schema":{"type":"string"},"in":"query","name":"per_page","required":false}],"operationId":"getV1Customers","tags":["Customers"],"summary":"List customers","responses":{"200":{}}},"post":{"parameters":[],"operationId":"postV1Customers","tags":["Customers"],"summary":"Create a customer","description":"Phone numbers are unique per restaurant.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["phone_number"],"properties":{"phone_number":{"minLength":4,"maxLength":32,"type":"string"},"name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"dob":{"nullable":true,"anyOf":[{"description":"YYYY-MM-DD","type":"string"},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"type":"object","required":["phone_number"],"properties":{"phone_number":{"minLength":4,"maxLength":32,"type":"string"},"name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"dob":{"nullable":true,"anyOf":[{"description":"YYYY-MM-DD","type":"string"},{"type":"null"}]}}}},"text/plain":{"schema":{"type":"object","required":["phone_number"],"properties":{"phone_number":{"minLength":4,"maxLength":32,"type":"string"},"name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"dob":{"nullable":true,"anyOf":[{"description":"YYYY-MM-DD","type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{}}}},"/v1/customers/{id}":{"get":{"operationId":"getV1CustomersById","tags":["Customers"],"summary":"Get one customer","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{}}},"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"patchV1CustomersById","tags":["Customers"],"summary":"Update a customer","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"dob":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone_number":{"minLength":4,"maxLength":32,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"dob":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone_number":{"minLength":4,"maxLength":32,"type":"string"}}}},"text/plain":{"schema":{"type":"object","properties":{"name":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"email":{"nullable":true,"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}]},"dob":{"nullable":true,"anyOf":[{"type":"string"},{"type":"null"}]},"phone_number":{"minLength":4,"maxLength":32,"type":"string"}}}}}},"responses":{"200":{}}}},"/v1/tables":{"get":{"parameters":[{"description":"Filter by branch id.","schema":{"type":"string"},"in":"query","name":"branch_id","required":false}],"operationId":"getV1Tables","tags":["Tables, branches & payment methods"],"summary":"List tables","responses":{"200":{}}}},"/v1/branches":{"get":{"operationId":"getV1Branches","tags":["Tables, branches & payment methods"],"summary":"List branches","responses":{"200":{}}}},"/v1/payment-methods":{"get":{"operationId":"getV1Payment-methods","tags":["Tables, branches & payment methods"],"summary":"List payment methods","description":"Use these ids for `payment_method_id` when creating or settling orders.","responses":{"200":{}}}},"/v1/print-jobs/claim":{"post":{"parameters":[],"operationId":"postV1Print-jobsClaim","tags":["Kitchen printing"],"summary":"Claim pending kitchen tickets","description":"Leases up to `limit` tickets for this agent and returns their ESC/POS bytes, base64 encoded, with the printer to send them to. An empty array is the normal idle answer.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"description":"Name of the agent claiming, for the audit trail.","type":"string"},"limit":{"description":"How many jobs to lease at once (1-25, default 5).","type":"number"},"kitchens":{"description":"Kitchen ids this agent can print for. Send it when more than one agent runs at the venue, so each claims only its own stations. Omitted = every pending ticket.","type":"array","items":{"type":"number"}}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"agent":{"description":"Name of the agent claiming, for the audit trail.","type":"string"},"limit":{"description":"How many jobs to lease at once (1-25, default 5).","type":"number"},"kitchens":{"description":"Kitchen ids this agent can print for. Send it when more than one agent runs at the venue, so each claims only its own stations. Omitted = every pending ticket.","type":"array","items":{"type":"number"}}}}},"text/plain":{"schema":{"type":"object","properties":{"agent":{"description":"Name of the agent claiming, for the audit trail.","type":"string"},"limit":{"description":"How many jobs to lease at once (1-25, default 5).","type":"number"},"kitchens":{"description":"Kitchen ids this agent can print for. Send it when more than one agent runs at the venue, so each claims only its own stations. Omitted = every pending ticket.","type":"array","items":{"type":"number"}}}}}}},"responses":{"200":{}}}},"/v1/print-jobs/{id}/ack":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"operationId":"postV1Print-jobsByIdAck","tags":["Kitchen printing"],"summary":"Acknowledge a kitchen ticket","description":"Closes a claimed job. A failure keeps the real error text so the panel can say which printer is unreachable.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"description":"true when the bytes reached the printer.","type":"boolean"},"error":{"description":"Why it failed, shown to the restaurant.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"description":"true when the bytes reached the printer.","type":"boolean"},"error":{"description":"Why it failed, shown to the restaurant.","type":"string"}}}},"text/plain":{"schema":{"type":"object","required":["ok"],"properties":{"ok":{"description":"true when the bytes reached the printer.","type":"boolean"},"error":{"description":"Why it failed, shown to the restaurant.","type":"string"}}}}}},"responses":{"200":{}}}}}}