Docs
View as Markdown

Errors

Every error has the same shape, with a code for your program and a message for a person.

Every error looks like this:

{
  "error": {
    "code": "time_gone",
    "message": "That time has just been taken. Ask for the free times again."
  },
  "request_id": "req_8f2c1a"
}

code is for your program and never changes meaning. message is written for a person and says what to fix: show it, or log it.

Status code What to do
400 not_json, bad_request Send a JSON object.
401 no_such_key, key_switched_off, key_ended Check the header; ask for a key.
403 not_allowed The key lacks the scope for this address.
403 not_your_practice The key does not cover that practice.
403 whole_organisation This address needs a key that covers every practice.
404 no_such_path, no_such_visit, no_such_booking Check the address or id.
405 wrong_method Check the method.
409 booking_off, feedback_off, feed_off The practice has switched that off.
409 time_gone That time was taken. Ask for the times again.
409 too_late, booking_cancelled, booking_past The booking can no longer be changed here.
413 too_large A request is 100,000 bytes at most.
422 refused Something about the details; the message is written for the person booking.
422 bad_*, *_needed The message says which field and why. Do not retry unchanged.
429 too_many_requests, booking_limit, practice_busy Wait Retry-After seconds.
500, 503 failed, unavailable Our side. Retry with a pause; repeats are safe.