REST API query and syntax examples

1. Query examples

Here is how a query is structured.


Reminder: you can find a list of all the resources accessible from the REST API here.

To get the number of contacts handled via the Chat channel in March 2017 :[website_id]=XXXX&key=xxxxxxxxxxxx&filters[indicators]=contact_number&filters[from]=2017-03-01&filters[to]=2017-03-30&filters[channel]=chat


To get the turnover associated with each transaction following a chat conversation in March 2017:



To get the turnover generated each day after contact via the Chat channel in March 2017 :[website_id]=XXXX&key=xxxxxxxxxxxx&filters[from]=2017-03-01&filters[to]=2017-03-31&filters[granularity]=day&filters[indicators]=transaction_after_contact_amount&filters[channel]=chat


Find a match between my agents' ID and their names :[website_id]=XXXX&key=xxxxxxxxxxxx&filters[from]=2017-03-01&filters[to]=2017-03-31&full=true


Find a match between a conversation type's ID and its name :[website_id]=XXXX&key=xxxxxxxxxx&filters[from]=2019-04-01&filters[to]=2019-04-15&full=true


Find the dates and times of call meeting slots that have been booked :[website_id]=XXXX&filters[channel]=chat&filters[from]=2019-06-01&filters[to]=2019-06-15&key=xxxxxxxxxxxfull=true&limit=100&page=XX


2. Useful syntax tips

Show as much detail as possible in the answers.

Adding &full=true allows you to deploy all the child objects of a parent object and access the maximum level of detail.



The results provided by our API are paginated for performance reasons. This pagination is detailed at the end of the answer provided by our API.

   "pagination": {

       "page": 1,

       "pages": 4,

       "limit": 20,

       "count": 79


  • "page": the number of the result page being currently displayed. If there are several pages, you will need to make as many queries as there are pages by adding at the end of the query &page=2, &page=3 etc.
  • "pages": the total number of result pages for the query formulated.
  • "limit": the number of results per page. This limit can be modified (set to be 100 as a maximum), for example, adding &limit=50 to your filters.
  • "count": the total number of response occurrences to the query sent.

In the example, we have 79 results spread over 4 pages and each contains a maximum of 20 results (For greater accuracy: 3 pages of 20 results and one page of 19 results).


Filter transactions to only get those generated following a chat conversation.

The iAdvize transaction tag tracks all transactions generated on your website. To only get information about the transactions generated following a conversation, you must add a filter to make sure the transactions displayed have an associated conversation_id.

To do so, you must add &filters[conversation_id]=!null at the end of your query (see, in the examples above, the example which mentions transactions).