# HTTP Status codes

Info icon

Information – Treezor API Status available at all times

A real-time status of the Treezor API services is available at treezor.statuspage.io (opens new window).

Our API returns an HTTP Status Code that represents how your request generally went. It points you to the general direction of the issue (if any).

The table below details the meaning of each HTTP Status Code and possible solutions.

HTTP Code Status name Meaning Solution
200 OK The most common code, everything is fine None needed
201 Created The resource has been created by the API None needed
204 No content The server handled successfully but did not produce a response This can be a normal behavior with POST requests
400 Bad request Something is wrong with your request itself Your parameters or payload might be erroneous, check Swagger documentation for the endpoint
401 Authentication problem The provided JWT is not valid. Check if the JWT is properly set in the Authorization header and make sure that it is hasn't expired
403 Authorization problem You do not have access to this endpoint. Check your JWT scopes and Swagger documentation for that endpoint to check what scope is required
404 Not found The endpoint was not found or the resource was not found Make sure the object's ID you are requesting is valid and exists
500 Treezor Connect server error Our servers failed while handling your request, Try again and/or look at the response's payload, it can provide more information regarding the cause
501 Not implemented The endpoint called is not implemented or not implement with your Treezor Connect configuration Make sure the endpoint is correct, or contact your Treezor Account Manager to enable the feature
502|504|522 Bad gateway Our servers didn't respond in a timely manner Try again or contact the Treezor Support team if the error persists
Warning icon

Important – If you're not receive any response, you may check that

  • You are using HTTPS, as Treezor doesn't automatically upgrade HTTP to HTTPS.
  • Your IP has been declared to Treezor (when using the Production environment).

Alongside the HTTP Status code, the API will generally return one or more Errors objects in a json array.

These objects contain detailed information to help understand and debug the situation. They are always provided in English.

Lock icon

Security – Don't display any part of these errors to your end user

This could leak sensitive information. You should create your own generic error messages.

# Error attributes

Errors have the following attributes

Field Type Description Nullable
type string Machine readable type (authentication, request format ...) No
code string Machine readable code (expired JWT, missing parameter...) No
message string Human readable explanation No
docUrl string URL of the relevant documentation page No
requestId string Unique identifier of the error, to help Treezor trace back the error No

Example of a response containing a single error.

# Error types

The type attribute may take the following values.

Type Description
invalid_client Client is not valid
invalid_grant Issue with the user credentials or permissions
invalid_request Request is malformed: Invalid Option, Input validation not passed
unexpected_internal_server_error Something unexpected happened
unsupported_grant_type Issue with the grant_type which may not be recognized or supported by the server

# Error codes

The code attribute may take the following values.

Code Description Solution
authentication_error An authentication error occured Check that your JWT hasn't expired or isn't invalid
authorization_error Core Banking returned an unauthorized error
functional_error A Core Banking functional error occured Make sure that all the functionnal requirements for the action are met
input_validation_error Input validation failed Double check the provided parameters format and content
invalid_parameter_in_request An unexpected request parameter was found Check that you don't have non-allowed parameters in your request
invalid_user_id The provided User ID is invalid. Check that the User ID is correct (either uuid trzconnectUser or int Treezor userId)
resource_not_found_error The resource was not found Make sure the object or endpoint you are trying to access actually exists
undefined_cursor_error Undefined cursor Check the pagination or cursor documentation
unexpected_error An unexpected error occured Try again or contact Treezor if the error persists
0 The requested URL is malformed Make sure no trailing / exists when they shouldn't (or the opposite)
Updated on: 5/2/2024, 1:05:54 PM