{"openapi":"3.1.0","info":{"title":"Laravel API","version":"1.0.0","description":"Orders and menus for one restaurant. Money is in minor units with the currency; names are {\"en\",\"ar\"}; times are ISO 8601 UTC."},"servers":[{"url":"https:\/\/www.dhawq.net\/api\/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key from Workspace \u2192 API keys."}},"responses":{"Problem":{"description":"Error","content":{"application\/json":{"example":{"error":{"code":"unauthenticated","message":"\u2026"}}}}}}},"paths":{"\/orders":{"get":{"summary":"List orders","description":"Newest first, 25 per page (up to 100). Follow next_cursor for the next page.","security":[{"bearer":["orders:read"]}],"parameters":[{"name":"status","in":"query","required":false,"description":"Comma-separated: pending_payment, scheduled, received, preparing, ready, picked_up, cancelled","schema":{"type":"string"}},{"name":"branch","in":"query","required":false,"description":"Branch code","schema":{"type":"string"}},{"name":"since","in":"query","required":false,"description":"ISO 8601 time; orders placed at or after it","schema":{"type":"string"}},{"name":"per_page","in":"query","required":false,"description":"1\u2013100","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"next_cursor from the previous page","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Missing or revoked key","$ref":"#\/components\/responses\/Problem"},"403":{"description":"The key lacks the scope"},"404":{"description":"Not found in this restaurant"},"429":{"description":"Rate limit reached; see Retry-After"}}}},"\/orders\/{id}":{"get":{"summary":"Get one order","description":"The order with its items, totals, branch and times.","security":[{"bearer":["orders:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Missing or revoked key","$ref":"#\/components\/responses\/Problem"},"403":{"description":"The key lacks the scope"},"404":{"description":"Not found in this restaurant"},"429":{"description":"Rate limit reached; see Retry-After"}}}},"\/orders\/{id}\/status":{"post":{"summary":"Move an order along","description":"preparing, ready, picked_up (only when paid) or cancelled (with a reason). Same rules as the staff screens; a refused move answers 409.","security":[{"bearer":["orders:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Missing or revoked key","$ref":"#\/components\/responses\/Problem"},"403":{"description":"The key lacks the scope"},"404":{"description":"Not found in this restaurant"},"429":{"description":"Rate limit reached; see Retry-After"},"409":{"description":"The move is not allowed right now"},"422":{"description":"Invalid input"}},"requestBody":{"required":true,"content":{"application\/json":{"example":{"status":"ready","reason":null}}}}}},"\/branches":{"get":{"summary":"List branches","description":"Codes, bilingual names and locations.","security":[{"bearer":["menu:read"]}],"parameters":[],"responses":{"200":{"description":"OK"},"401":{"description":"Missing or revoked key","$ref":"#\/components\/responses\/Problem"},"403":{"description":"The key lacks the scope"},"404":{"description":"Not found in this restaurant"},"429":{"description":"Rate limit reached; see Retry-After"}}}},"\/branches\/{code}\/menu":{"get":{"summary":"Branch menu right now","description":"Categories and products with the branch price, availability and the reason when unavailable.","security":[{"bearer":["menu:read"]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Missing or revoked key","$ref":"#\/components\/responses\/Problem"},"403":{"description":"The key lacks the scope"},"404":{"description":"Not found in this restaurant"},"429":{"description":"Rate limit reached; see Retry-After"}}}},"\/branches\/{code}\/products\/{id}\/availability":{"put":{"summary":"Switch a product on or off","description":"available, out_of_stock_today (back by itself at local midnight) or not_served.","security":[{"bearer":["menu:write"]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Missing or revoked key","$ref":"#\/components\/responses\/Problem"},"403":{"description":"The key lacks the scope"},"404":{"description":"Not found in this restaurant"},"429":{"description":"Rate limit reached; see Retry-After"},"409":{"description":"The move is not allowed right now"},"422":{"description":"Invalid input"}},"requestBody":{"required":true,"content":{"application\/json":{"example":{"status":"out_of_stock_today"}}}}}}},"webhooks":{"order.created":{"post":{"summary":"order.created","description":"Signed with X-DTP-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>.","responses":{"2XX":{"description":"Received"}}}},"order.status_changed":{"post":{"summary":"order.status_changed","description":"Signed with X-DTP-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>.","responses":{"2XX":{"description":"Received"}}}},"payment.succeeded":{"post":{"summary":"payment.succeeded","description":"Signed with X-DTP-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>.","responses":{"2XX":{"description":"Received"}}}},"payment.refunded":{"post":{"summary":"payment.refunded","description":"Signed with X-DTP-Signature: t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with the endpoint secret>.","responses":{"2XX":{"description":"Received"}}}}}}