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

# Créer un établissement dans une organisation



## OpenAPI

````yaml /fr/api-reference/location-management-v1.json post /v1/organizations/{organization_id}/locations
openapi: 3.0.0
info:
  title: API de gestion des établissements Chataigne
  description: Créez, mettez à jour et configurez les établissements Chataigne.
  version: '2026-05-01'
  contact: {}
servers:
  - url: https://server.chataigne.ai
security: []
tags: []
paths:
  /v1/organizations/{organization_id}/locations:
    post:
      tags:
        - Organisations
      summary: Créer un établissement dans une organisation
      operationId: OrganizationsV1Controller_createLocation
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
          example: org_02d224786a994d37a7e8a731
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
          description: >-
            Clé unique permettant de réessayer cette création en toute sécurité
            ; les répétitions renvoient la réponse d’origine.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLocationRequest'
      responses:
        '201':
          description: Établissement créé.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '400':
          description: Requête non valide.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentification requise.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            L’identité à l’origine de la requête n’est pas autorisée à effectuer
            cette opération.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: La ressource n’existe pas.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Erreur de conflit ou d’idempotence.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - organization-api-key: []
components:
  schemas:
    CreateLocationRequest:
      type: object
      required:
        - name
        - currency
        - country
        - timezone
        - address
      properties:
        name:
          type: string
        currency:
          type: string
          example: EUR
        country:
          type: string
          example: FR
        timezone:
          type: string
          example: Europe/Paris
        default_language:
          type: string
        contact_information:
          type: string
        address:
          $ref: '#/components/schemas/AddressInput'
    Location:
      type: object
      properties:
        id:
          type: string
          example: loc_023d6847de544fdb9a5510db
        object:
          type: string
          enum:
            - location
        organization_id:
          type: string
          nullable: true
        name:
          type: string
          example: Pokawa Châtelet
        currency:
          type: string
          example: EUR
        country:
          type: string
          example: FR
        timezone:
          type: string
          example: Europe/Paris
        default_language:
          type: string
          example: fr
        address:
          $ref: '#/components/schemas/Address'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    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
    AddressInput:
      type: object
      required:
        - line1
        - postal_code
        - city
        - country
        - latitude
        - longitude
      properties:
        line1:
          type: string
          example: 1 Rue de Rivoli
        line2:
          type: string
          nullable: true
        postal_code:
          type: string
          example: '75001'
        city:
          type: string
          example: Paris
        country:
          type: string
          example: FR
        latitude:
          type: number
          example: 48.8566
        longitude:
          type: number
          example: 2.3522
    Address:
      type: object
      nullable: true
      properties:
        line1:
          type: string
          nullable: true
        line2:
          type: string
          nullable: true
        postal_code:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        latitude:
          type: number
          nullable: true
        longitude:
          type: number
          nullable: true
  securitySchemes:
    organization-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Clé API d’établissement ou d’organisation.

````