Errors and limits
Error format
Errors use normal HTTP status codes and always have a stable code you can branch on, and a message you can show to people.
409 Conflict
{
"error": {
"code": "SLOT_FULL",
"message": "That time was just taken. Please pick another."
}
}Codes
| Code | Status | Meaning |
|---|---|---|
API_KEY_INVALID | 401 | The key is missing, wrong, revoked or expired. |
ORIGIN_NOT_ALLOWED | 403 | A website key was used from a site not listed on it. |
SCOPE_MISSING | 403 | The key does not have the scope this call needs. |
SECRET_KEY_REQUIRED | 403 | This call needs a secret key. |
BRANCH_FORBIDDEN | 403 | The key is limited to other branches. |
ONLINE_BOOKING_OFF | 403 | This branch does not take online bookings. |
PARTY_TOO_LARGE | 400 | Too many guests to book online; details.maxPartySize says the limit. |
SLOT_INVALID | 400 | Not one of the times offered for that day. Ask for availability again. |
PHONE_INVALID | 400 | The mobile number is not valid. |
VALIDATION_FAILED | 400 | A field is missing or wrong; details lists each problem. |
SLOT_FULL | 409 | Someone booked that time a moment ago. Offer the next free time. |
RESERVATION_CLOSED | 409 | The booking can no longer be cancelled (seated, done or cancelled). |
RESERVATION_NOT_FOUND | 404 | No such booking for this restaurant. |
GUEST_NOT_FOUND | 404 | No guest with that mobile number. |
RESTAURANT_UNAVAILABLE | 503 | The restaurant is not taking online orders or bookings right now. |
TOO_MANY_REQUESTS | 429 | Slow down; see the limits below. |
Rate limits
- 120 requests a minute from one IP address for reading (restaurant, menu, availability, bookings).
- 20 bookings a minute from one IP address.
- Over the limit you get
429; wait a few seconds and try again. Cache the menu and restaurant details for a few minutes rather than fetching them on every page view.
CORS
The Open API answers browser requests from any origin, without cookies. Website keys check the page's Origin against the sites listed on the key, so a copied key does not work elsewhere.