Errors and Status Codes

In general, there are 3 status code ranges you can expect when working with the API:

  • 2XX for a successful request
  • 4XX indicate an error related to something the client has sent to Routable
  • 5XX indicate a problem on Routable's side

All error responses come back in an RFC7807 Problem Detail compliant format.

{
  // An absolute URI that identifies the problem type and has
  // human-readable documentation.
  "type": "https://developers.routable.com/v1/error/validation-error",
  
  // A short, summary of the problem type.  
  "title": "Validation Error",
  
  // The HTTP status code generated by the origin server for this occurrence
  // of the problem.
  "status": 400,
  
  // A human readable explanation specific to this occurrence of the problem.
  "detail": "There were validation errors associated with your request.",
  
  // When applicable, a list of errors associated with the request
  "errors": [
      {
          "where": "body",
          "path": "/acting_team_member",
          "detail": "field required"
      }   
  ],
  
  // A request ID that can be sent to Routable's support team
  // to assist in debugging.
  "request_id": "c9339616-7d23-486c-872d-02b13c7ec619"
}
{
    "type": "https://developers.routable.com/v1/error/400",
    "title": "General Error",
    "status": 400,
    "detail": "Not enough funds in balance.",
    "request_id": "5687d5df-daca-4676-9488-532fbd4b8694"
}
{
    "type": "https://developers.routable.com/v1/error/validation-error",
    "title": "Validation Error",
    "status": 400,
    "errors": [
        {
            "where": "body",
            "path": "/acting_team_member",
            "detail": "field required"
        }
    ],
    "request_id": "c9339616-7d23-486c-872d-02b13c7ec619"
}
{
    "type": "https://developers.routable.com/v1/error/401",
    "title": "Unauthorized",
    "status": 401,
    "request_id": "4d38b901-60b8-4f84-aab6-3d5becf8d60a"
}
{
    "type": "https://developers.routable.com/v1/error/401",
    "title": "Conflict",
    "status": 409,
    "request_id": "4d38b901-60b8-4f84-aab6-3d5bec12345"
}
{
    "type": "https://developers.routable.com/v1/error/503",
    "title": "Service Unavailable",
    "status": 503,
    "detail": "Routable is currently in maintenance mode.",
    "request_id": "a6cb9901-b9c5-4542-ac2a-755f21adf1e7"
}

What’s Next