OrganizationId is automatically scoped from your JWT, so every response only ever contains data for your own organization.
Common query parameters
All analytics endpoints accept the following query parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
startDate | DateTimeOffset | Yes | Start of the reporting window (ISO 8601, e.g. 2024-01-01T00:00:00Z) |
endDate | DateTimeOffset | Yes | End of the reporting window (ISO 8601, e.g. 2024-01-31T23:59:59Z) |
organizationId | string | — | Automatically injected from your JWT OrganizationId claim. Do not pass this manually. |
All dates are interpreted in UTC. Pass a timezone offset (e.g.
-05:00) if you need to align windows to a local business day.GET /api/analytics/revenue
Returns total revenue for your organization within the specified date range. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Response
Total revenue earned during the period.
ISO 4217 currency code (e.g.
USD).Example response
curl example
GET /api/analytics/revenue/trend
Returns monthly revenue trend data grouped by period within the specified date range. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Response
Returns an array of monthly revenue data points.Period start date (ISO 8601).
Total revenue for the period.
Example response
curl example
GET /api/analytics/orders/trend
Returns monthly order count trend data grouped by period within the specified date range. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Response
Returns an array of monthly order count data points.Period start date (ISO 8601).
Number of orders placed during the period.
Example response
GET /api/analytics/orders/mtd
Returns the number of orders placed month-to-date, along with a comparison to the previous month. Security: Admin policyQuery parameters
Start of the reporting window (typically the first day of the current month).
End of the reporting window (typically today).
Response
Number of orders placed in the current month-to-date window.
Number of orders placed in the equivalent window of the previous month.
Percentage change compared to the previous month. Negative values indicate a decline.
Example response
GET /api/analytics/aov
Returns the average order value for your organization within the specified date range. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Response
Average monetary value per order during the period.
ISO 4217 currency code (e.g.
USD).Example response
GET /api/analytics/active-customers
Returns the count of customers who placed at least one order during the specified period, plus a percentage change compared to the previous equivalent period. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Response
Number of unique customers who placed at least one order during the period.
Percentage change in active customers compared to the previous equivalent period.
Example response
curl example
GET /api/analytics/products/top-by-revenue
Returns the top N products ranked by revenue within the specified date range. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Maximum number of products to return. Defaults to
10.Response
Returns an array of product revenue rankings.Unique identifier of the product.
Product SKU.
Product display name.
Total revenue generated by this product during the period.
Total units ordered during the period.
Example response
curl example
GET /api/analytics/customers/top-by-revenue
Returns the top N customers ranked by revenue within the specified date range. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Maximum number of customers to return. Defaults to
10.Response
Returns an array of customer revenue rankings.The customer’s account number.
The customer’s company name.
Total revenue from this customer during the period.
Number of orders placed by this customer during the period.
Example response
GET /api/analytics/categories/top-by-revenue
Returns the top N product categories ranked by revenue within the specified date range. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Maximum number of categories to return. Defaults to
10.Response
Returns an array of category revenue rankings.Unique identifier of the category.
Category display name.
Total revenue generated by products in this category during the period.
Example response
GET /api/analytics/sales-reps/top-by-revenue
Returns the top N sales representatives ranked by revenue within the specified date range. Security: Admin policyQuery parameters
Start of the reporting window.
End of the reporting window.
Maximum number of sales reps to return. Defaults to
10.Response
Returns an array of sales rep revenue rankings.The sales rep’s representative number.
Full name of the sales representative.
Total revenue attributed to this sales rep during the period.
Number of orders attributed to this sales rep during the period.
Example response
curl example