curl --request POST \
--url 'https://api.stateset.com/api/v1/reports/sales-by-channel' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"records": [
{
"channel": "string",
"order_date": "2026-08-31T14:22:05Z",
"revenue": "49.00",
"units": "string"
}
],
"to": "string"
}'
{
"from": "string",
"rows": [
{
"channel": "string",
"order_count": 1,
"total_revenue": "49.00",
"total_units": "string"
}
],
"to": "string",
"total_orders": 1,
"total_revenue": "49.00",
"total_units": "string"
}
Sales by channel
Sales by channel
POST
/
api
/
v1
/
reports
/
sales-by-channel
curl --request POST \
--url 'https://api.stateset.com/api/v1/reports/sales-by-channel' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"records": [
{
"channel": "string",
"order_date": "2026-08-31T14:22:05Z",
"revenue": "49.00",
"units": "string"
}
],
"to": "string"
}'
{
"from": "string",
"rows": [
{
"channel": "string",
"order_count": 1,
"total_revenue": "49.00",
"total_units": "string"
}
],
"to": "string",
"total_orders": 1,
"total_revenue": "49.00",
"total_units": "string"
}
Request body
SalesByChannelRequest
string
required
Inclusive window start (
YYYY-MM-DD).SalesRecordRequest[]
required
string
required
Inclusive window end (
YYYY-MM-DD).Response
SalesByChannelResponse
string
required
ChannelSalesRowResponse[]
required
string
required
integer (int64)
required
string
required
string
required
Status codes
| Code | Meaning |
|---|---|
200 | — |
400 | — |
curl --request POST \
--url 'https://api.stateset.com/api/v1/reports/sales-by-channel' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "string",
"records": [
{
"channel": "string",
"order_date": "2026-08-31T14:22:05Z",
"revenue": "49.00",
"units": "string"
}
],
"to": "string"
}'
{
"from": "string",
"rows": [
{
"channel": "string",
"order_count": 1,
"total_revenue": "49.00",
"total_units": "string"
}
],
"to": "string",
"total_orders": 1,
"total_revenue": "49.00",
"total_units": "string"
}
Last modified on August 31, 2026