Schema

Error

Body of a failed call: success, status, code, message. The request validator (an invalid body or parameter) and the unexpected errors also nest code and message in error, and the validator lists its findings in errors, one per invalid field; a few endpoint errors (MISSING_COUNTRY_CODE, INVALID_IDEMPOTENCY_KEY) only carry the nested error. Read code rather than message: messages may be French or English and can change.

Fields

  • successbooleanrequired
  • statusinteger
    HTTP status, repeated in the body
  • codestring
    Machine-readable code, e.g. VALIDATION_ERROR (400: a field of the body, query or path breaks its rule, such as a comma in a city or an address line over 38 characters; errors names the field), NO_TOKEN (401: no Authorization header), INVALID_AUTH_FORMAT, INVALID_API_KEY, INACTIVE_API_KEY, ACCOUNT_ACCESS_DENIED, SUBSCRIPTION_REQUIRED, INSUFFICIENT_FUNDS, ORDER_NOT_FOUND, FILE_NOT_FOUND, MISSING_TO_COUNTRY, TEST_ORDER_NOT_READY, RATE_LIMITED, SANDBOX_REQUIRES_TEST_KEY, INTERNAL_ERROR (500), and with an OAuth access token INVALID_TOKEN (401), INSUFFICIENT_SCOPE (403: a token of scope mcp on this API), ACCOUNT_ACCESS_DENIED (403) and SANDBOX_REQUIRES_TEST_KEY (403)
  • messagestring
  • inputsobject
    The values the error is about, when the endpoint gives them
  • errorobject
    Nested form of code and message, used by validation errors and unexpected errors
  • error.codestring
  • error.messagestring
  • errorsarray of object
    Validation findings (request validator): one entry per invalid field, path naming it
  • errors[].pathstring
  • errors[].messagestring
  • errors[].errorCodestring
Example
{
  "success": false,
  "status": 404,
  "code": "ORDER_NOT_FOUND",
  "message": "Order 987e6543-e21a-11d4-a789-0242ac120002 not found",
  "error": {
    "code": "VALIDATION_ERROR"
  },
  "errors": [
    {
      "path": "/body/shipTo/address/city"
    }
  ]
}