All API errors use the same structure to pass detailed information. Some errors have special HTTP status codes associated, but not all. So the best way to distinguish the situations is to check payload.
HTTP Response
In case of an error, the API returns an HTTP status different from 2xx, and a response body like this:
{
"status"
:
"error"
,
"error"
:
"ProductUnauthorizedException"
,
"error_details"
:
"Invalid token"
,
"error_user"
:
"ungültiger Token"
,
"code"
: 0,
"supportId"
:
"af545b27c2d1f0bfd51254a96ffe32c6"
}
The fields are:
Field | Type | Description |
---|---|---|
|
| Request status (always |
|
| Exception name (see below) |
|
| Error details |
|
| Error details in German |
|
| The ID of the error type (see Error Codes) |
|
| ID by which our help desk may find more information |
Error Values (Exceptions)
The exception names in the field error
are:
Name | Meaning |
---|---|
| External service error |
| Card or product is on a blacklist |
| Data already exist |
| Generic error |
| Validation error |
| Internal error |
| HTTP method used is not supported for this URL |
| Missing access rights |
| Card balance is exceeded |
| Unknown ID |
| Loyalty merchant card PIN was invalid |
| Invalid credentials or request limit exceeded |
| Authorization failed |
| Unknown URL |
| Update was not possible |
Error Codes
See next page Error Codes