> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Consumption

> Consumption

### Request body

`ConsumptionRequest`

<ParamField body="from" type="string" required />

<ParamField body="records" type="ConsumptionRecordRequest[]" required />

<ParamField body="to" type="string" required />

### Responses

<ResponseField name="200" type="ConsumptionResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/reports/consumption' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "from": "string",
    "records": [
      {
        "consumed_at": "string",
        "product_id": null,
        "quantity": "string",
        "sku": "string"
      }
    ],
    "to": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "days": 1,
    "from": "string",
    "rows": [
      {
        "avg_daily": "string",
        "event_count": 1,
        "sku": "string",
        "total_quantity": "string"
      }
    ],
    "to": "string",
    "total_quantity": "string"
  }
  ```
</ResponseExample>
