Qonversion uses HTTP response status codes to indicate the status of your API requests. If your request fails, Qonversion returns an error using the appropriate status code.
HTTP Response codes
Code | State | Description |
---|---|---|
200 | Success | Everything worked as expected. |
201 | Created | Everything worked as expected and operation execution has led to the creation of a resource. |
204 | No Content | Indicates that the server has successfully fulfilled the request and that there is no content to send in the response body |
400 | Bad Request | The request was not accepted, often due to a missing required parameter. Error could be due to malformed request syntax, invalid request message parameters, deceptive request routing, etc. |
401 | Unauthorized | Invalid API key provided. |
403 | Forbidden | Authorization by a secret key required. |
404 | Not Found | The requested resource doesn't exist, but may be available in the future. |
422 | Unprocessable Entity | Can not process the request further due to logical error in client's actions |
5xx | Server Errors | Something went wrong on Qonversion's end. (These are rare.) |
Error Types
Type | Description |
---|---|
| Error in request validation. Not enough data in the request; invalid data in the request; authorization required; too many requests. |
| The request is valid, but the action could not be executed due to some reason. |
| The client can execute the required action but there is an error in communicating with the application. |
| All request handling stages are successful, but there was an internal error. |
Error response example for invalid_data
:
{
"error": {
"type": "request",
"code": "invalid_data",
"message": "Failed validate request data"
},
"_meta": {
"reference": "https://documentation.qonversion.io/reference/handling-api-errors",
"fields": [
{
"name": "short_name",
"messages": ["Value is too long"]
},
{
"name": "last_name",
"messages": ["Required"]
}
]
}
}
Request
Code | Description |
---|---|
invalid_data | The request is recognized, but validation failed due to some parameters. |
invalid_request | Unrecognized request URL. |
control_unauthorized | Authorization is required to execute the request |
not_implemented | Functionality at the requested address is not implemented |
Resource
Code | Description |
---|---|
not_found | The requested resource is not found |
already_exists | The requested resource already exists |
Logical
Code | Description |
---|---|
purchase_fraud | Couldn't validate purchase with store request, potential fraud |
relation_not_found | Nested objects could not be found or associated with other entity |
Internal
Code | Description |
---|---|
storage_error | Data was not saved |
network_error | Internal services interaction failed |
unknown_error | Unknown reason |