Docs
Response Pattern

Response Patterns

Overview

This documentation describes the possible error codes that can be returned by the API when handling requests.

Success Codes

200 - OK

Description: Indicates that the request has been successfully completed and the server has returned the requested data.

204 - No Content

Description: Indicates that the request has been successfully completed and the client does not need to leave the current page.

Error Codes

400 - Bad Request

Description: This error code indicates that the server cannot or will not process the request due to something that is perceived as a client error (e.g., malformed request syntax, invalid request message formatting, or deceptive request routing).

Response Example:

{
  "error": "Bad Request",
  "message": "The mandatory parameters 'param1' and 'param2' are missing.",
  "code": 400
}

401 - Unauthorized

Description: This error code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.

Response Example:

{
  "error": "Unauthorized",
  "message": "Invalid credentials. Authentication required to access resources.",
  "code": 401
}

404 - Not Found

Description: This error code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists. A 404 status code does not indicate whether this lack of representation is temporary or permanent.

Response Example:

{
  "error": "Not Found",
  "message": "The requested resource could not be found.",
  "code": 404
}

500 - Internal Server Error

Description: Indicates that an unexpected error occurred on the server while processing the request.

Response Example:

{
  "error": "Internal Server Error",
  "message": "The server encountered an unexpected error while processing the request.",
  "code": 500
}