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

request

Error in request validation. Not enough data in the request; invalid data in the request; authorization required; too many requests.

resource

The request is valid, but the action could not be executed due to some reason.

logical

The client can execute the required action but there is an error in communicating with the application.

internal

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": {
    "fields": [
      {
        "name": "short_name",
        "messages": ["Value is too long"]
      },
      {
        "name": "last_name",
        "messages": ["Required"] 
      }
    ] 
  }
}

Request

Code

Description

invalid_content

The data is not readable using the client content-type

invalid_header

The header format is supported, but it contained an invalid value

invalid_data

The request is recognized, but validation failed due to some parameters.
The parameters returned in _meta.validation.fields

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

The potential fraudulent actions with purchases detected

device_platform_unknown

OS of a device could exist but is not supported by Qonversion

relation_not_found

A user tries to save data in an object and uses a different object address that could not be found

duplicated_user

There's more than one user with requested ID

entitlement_already_paid

The requested entitlement cannot be created or removed because it has already been paid for by the user.

Internal

Code

Description

storage_error

Data was not saved

network_error

Internal services interaction failed

unknown_error

Unknown reason