Errors
The finperks Giftcard API returns different HTTP error codes in the 4xx and 5xx ranges. When an error status is returned, the body contains JSON with more information about the error (except for some 5xx errors, which might contain non-JSON data).
Error responses contain a machine readable error code as well as a description providing some more details for human processing. Your API implementation should be prepared to handle new error codes. Never write code parsing error messages or use them for anything other than showing them to people. Error messages will change without announcement as it may clarify specific error cases.
General Errors
| HTTP Status | Class | Code | Description |
|---|---|---|---|
| 400 | invalid_format | invalid_request_body | The request body is not valid JSON or does not match the expected format. |
| 400 | invalid_format | invalid_request_body | The request body is not valid JSON or does not match the expected format. |
| 401 | auth | invalid_signature_format | The Signature value is not a valid hexadecimal string |
| 401 | auth | invalid_signature | The given KeyId is invalid or the signature does not match the provided data or was created using an invalid Key |
| 403 | forbidden | live_mode_disabled | The client is not enabled for live mode |
| 403 | forbidden | api_key_missing_required_scope | The API key does not have the required scope for this action |
| 403 | forbidden | request_blocked | The request has been blocked by the security rules/due to suspicious behaviour |
| 404 | not_found | path_not_found | Path not found |
| 400 | transport | invalid_date_header | The Date header is missing, invalid or too far away from current date. |
| 400 | transport | invalid_host_header | The given Host header does not match the expected value for this host. |
| 413 | transport | content_too_large | The request body is too large |
| 429 | rate_limit | rate_limit_exceeded | The rate limit for this client has been exceeded. See the Retry-After header for when to retry. |
| 500 | internal | internal_server_error | An unexpected error occurred on our side. Please try again later. |