Skip to main content
The Analytics API provides organization-level business intelligence — revenue trends, order volumes, top performers, and customer activity. All analytics endpoints require the Admin role. Your 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:
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.

Response

decimal
Total revenue earned during the period.
string
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.

Response

Returns an array of monthly revenue data points.
string
Period start date (ISO 8601).
decimal
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.

Response

Returns an array of monthly order count data points.
string
Period start date (ISO 8601).
integer
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window (typically the first day of the current month).
DateTimeOffset
required
End of the reporting window (typically today).

Response

integer
Number of orders placed in the current month-to-date window.
integer
Number of orders placed in the equivalent window of the previous month.
decimal
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.

Response

decimal
Average monetary value per order during the period.
string
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.

Response

integer
Number of unique customers who placed at least one order during the period.
decimal
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.
integer
default:"10"
Maximum number of products to return. Defaults to 10.

Response

Returns an array of product revenue rankings.
string
Unique identifier of the product.
string
Product SKU.
string
Product display name.
decimal
Total revenue generated by this product during the period.
integer
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.
integer
default:"10"
Maximum number of customers to return. Defaults to 10.

Response

Returns an array of customer revenue rankings.
string
The customer’s account number.
string
The customer’s company name.
decimal
Total revenue from this customer during the period.
integer
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.
integer
default:"10"
Maximum number of categories to return. Defaults to 10.

Response

Returns an array of category revenue rankings.
string
Unique identifier of the category.
string
Category display name.
decimal
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 policy

Query parameters

DateTimeOffset
required
Start of the reporting window.
DateTimeOffset
required
End of the reporting window.
integer
default:"10"
Maximum number of sales reps to return. Defaults to 10.

Response

Returns an array of sales rep revenue rankings.
string
The sales rep’s representative number.
string
Full name of the sales representative.
decimal
Total revenue attributed to this sales rep during the period.
integer
Number of orders attributed to this sales rep during the period.
Example response
curl example