The insightsParams object accepts the following parameters:
frontendIds (array of strings): List of frontend IDs to query data for
startDate (ISO 8601 string): Start date for the data range
endDate (ISO 8601 string): End date for the data range
dimensions (array of strings): Dimensions to group data by (e.g., channelGroup, channel, product)
metrics (array of strings): Metrics to retrieve (e.g., session:count, session:duration, product:inventoryValue)
filter (object): Optional filters to apply to the data
compareStartDate (ISO 8601 string, optional): Start date for comparison period
compareEndDate (ISO 8601 string, optional): End date for comparison period
aggregateDimensions (array of strings, optional): Additional dimensions for aggregation (e.g., day, week, month)
Pagination
The insights endpoint supports pagination through the pageInfo object in the response:
pageSize: Number of records per page
offset: Current offset for pagination
hasNextPage: Boolean indicating if more data is available
For large datasets, we recommend using paginated queries to efficiently
retrieve all data. Implement pagination logic in your client to fetch all
pages when hasNextPage is true.
Complete cURL Example
Here’s a complete example of how to make a request using cURL: