API Version 1.2
API Documentation for developers
Response message format
Overview:
Response data can be sent in 3 different formats: XML, JSON and YAML1 (all of these are returning the same set of data, but one of them has to be explicitly chosen during request, e.g. contacts list can be retrieved through URL /api/contacts.xyz, where xyz can be xml, json or yaml). Date, time and country codes are returned in the same way as they are required in request message format.
Every response document is a map/hash/associated table (name depends on the terminology of programming language used2) with the following elements:
| Element name | Content description |
| timestamp | Current server time |
| status | Status code of the operation result (0 means success, other codes mean fail); whole list of available status codes can be found in the end of this document. |
| message | Human-readable message associated with status element |
| data | Operation result; this element is optional and may not be present in the response. Every time, some operation result is described, it will be placed inside this element3 |
| tags | Optional element, provides information about current user tags state (i.e. names and usage counts). Every time, when it occurs, client view should be updated with this data. Element content will be described in one of the subsections below. |
| statuses | Optional element provides information about current contact statuses state (i.e. status types and usage counts). Every time it occurs, client view should be updated with this data. Element content will be described in one of the subsections below. |
| sales | Optional element, provides basic sales summary. Every time, when it occurs, client view should be updated with this data. Element content will be described in one of the subsections below. |
| notifications | Optional element, visible when user will reach some account restrictions. It’s an array of strings with following possible values:
|
- 1) If format will not be specified or it will be invalid, server will return empty response with "406 Not Acceptable" HTTP status code
- 2) A term hash will be used in this document
- 3) Please note, that even if some specific API method is not returning any data, optional elements can be still present in output data
