Skip to main content

Response shape

Every response uses the same envelope. On success, payload holds the result and error is null.
{
  "payload": { },
  "error": null
}
On failure, payload is null and error carries a machine readable code, a human readable message, a requestId, and, for validation failures, per field details.
{
  "payload": null,
  "error": {
    "code": "E_VALIDATION_FAILED",
    "message": "one or more fields are invalid",
    "requestId": "3D2mMaLHsT60sI5qyeHuBlS9TEM",
    "fields": {
      "doolaCustomerId": {
        "code": "E_CUSTOMER_ID_REQUIRED",
        "message": "customer id is required"
      }
    }
  }
}
Branch on error.code, not on message. Codes are stable; messages may change.

Global error reference

These can be returned by any endpoint. Endpoint specific codes are documented in the API reference.
HTTPCodeMeaning
400E_IDEMPOTENCY_KEY_REQUIREDMissing Idempotency-Key header
400E_IDEMPOTENCY_KEY_TOO_LONGIdempotency-Key exceeds the max length
400E_MALFORMED_JSONRequest body is not parseable JSON
400E_REQUEST_BODY_INVALIDBody is missing, malformed, or the wrong shape
401E_AUTH_MISSINGNo Authorization header present
401E_AUTH_INVALIDInvalid or expired key, or a key used on the wrong environment
403E_TENANT_SUSPENDEDPartner tenant is suspended; writes are rejected
405E_METHOD_NOT_ALLOWEDHTTP method not allowed for this resource
409E_IDEMPOTENCY_IN_PROGRESSSame idempotency key is still processing
409E_IDEMPOTENCY_KEY_REUSEDSame idempotency key used with a different body
500E_INTERNALUnexpected server error
503E_SEARCH_UNAVAILABLESearch backend unavailable (list and search endpoints)