API Reference
URL
In the documentation, the endpoint of each API will be indicated with the path relative to the general API url:
Authentication
It is necessary to authenticate a query to any of our APIs by including the authorisation header with the token in the request:
Authorization: Bearer token
The token is a global variable within the Extension, and is the credential that will be used to identify yourself to our servers
Test token
In order to perform tests, for example using Postman, it is possible to generate a test authentication token.
To do so, it is necessary to have authorised the Development Version of Extension, and to obtain it from the Version box in the Developer space.
Remember that this token is for testing only and NOT to be included in the Extension code, as these tokens expire and are generated dynamically each time an Extension is executed.
Requests and Responses
Our APIs receive application/json
or application/x-www-form-urlencoded
content.
In the documentation of each API, you will find clarification of the
Content-Type
header to include in the call.
The content of the response, on the other hand, is always application/json
, except for APIs that are used to download content, such as images.
In the latter case, the type of response content is indicated in the Reference.
Response codes
All of our APIs include in the response JSON, the code
property whose value is an integer and indicates the result of the
of the request.
When the API operation is successful (HTTP status 200),
code=0
.
Each API has specific error codes, which are indicated in the API Reference.
All APIs share certain error codes:
| code | description||
|:------:|:------------|
| -1 | General error. Check correctly the data submitted and if the problem persists, please contact hi@auravant.com.|
| -2 | The token used to authenticate is expired.|
| -3 | The token used to authenticate is invalid.|
| -4 | This error is due to incorrect data formats. Check the data submitted correctly and if the problem persists, contact hi@auravant.com.|
| -5 | Usually occurs in APIs that consume data. This code indicates that some of the data submitted is not in the correct format or name, or data is missing. The msg
property is included in the response with readable information about the data producing the error.|
| -6 | Data integrity error|
| -7 | Data integrity error|