Errors

In this guide, we will talk about what happens when something goes wrong while you work with the API.

You can tell whether your request was successful by checking the status code when receiving an API response. If a response comes back unsuccessful, you can use the status code and error message to figure out the issue.


Status codes

Here is a list of the different categories of status codes returned by the Orchestrate API. Use these to understand if a request was successful.

  • Name
    200
    Description

    200 OK indicates a successful response with a payload.

  • Name
    201
    Description

    201 Created indicates a successful response with a new resource created.

  • Name
    204
    Description

    204 No Content indicates a successful response with no content.

  • Name
    400
    Description

    400 Bad Request indicates that the request was malformed or invalid.

  • Name
    401
    Description

    401 Unauthorized indicates that the request was not authenticated.

  • Name
    403
    Description

    403 Forbidden indicates that the request was authenticated but not authorized.

  • Name
    404
    Description

    404 Not Found indicates that the requested resource was not found.

  • Name
    422
    Description

    422 Unprocessable Entity indicates that the request payload did not pass validation.

  • Name
    429
    Description

    429 Too Many Requests indicates that the request was rate limited.

  • Name
    4xx
    Description

    4xx status codes indicate that a client error has occurred, such as a malformed request.

  • Name
    5xx
    Description

    5xx status codes indicate that the server encountered an error while processing your request.


Error response

Whenever a request is unsuccessful, the Orchestrate API will return an error response with a message field. You can use this information to better understand what has gone wrong and how to fix it. In most cases, the error message will be helpful and actionable.

Here is an example of an error response:

Error response (404 Not Found)

{
  "message": "Payment not found.",
}

Was this page helpful?