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

# Récupérer les analyses par canal de l'établissement



## OpenAPI

````yaml /fr/api-reference/analytics-v1.json get /v1/locations/{location_id}/analytics/channels
openapi: 3.0.0
info:
  title: API Analytics Chataigne
  description: Récupérez les analyses des établissements et des organisations Chataigne.
  version: '2026-05-01'
  contact: {}
servers:
  - url: https://server.chataigne.ai
security: []
tags: []
paths:
  /v1/locations/{location_id}/analytics/channels:
    get:
      tags:
        - Analyses
      summary: Récupérer les analyses par canal de l'établissement
      operationId: AnalyticsV1Controller_retrieveLocationChannels
      parameters:
        - name: location_id
          in: path
          required: true
          schema:
            type: string
          example: loc_r8v4n2c6tz
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Début de la période d'analyse. Si `from` et `to` sont omis, la
            période couvre par défaut les 30 derniers jours.
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Fin de la période d'analyse. Si `from` et `to` sont omis, la période
            se termine par défaut à l'instant présent.
        - name: service_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - delivery
              - collection
          description: >-
            Limite les statistiques liées aux commandes aux livraisons ou aux
            retraits.
      responses:
        '200':
          description: Analyses ventilées par canal Chataigne.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationChannelAnalytics'
        '400':
          description: Requête invalide.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentification requise.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            L'identité authentifiée n'est pas autorisée à effectuer cette
            requête.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: La ressource n'existe pas.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - organization-api-key: []
components:
  schemas:
    LocationChannelAnalytics:
      type: object
      required:
        - object
        - location_id
        - period
        - currency
        - channels
        - daily_orders
      properties:
        object:
          type: string
          enum:
            - location_channel_analytics
        location_id:
          type: string
          example: loc_r8v4n2c6tz
        period:
          $ref: '#/components/schemas/AnalyticsPeriod'
        currency:
          type: string
          example: EUR
        channels:
          type: array
          items:
            type: object
            required:
              - channel
              - order_count
              - average_order_value
            properties:
              channel:
                type: string
                example: whatsapp
              order_count:
                type: integer
                example: 240
              average_order_value:
                type: number
                example: 26.4
        daily_orders:
          type: array
          items:
            type: object
            required:
              - date
              - channel
              - order_count
            properties:
              date:
                type: string
                format: date
                example: '2026-06-01'
              channel:
                type: string
                example: whatsapp
              order_count:
                type: integer
                example: 10
    Error:
      type: object
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - request_id
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - authorization_error
                - not_found_error
                - conflict_error
                - rate_limit_error
                - idempotency_error
                - api_error
            code:
              type: string
              example: resource_missing
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
              example: req_8f2c…
            details:
              type: object
              additionalProperties: true
    AnalyticsPeriod:
      type: object
      required:
        - from
        - to
        - service_type
      properties:
        from:
          type: string
          format: date-time
          nullable: true
        to:
          type: string
          format: date-time
          nullable: true
        service_type:
          type: string
          enum:
            - delivery
            - collection
          nullable: true
  securitySchemes:
    organization-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Clé API d’établissement ou d’organisation.

````