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

CodeStatusMeaning
API_KEY_INVALID401The key is missing, wrong, revoked or expired.
ORIGIN_NOT_ALLOWED403A website key was used from a site not listed on it.
SCOPE_MISSING403The key does not have the scope this call needs.
SECRET_KEY_REQUIRED403This call needs a secret key.
BRANCH_FORBIDDEN403The key is limited to other branches.
ONLINE_BOOKING_OFF403This branch does not take online bookings.
PARTY_TOO_LARGE400Too many guests to book online; details.maxPartySize says the limit.
SLOT_INVALID400Not one of the times offered for that day. Ask for availability again.
PHONE_INVALID400The mobile number is not valid.
VALIDATION_FAILED400A field is missing or wrong; details lists each problem.
SLOT_FULL409Someone booked that time a moment ago. Offer the next free time.
RESERVATION_CLOSED409The booking can no longer be cancelled (seated, done or cancelled).
RESERVATION_NOT_FOUND404No such booking for this restaurant.
GUEST_NOT_FOUND404No guest with that mobile number.
RESTAURANT_UNAVAILABLE503The restaurant is not taking online orders or bookings right now.
TOO_MANY_REQUESTS429Slow 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.