Responses Codes & Errors
Our API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:
2xx Success
– The request was successfully processed.4xx Client Errors
– The request was invalid or cannot be processed due to issues such as missing parameters, authentication failures, or invalid data.5xx Server Errors
– The request could not be completed due to an issue on our end. These errors are rare, but if they occur, please try again later. If issue persist please contact our support.
Common Response Codes
Status Code | Description |
---|---|
200 OK | The request was successful, and the response contains the expected data. |
201 Created | The resource was successfully created. |
204 No Content | The request was successful, but there is no additional content to return. |
400 Bad Request | The request was invalid. This may happen if required parameters are missing or have incorrect values. |
401 Unauthorized | Authentication failed or the API token is invalid or missing. |
403 Forbidden | The request was valid, but the authenticated user does not have the necessary permissions. |
404 Not Found | The requested resource does not exist. |
409 Conflict | The request could not be processed due to a conflict (e.g., attempting to create a duplicate resource). |
422 Unprocessable Entity | The request was well-formed but contains semantic errors (e.g., validation errors on input data). |
500 Internal Server Error | An unexpected error occurred on our servers. Try again later, and if the issue persists, contact support. |
For error responses, the API returns a structured JSON object with details about the failure, including an error code and message to help diagnose the issue.
Expanding on Errors
Most times, when an API returns an error it will be paired with a ErrorType
to describe further what may have caused the error.
Order specific ErrorTypes
Error Type | Description |
---|---|
invalid_account | The provided account is not valid. Double-check the account passed. |
settings_restriction | Your Workspace restriction is restricting your request. More about restrictions here |
insufficient_balance | Workspace Account does not have sufficient balance for this transaction |
order_no_payment_type | Please specifiy a payment type to process the order request with |
invalid_amount | Amount specified is not a valid amount. |
General ErrorTypes
Error Type | Description |
---|---|
invalid_field | Some input values are not valid. |
invalid_format | Some input value is not in the correct format |
security_error | Trying to access a resource with unauthorized access. |
server_error | Something happened on our side. Please contact support if issue persists. |