For a detailed description of the individual functions, go to the page: Описание функций API
An example of GET-request (to get the number of bonuses by phone number):
A successful query returns JSON of the form:
{
'status': 'DONE' | 'ERROR', /\*
Required field.
Request execution status.
The current version of the API can take two values:
'DONE' - the request was successful and the response contains
an object 'response' with performance result,
'ERROR' - the request could not be executed and the response contains
an object 'error' with a description of the error. \*/
'debug': { /\*
Optional field.
Request Information.
Returns if in the query
the debug parameter is present\_mode \*/
'remote\_ip': 'remote\_ip', /\*
Required field.
IP-address, from which the request came. \*/
},
response: { /\*
Optional field.
Query result.
The content depends on the specific API function
Returns only if the request is successful. \*/
},
error: { /\*
Optional field.
Description of the error resulting from the query.
Returns if the request failed. \*/
kind: 'ERROR\_KIND', /\*
Required field.
Type of error.
The current version of the API can take the following values:
'MISSING\_ARGUMENT' - the request does not contain the mandatory parameter,
'INVALID\_ARGUMENT' - one or more query parameters are incorrectly passed,
'NOT\_IMPLEMENTED' - function is not implemented on the current server,
'BAD\_REQUEST' - There is an error in the query format,
'ACCESS\_DENIED' - insufficient permissions to execute the request,
'INTERNAL\_ERROR' - internal API function error,
'NO\_DATA' - no data available on request. \*/
message: 'Description' /\*
Optional field.
Detailed description of the error. \*/
}
}
An example of the answer (to get the number of customer bonuses by phone number):
{
"status": "DONE",
"response":
{
"bonus": 0,
"phone": "891112223344"
}
}