deprecated
This guide is for the deprecated Flex.API. Please don't use it for new implementations.
See Integration Options, and feel welcome to ask our friendly help desk.
All responses by the Flex.API have three top-level elements, status
, data
, and errors
.
Example response of a successful query in JSON:
{
"status"
:
"ok"
,
"data"
: {
"hash"
:
"..."
,
"iframe_url"
:
"..."
},
"errors"
:
null
}
The response status
indicates whether the request was processed or not. There are three different options:
Status | Description |
---|---|
| The request to the flex.API was successful and the desired action was performed. The field |
| The requested action could not be performed, due to a technical error. Such errors indicate defects of the Flex.API or the client. The attention of a developer is required. You find details in the field |
| The desired action could not be performed. These are mostly validation errors, so the user should check the error messages. Again you find details in the field |
The structure of the data
field depends on the particular API endpoint.
Example response of a failed query:
{
"status"
:
"failed"
,
"data"
:
null
,
"errors"
: [
{
"code"
:
"0001"
,
"message"
:
"Invalid apikey"
}
]
}
If present, the errors
field is an array with pairs of code
and message
.
Attribute | Type | Description |
---|---|---|
|
| Machine-readable error code. See section Error Codes. |
|
| Human-readable error message. It is translated according to the |
Usually there is only one error reported. But your application should be prepared to process multiple messages.