curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/reports/consumption' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "2026-08-01",
"to": "2026-08-31",
"records": [
{
"sku": "MUG-001",
"quantity": "2",
"consumed_at": "2026-08-15"
}
]
}'
{
"days": 1,
"from": "string",
"rows": [
{
"avg_daily": "string",
"event_count": 1,
"sku": "SKU-TENT-2P-GRN",
"total_quantity": "2"
}
],
"to": "string",
"total_quantity": "2"
}
Calculate consumption
Calculate consumption
POST
/
api
/
v1
/
reports
/
consumption
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/reports/consumption' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "2026-08-01",
"to": "2026-08-31",
"records": [
{
"sku": "MUG-001",
"quantity": "2",
"consumed_at": "2026-08-15"
}
]
}'
{
"days": 1,
"from": "string",
"rows": [
{
"avg_daily": "string",
"event_count": 1,
"sku": "SKU-TENT-2P-GRN",
"total_quantity": "2"
}
],
"to": "string",
"total_quantity": "2"
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
Request body
ConsumptionRequest
string
required
ConsumptionRecordRequest[]
required
string
required
Response
ConsumptionResponse
integer (int64)
required
string
required
ConsumptionRowResponse[]
required
string
required
string
required
Status codes
| Code | Meaning |
|---|---|
200 | — |
400 | — |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/reports/consumption' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"from": "2026-08-01",
"to": "2026-08-31",
"records": [
{
"sku": "MUG-001",
"quantity": "2",
"consumed_at": "2026-08-15"
}
]
}'
{
"days": 1,
"from": "string",
"rows": [
{
"avg_daily": "string",
"event_count": 1,
"sku": "SKU-TENT-2P-GRN",
"total_quantity": "2"
}
],
"to": "string",
"total_quantity": "2"
}
Last modified on September 21, 2026