Troubleshooting the API
A brief summary of the most common error codes and how to deal with them
While developing your solutions using Flanks API, the following error codes may be returned by several endpoints. This reference aims to provide insight about the underlying errors and their common causes.
The following codes defined provide extra information of possible errors. They are returned at the JSON response among the other fields depending of the endpoint called.
ERROR NAME | ERROR CODE | CAUSE | ACTION |
---|---|---|---|
INCOMPLETE | 20001 |
| Open a ticket and our support team will be happy to help you. |
PROCESSING | 20002 |
| Wait until the data you are asking for has been retrieved. You can poll the v0/credentials/status endpoint |
SCA_ERROR | 20003 |
| This error can be only if you are a regulated entity and you are not using the Flanks Link to connect credentials. |
CONFIGURATION_ERROR | 40001 |
| Review the request headers, query parameters and or body content. |
BANK_ERROR | 50001 |
| This error can be only if you are a regulated entity and you are not using the Flanks Link to connect credentials.The website of the bank is not available, you should try later. |
CREDENTIALS_ERROR | 50002 |
| This error can be only if you are a regulated entity and you are not using the Flanks Link to connect credentials. You can review the introduced credentials and try again. |
SCA_REQUIRED | 50003 |
| This error can be only if you are a regulated entity and you are not using the Flanks Link to connect credentials. You need to ask your user to the 2FA in order to finish the connection of credentials. |
200 OK
The requested operation was completed successfully.
These responses may contain a brief
message
indicating the operation performed and its result.For example, when creating a
credentials_token
, a successful response would be:{
"credentials_token": "<CREDENTIALS_TOKEN>",
"message": "User created successfully"
}
202 ACCEPTED
Token delayed during security checks.
When retrieving a
credentials_token
from a Link code, you may receive this response. This means the operation was successfully completed and Flanks is performing several security checks.{
"message": "Token is delayed during security checks",
"credentials_token": "<CREDENTIALS_TOKEN>",
"error_code": 20003
}
400 BAD REQUEST
Missing fields
The query payload is missing one or more of the required parameters or fields.
The error message will provide information about which fields are missing:
{
"error": "Missing fields: <LIST_OF_MISSING_FIELDS>",
"error_code": 40001
}
Invalid parameter
A provided parameter was invalid.
The error message follows this schema:
{
"error": "Invalid <PARAMETER>",
"error_code": 40001
}
Invalid parameter: an element does not exist
An element identified by a provided parameter does not exist.
For instance, while retrieving an Application by name, the error message would be similar to:
{
"error": "An application with this name does not exist",
"error_code": 40001
}
Retrieving user data
The process of data retrieval has not finished yet.
Please wait a moment.
{
"error": "Retrieving user data. Please try again in a moment.",
"error_code": 20002
}
Data is not available
Some error has occurred retrieving data.
Our system will notify us but you can contact [email protected] if the error persists.
{
"error": "User data not available. Please try again later.",
"error_code": 20001
}
Data quality and security check in process
Randomly the system selects a credentials_token (when it is created) and our team verifies data quality.
{
"error": "Making security checks. Your account will be activated in 24-48 hours.",
"error_code": 20003
}
401 UNAUTHORIZED
Invalid credentials
The provided authentication credentials were invalid.
The message follows this schema:
{
"error": "Invalid credentials",
}
Or:
{
"error": "Not authenticated",
}
405 METHOD NOT ALLOWED
Endpoint with invalid method
You are trying to access an endpoint with an invalid HTTP method. Check the API Docs and try again.
{
"error": "Method not allowed",
}
409 CONFLICT
An element already exists
You are trying to create an element which already exists.
For instance, when creating an Application with an already existing name, the error message would be similar to:
{
"error": "An application with this name already exists",
"error_code": 40001
}
415 UNSUPPORTED MEDIA TYPE
The provided payload does not comply with the expected content type.
This error message indicates that the endpoint received data with an invalid format.
Check that the
Content-Type
header is set accordingly. Generally, it is application/json
. When uploading files, check that the
Content-Type
header is set to multipart/form-data
. This error may also arise when the file content does not match the file extension; for instance, when uploading a XML file with a .pdf
extension.{
"error": "Not matching body content type",
}
500 INTERNAL SERVER ERROR
Server error
This is an internal error. The error message will provide as much information as possible to ease troubleshooting.
{
"error": "<DESCRIPTIVE_ERROR_MESSAGE>",
}
If any field of a response could not be retrieved from the entity or calculated afterwards it's value will be set to
null
.Last modified 1mo ago