New data are available to these endpoints every 15 minutes.
In, Out and Difference Metrics
This resource returns the number of visits at a store, the number of visits out of the store (exits) and the difference between these two numbers in minute granularity for the requested time interval.Resource [GET]
[/bi/acquisition-metrics/visits/]
This resource supports pagination. Due to increased data volume, adding pagination to this resource allows fetching data in batches (pages) for a specific time interval.
URL Parameters
store_codeThe store code - Optionaldatetime_gteA date string (in UTC) to be used as greater than or equal for filtering - Requireddatetime_lteA date string (in UTC) to be used as less than or equal for filtering - Requiredpage_sizeThe number of results in each page of the response - Optional Default value is used when param is not givenpageThe number of the page of the response - Optional Needed only when response is paginated
Note : Default page_size = 1000. Maximum page_size = 10000
Response
The response is paginated. Thecount property shows the total results of the query. The next property contains the link of the subsequent page in case there is any - otherwise it has null value. Likewise with previous property. Finally, the results property contains the array of sessions either for a page or for the entire result. If page_size (default or set by the client) > count then only one page of results is returned and next and previous properties are null. In order to consume all pages, the client needs to continue fetching page-by-page using link provided within the next property until null value is found (last page - all sessions fetched).
In each result object, the following data are available:
store_codeThe store code - StringinVisits In the store - IntegeroutVisits Out of the store (exits) - IntegerdiffDifference. Visits In minus Visits Out - IntegerminuteThe minute of measurement - ISO 8601 Date and time with timezone
Example cURL
Occupancy Metric
This resource returns the number of visitors which are inside a store for a specific time interval in minute granularity.Resource [GET]
[/bi/acquisition-metrics/occupancy/]
URL Parameters
store_codeThe store code - Optionaldatetime_gteA date string (in UTC) to be used as greater than or equal for filtering - Requireddatetime_lteA date string (in UTC) to be used as less than or equal for filtering - Requiredpage_sizeThe number of results in each page of the response - Optional Default value is used when param is not givenpageThe number of page of the response - Optional Needed only when response is paginated
Note : Default page_size = 1000. Maximum page_size = 10000
Response
In each result object, the following data are available:store_codeThe store code - Stringoccupancy_metricOccupancy - IntegerminuteThe minute of measurement - ISO 8601 Date and time with timezone