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

# Analytics overview

> Choose a focused analytics resource and understand the filters and conventions shared by every response.

The Analytics API exposes small, predictable resources for a location or an entire business organization. Request the business domain you need instead of selecting fields from one large response.

| Domain          | Location endpoint                                  | Organization endpoint                                      |
| --------------- | -------------------------------------------------- | ---------------------------------------------------------- |
| Financials      | `/v1/locations/{location_id}/analytics/financials` | `/v1/organizations/{organization_id}/analytics/financials` |
| Orders          | `/v1/locations/{location_id}/analytics/orders`     | `/v1/organizations/{organization_id}/analytics/orders`     |
| Customers       | `/v1/locations/{location_id}/analytics/customers`  | `/v1/organizations/{organization_id}/analytics/customers`  |
| Delivery        | `/v1/locations/{location_id}/analytics/delivery`   | `/v1/organizations/{organization_id}/analytics/delivery`   |
| Products        | `/v1/locations/{location_id}/analytics/products`   | `/v1/organizations/{organization_id}/analytics/products`   |
| Discounts       | `/v1/locations/{location_id}/analytics/discounts`  | `/v1/organizations/{organization_id}/analytics/discounts`  |
| Scope breakdown | `/v1/locations/{location_id}/analytics/channels`   | `/v1/organizations/{organization_id}/analytics/locations`  |

<CardGroup cols={2}>
  <Card title="Financials" icon="coins" href="/analytics/financials">
    Revenue and average order value.
  </Card>

  <Card title="Orders" icon="receipt" href="/analytics/orders">
    Order volume and time distributions.
  </Card>

  <Card title="Customers" icon="users" href="/analytics/customers">
    Acquisition, retention, interactions, and conversion.
  </Card>

  <Card title="Delivery" icon="truck" href="/analytics/delivery">
    Delivery failures, costs, fees, and cities.
  </Card>

  <Card title="Products" icon="burger" href="/analytics/products">
    Item volume, best sellers, and trends.
  </Card>

  <Card title="Discounts" icon="badge-percent" href="/analytics/discounts">
    Redemptions and granted amounts.
  </Card>

  <Card title="Breakdowns" icon="chart-pie" href="/analytics/breakdowns">
    Location channels and organization locations.
  </Card>
</CardGroup>

## Authentication and access

Send your API key in the `x-api-key` header. It must include the `analytics.read` permission.

| Key scope             | Location analytics | Organization analytics |
| --------------------- | ------------------ | ---------------------- |
| Location              | Its location only  | Not allowed            |
| Business organization | Any child location | Its organization       |

A valid key without access to the requested resource receives `403`. An unknown canonical identifier receives `404`.

## Shared filters

<ParamField query="from" type="string">
  Start of the period as an ISO 8601 timestamp. If `from` and `to` are both omitted, the period
  starts 30 days before the request.
</ParamField>

<ParamField query="to" type="string">
  End of the period as an ISO 8601 timestamp. If `from` and `to` are both omitted, the period ends
  when the request is processed.
</ParamField>

<ParamField query="service_type" type="string">
  Optional order-service filter: `delivery` or `collection`.
</ParamField>

Every response echoes the effective filters in `period`. There is no metric-selection parameter: each endpoint always returns its complete, fixed schema.

## Data conventions

* Order-backed statistics cover confirmed and in-progress orders placed through Chataigne on WhatsApp or Instagram. Failed orders and deliveries appear only in their dedicated fields.
* Monetary location responses include `currency`. Monetary organization responses use `by_currency`, so amounts in different currencies are never added together.
* Daily and hourly values use each location's configured timezone. An organization day therefore follows the local calendar day of each contributing location.
* Rates are percentages from `0` to `100`, not decimal fractions.
* Daily series use explicit rows such as `{ "date": "2026-06-01", "order_count": 12 }`. Missing dates are not returned as zero rows.

Start with [Financials](/analytics/financials), or open the generated Analytics API reference for the complete request and response schemas.
