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

# Get sales summary

> Revenue, refunds, orders and average order value for a date range.

Revenue, refunds, orders and average order value for a date range, with the previous period of the same length. Available on every plan.

Call this from your server with a `pk_` key. See [Store data overview](https://docs.khaime.com/api-reference/store-data/overview.md) for keys, errors and how to read empty values.

## Parameters

| Name | Type | Required | Description |
| - | - | - | - |
| `date_from` | string | Yes | First day, `YYYY-MM-DD`. |
| `date_to` | string | Yes | Last day, included, `YYYY-MM-DD`. |

## Request

```bash theme={null}
curl -H "X-API-Key: $KHAIME_API_KEY" \
  "https://api.khaime.com/api/v1/analytics/sales?date_from=2026-10-01&date_to=2026-10-31"
```

## Response

```json theme={null}
{
  "message": "Sales summary retrieved",
  "success": true,
  "status": true,
  "data": {
    "environment": "live",
    "date_from": "2026-10-01",
    "date_to": "2026-10-31",
    "total_revenue_usd": 1160.71,
    "total_refunds_usd": 45,
    "net_revenue_usd": 1115.71,
    "total_orders": 14,
    "avg_order_value_usd": 82.91,
    "comparison": {
      "revenue_change_pct": 18.4,
      "orders_change_pct": 16.67,
      "avg_order_value_change_pct": 1.5,
      "refunds_change_pct": null,
      "previous_revenue_usd": 980,
      "previous_orders": 12,
      "previous_avg_order_value_usd": 81.67,
      "previous_refunds_usd": 0
    },
    "revenue_by_day": [
      {
        "date": "2026-10-01",
        "amount": 120.5,
        "orders": 2
      }
    ]
  }
}
```

## Read it correctly

* Amounts here are in whole US dollars, converted from what was charged. The other endpoints use hundredths of the original currency.
* A `*_change_pct` is `null` when the previous period was empty.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.