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

CodeStateDescription
200SuccessEverything worked as expected.
201CreatedEverything worked as expected and operation execution has led to the creation of a resource.
204No ContentIndicates that the server has successfully fulfilled the request and that there is no content to send in the response body
400Bad RequestThe 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.
401UnauthorizedInvalid API key provided.
403ForbiddenAuthorization by a secret key required.
404Not FoundThe requested resource doesn't exist, but may be available in the future.
422Unprocessable EntityCan not process the request further due to logical error in client's actions
5xxServer ErrorsSomething went wrong on Qonversion's end. (These are rare.)

Error Types

TypeDescription
requestError in request validation. Not enough data in the request; invalid data in the request; authorization required; too many requests.
resourceThe request is valid, but the action could not be executed due to some reason.
logicalThe client can execute the required action but there is an error in communicating with the application.
internalAll 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

CodeDescription
invalid_dataThe request is recognized, but validation failed due to some parameters.
The parameters returned in _meta.validation.fields
invalid_requestUnrecognized request URL.
control_unauthorizedAuthorization is required to execute the request
not_implementedFunctionality at the requested address is not implemented

Resource

CodeDescription
not_foundThe requested resource is not found
already_existsThe requested resource already exists

Logical

CodeDescription
purchase_fraudCouldn't validate purchase with store request, potential fraud
relation_not_foundNested objects could not be found or associated with other entity

Internal

CodeDescription
storage_errorData was not saved
network_errorInternal services interaction failed
unknown_errorUnknown reason