Revenue
The /api/product/revenue
endpoint returns the revenue value for a single product over a given period. You must provide a valid product_id
.
Query parameters
- Name
product_id
- Type
- string
- Description
Unique identifier of the product (required).
- Name
period
- Type
- string
- Description
Timeframe for the metric (e.g.,
7d
,30d
). View all supported periods →
GET/api/product/revenue
Retrieve revenue for a product
Fetch a product-level metric by passing a product ID and time period.
Request
GET
/api/product/revenuecurl -G http://localhost:3000/api/product/revenue \
-H "Authorization: Bearer {token}" \
-d product_id=SKU-123 \
-d period=30d
{
"product_id": "SKU-123",
"value": 123,
"formatted_value": "123"
}
Use cases
- Track product-specific KPIs
- Support merchandising, pricing, and inventory decisions
- Power product-level performance dashboards