> ## 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.

# Ventilations par canal et établissement

> Comparez les canaux Chataigne d'un établissement ou les établissements d'une organisation commerciale.

Ces deux ressources répondent aux besoins de comparaison propres à chaque périmètre et qui n'appartiennent pas aux réponses métier communes.

## Canaux d'un établissement

```text theme={null}
GET /v1/locations/{location_id}/analytics/channels
```

| Champ                            | Signification                                                                    |
| -------------------------------- | -------------------------------------------------------------------------------- |
| `channels[].channel`             | Canal de commande Chataigne, actuellement par exemple `whatsapp` ou `instagram`. |
| `channels[].order_count`         | Commandes éligibles passées via ce canal.                                        |
| `channels[].average_order_value` | Panier moyen du canal après remises, hors frais de livraison et de service.      |
| `daily_orders[]`                 | Lignes quotidiennes longues avec `date`, `channel` et `order_count`.             |

La réponse inclut la `currency` de l'établissement pour tous les paniers moyens.

```json Extrait par canal theme={null}
{
  "currency": "EUR",
  "channels": [
    { "channel": "instagram", "order_count": 80, "average_order_value": 27.2 },
    { "channel": "whatsapp", "order_count": 240, "average_order_value": 26.4 }
  ],
  "daily_orders": [{ "date": "2026-06-01", "channel": "whatsapp", "order_count": 10 }]
}
```

## Établissements d'une organisation

```text theme={null}
GET /v1/organizations/{organization_id}/analytics/locations
```

| Champ                     | Signification                                                                                    |
| ------------------------- | ------------------------------------------------------------------------------------------------ |
| `location_id`             | Identifiant canonique de l'établissement, utilisable dans une autre requête `/v1/locations/...`. |
| `name`                    | Nom actuel de l'établissement.                                                                   |
| `order_count`             | Commandes éligibles de cet établissement.                                                        |
| `active_customer_count`   | Clients ayant une commande éligible dans cet établissement pendant la période.                   |
| `returning_customer_rate` | Pourcentage de clients actifs ayant commandé plusieurs fois dans cet établissement.              |

Les établissements sont triés par `order_count` décroissant, puis par nom. Utilisez l'identifiant canonique, et non le nom, pour relier ces lignes à vos propres données.
