Skip to main content

Errors

We use the HTTP status codes to communicate the result of a response. 2xx responses are successful, 4xx responses are failures due to provided information—e.g. a parameter was omitted—and 5xx responses are failures due to banca.me errors.

HTTP Status Code​

HTTP Status CodeDescription
200OK - The request was successful
201Created - The resource was successfully created
400Bad Request - A parameter has an invalid format, or the token is not your partner's current API token
401Unauthorized - The Authorization header is missing, or the token is malformed, expired or not signed by banca.me
403Forbidden - Your partner or partner entity is inactive, or your partner does not have the module the endpoint requires
404Not Found - The requested resource could not be found
409Conflict - The request conflicts with the current state of a resource
412Precondition Failed - A business precondition of the operation is not met
422Unprocessable Entity - The request was well-formed but its data failed validation
428Precondition Required - The resource is not in a state that allows the operation
429Too Many Requests - Rate limit exceeded on a rate-limited endpoint
500Internal Server Error - Something went wrong on our end
503Service Unavailable - banca.me or one of its data providers could not complete the request

Each endpoint lists the statuses it returns and what they mean for that endpoint.

Error object​

When an error occurs, banca.me will return an error object in the response body. Here's an example of the error structure:

{
"data": {
"status": 422,
"url": "/partner/pre-loan-request",
"ip": "203.0.113.10",
"partnerId": "5b0e7c41-2d93-4f8a-a1c6-9e47d2b80f35",
"message": "ERR_MISSING_BASIC_V2_DATA"
}
}

Error Object Attributes​

AttributeTypeDescription
statusnumberThe HTTP status code of the response. Left out when the error is unexpected; the response status is then 500.
urlstringPath of the request, including its query string.
ipstringIP address the request reached banca.me from.
partnerIdstringPartner the token belongs to. Left out when the token could not be read.
messagestringError code, for example ERR_MISSING_BASIC_V2_DATA. Only included on 422 and 500 responses.
detailsobjectAdditional information, for the errors that provide it.
appUrlstringValue of the request's Origin header, when the request sent one.
tokenIntention, preLoanRequestId, preApproveId, widgetMode, productType, partnerEntityIdstringTaken from the token when it carries them. API tokens don't carry them.

Error codes​

Only 422 and 500 responses include the error code in message. Responses with any other status don't include it, so handle those by their HTTP status.

Rate limits​

Some endpoints limit how many requests you can make in a short time window. When the limit is exceeded they answer 429 with a plain-text body (You have reached maximum retries in this timespan.) instead of the error object, and with the Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.