Errors
Errors use standard HTTP status codes and always have this shape:
{ "error": { "type": "unprocessable", "code": "coupon_invalid", "message": "This coupon has expired.", "requestId": "req_3B91l8N4Ja2w", "details": { "reason": "expired" } }}codeis stable: use it in your code.messageis plain English you can show or log.detailsis present for some errors (for example the invalid fields, or the new quote forprice_changed).- Every response, success or error, has an
X-Request-Idheader. Include it when you email restro@alws.in.
| Status | code |
Meaning |
|---|---|---|
| 400 | invalid_request |
The body or query is invalid. details.fields lists each problem. |
| 400 | invalid_idempotency_key |
Idempotency-Key must be 8 to 100 characters: letters, digits, . _ : -. |
| 401 | missing_api_key |
No Authorization: Bearer … header. |
| 401 | invalid_api_key |
The key is wrong or malformed. |
| 401 | api_key_revoked |
The key was revoked in ALWS RESTRO. |
| 403 | origin_not_allowed |
A publishable key was used on a website not in its allowed list. |
| 403 | secret_key_in_browser |
A secret key was sent from a browser. Use it only on your server. |
| 403 | secret_key_required |
This action needs a secret key. |
| 403 | business_suspended |
The restaurant’s ALWS RESTRO account is suspended. |
| 404 | not_found |
No such order or booking for this business, or the access token is missing or wrong. |
| 404 | route_not_found |
No such endpoint. |
| 405 | method_not_allowed |
Wrong HTTP method for this endpoint. |
| 409 | price_changed |
expectedTotal no longer matches; details.quote has the new prices. |
| 409 | cannot_cancel |
The restaurant has already started the order, or the booking has started. |
| 409 | amount_mismatch |
The paid amount is not the order total. |
| 409 | not_awaiting_payment |
The order is not waiting for an online payment. |
| 409 | table_unavailable / no_table_available |
The table, or every table, is booked for that time. |
| 409 | idempotency_conflict |
The Idempotency-Key was used before with a different request. |
| 409 | request_in_progress |
A request with this Idempotency-Key is still running. Retry in a few seconds. |
| 409 | busy |
Another booking for the same table was being saved. Retry. |
| 413 | body_too_large |
The body is over 64 KB. |
| 422 | item_unavailable |
Some items are not on the menu or are switched off. details.itemIds lists them. |
| 422 | coupon_invalid |
See details.reason: not_found, inactive, expired, not_applicable. |
| 422 | invalid_schedule |
scheduledFor is in the past or more than 7 days ahead. |
| 422 | slot_in_past / slot_too_far |
Booking time has passed, or is more than 60 days ahead. |
| 422 | no_tables / table_not_found |
The restaurant has no tables set up, or the tableId does not exist. |
| 429 | rate_limited |
Too many requests. Wait for Retry-After seconds. |
| 500 | internal_error |
Something failed on our side. Retry with the same Idempotency-Key. |
