Skip to content

Responses and errors

Every answer, success or failure, has the same four fields:

{ "isSuccess": true, "errorCode": 0, "message": "OK", "data": {} }
  • isSuccess is true exactly when the HTTP status is below 400.
  • errorCode is 0 on success; otherwise it says exactly what went wrong.
  • message is always safe to show to a guest.
  • data is the answer, or null on a failure.

A list is always data.items. Every answer carries an X-Request-Id header: quote it if you contact us.

A request with a mistake answers 400 with errorCode 1001, and data.fields names every field that is wrong:

{
"isSuccess": false,
"errorCode": 1001,
"message": "Please check the highlighted fields",
"data": { "fields": [{ "field": "guest.email", "message": "Invalid email address" }] }
}
errorCodeHTTPNameWhat it means
0200, 201OKIt worked. data holds the answer.
1001400VALIDATION_ERRORSomething in the request is not right. data.fields names each field and why.
1002400INVALID_BODYThe body is not valid JSON.
2001401UNAUTHENTICATEDNo key, or not a live one: check it, or create a new one in Settings → Developers.
2003403FORBIDDENThe key may not do this from here: a publishable key from a website it does not list, a secret key from a browser, or a publishable key on a secret-only endpoint.
3001404NOT_FOUNDNo such property, room or request in your workspace.
4001409CONFLICTThe Idempotency-Key was already used for a different booking request.
4002409DATES_UNAVAILABLEThose dates are no longer available.
5001429RATE_LIMITEDToo many calls. Wait for the number of seconds in Retry-After, then try again.
9001500INTERNALOur fault. Try again later, and quote the X-Request-Id header if you contact us.

New codes may be added. Treat a code you do not know by its HTTP status.

  • Ids are UUID strings.
  • Dates are YYYY-MM-DD; a stay’s checkOut is the morning the guest leaves, so a stay from the 20th to the 23rd is three nights.
  • Money is a decimal string, such as "120.00", always beside its currency (ISO 4217). Never a number, so it is never rounded.
  • Boards are RO room only, BB bed and breakfast, HB half board, FB full board and AI all inclusive.

Within v1 we only add: new endpoints, new optional fields, new error codes. Ignore fields you do not know. See the changelog.