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

# Enregistrer un paiement

> **Accès** : `payments.write` ou `payments.refund`

Enregistre, validé, un encaissement (`PAYMENT`) ou une caution (`DEPOSIT`), scope `payments.write`, ou un remboursement (`REFUND`), scope `payments.refund`. Clé partenaire : `PAYMENT` `STRIPE` seulement (sinon 400 `not_applicable`).

**Stripe** : PaymentIntent `succeeded` du compte Stripe de l’agence, dans la devise de la location, pour exactement `amount` ; sa metadata ne vise ni une autre location ni une autre agence et, pour une clé partenaire, porte ce `rentalId` ou votre `partnerCode`.

**Refus**
- `RENTAL_STATUS_NOT_ALLOWED` : statut hors `RESERVED`, `IN_PROGRESS`, `COMPLETED` (et `CANCELLED` pour un `REFUND`), `PENDING_APPROVAL` compris.
- `PAYMENT_NOT_VERIFIED` (`reason`) : PaymentIntent non conforme ; `ALREADY_EXISTS` : déjà enregistré ; `SERVICE_UNAVAILABLE` : Stripe injoignable.
- `PAYMENT_EXCEEDS_DUE` : `PAYMENT` au-delà du dû (SEPA en cours déduit).
- `REFUND_EXCEEDS_PAID` : `REFUND` au-delà du net encaissé ou du créditable des factures.
- `CREDIT_NOTE_NOT_ISSUABLE` : avoir refusé à l’émission.

**Effets** : `effects.balance` relu après l’écriture ; un `REFUND` émet un avoir par facture émise créditable, la plus récente d’abord (`effects.creditNotes`, vide sinon).



## OpenAPI

````yaml /openapi.json post /rentals/{rentalId}/payments
openapi: 3.1.0
info:
  title: API Lexio
  version: 1.0.1
  description: >-
    # API Lexio v1


    L’API Lexio permet à un loueur de véhicules, ou à une plateforme partenaire
    autorisée par lui, de chiffrer, réserver, suivre et administrer ses
    locations depuis un serveur. Chaque appel agit sur l’organisation Lexio d’un
    seul loueur.


    - **Adresse de base** : `https://api.lexio.rent/api/external/v1`

    - **Authentification** : `Authorization: Bearer lck_…`, une clé créée par le
    loueur dans Lexio.

    - **Format** : JSON en UTF-8 ; erreurs RFC 9457 avec un `code` stable.

    - **Spécification OpenAPI 3.1** :
    [https://docs.lexio.rent/openapi.json](https://docs.lexio.rent/openapi.json),
    à importer dans votre client HTTP ou à utiliser pour générer un client.

    - **Contact** (support technique, demande d’accès, organisation de test) :
    contact@lexio.rent.


    Vocabulaire : une **location** (`/rentals`) est un contrat de location d’un
    véhicule ; un **lieu** (`/locations`) est une adresse de départ ou de
    retour.


    ## Guides


    1. [Démarrage rapide](https://docs.lexio.rent/demarrage-rapide) : de la
    recherche d’un véhicule à l’annulation.

    2. [Authentification et scopes](https://docs.lexio.rent/authentification) :
    clés du loueur et clés partenaires, scopes, plans.

    3. [Montants et TVA](https://docs.lexio.rent/montants-et-tva) : HT, TTC,
    devises, caution et franchise.

    4. [Cycle de vie d’une location](https://docs.lexio.rent/cycle-de-vie) :
    statuts et actions possibles.

    5. [Limites de débit](https://docs.lexio.rent/limites),
    [Pagination](https://docs.lexio.rent/pagination), [Idempotence et
    reprise](https://docs.lexio.rent/idempotence).

    6. [Synchronisation par événements](https://docs.lexio.rent/synchronisation)
    : suivre les changements sans webhook.

    7. [Versions et évolutions](https://docs.lexio.rent/versions),
    [Erreurs](https://docs.lexio.rent/erreurs).

    8. [Intégration d’une plateforme de
    réservation](https://docs.lexio.rent/integration-broker) : parcours
    partenaire, paiement.

    9. [Ce qui se gère dans
    Lexio](https://docs.lexio.rent/ce-qui-se-gere-dans-lexio) et [Historique des
    versions](https://docs.lexio.rent/historique).
  contact:
    name: Support Lexio
    email: contact@lexio.rent
    url: https://docs.lexio.rent
servers:
  - url: https://api.lexio.rent/api/external/v1
    description: Production
security:
  - ApiKey: []
tags:
  - name: Organisation
    description: >-
      Réglages de l’organisation liée à la clé : devise, fuseau, TVA, horaires,
      règles de réservation.
  - name: Offre
    description: >-
      Disponibilités et devis : ce qui est réservable, à quel prix, avant de
      créer une location.
  - name: Locations
    description: >-
      Les contrats de location : création, lecture, modification de notes,
      suppression.
  - name: Modifications
    description: >-
      Changer les dates, le véhicule, la protection, le titulaire ou les options
      d’une location, ou l’annuler.
  - name: Départ et retour
    description: >-
      Remise des clés et retour du véhicule : kilométrage, carburant, photos,
      état des lieux.
  - name: Paiements
    description: Encaissements, cautions et remboursements enregistrés sur une location.
  - name: Événements
    description: >-
      Flux des changements à relire pour synchroniser votre système, sans
      webhook.
  - name: Clients
    description: Fiches des clients particuliers et entreprises.
  - name: Flotte
    description: Véhicules, leur archivage et leurs indisponibilités.
  - name: Catalogue
    description: >-
      Catégories, lieux, options, franchises, cautions et forfaits kilométriques
      proposés à la location.
  - name: Tarification
    description: Saisons, remises de durée, paliers de délai et réglages de prix.
  - name: Entretien
    description: Alertes et historique d’entretien des véhicules.
paths:
  /rentals/{rentalId}/payments:
    post:
      tags:
        - Paiements
      summary: Enregistrer un paiement
      description: >-
        **Accès** : `payments.write` ou `payments.refund`


        Enregistre, validé, un encaissement (`PAYMENT`) ou une caution
        (`DEPOSIT`), scope `payments.write`, ou un remboursement (`REFUND`),
        scope `payments.refund`. Clé partenaire : `PAYMENT` `STRIPE` seulement
        (sinon 400 `not_applicable`).


        **Stripe** : PaymentIntent `succeeded` du compte Stripe de l’agence,
        dans la devise de la location, pour exactement `amount` ; sa metadata ne
        vise ni une autre location ni une autre agence et, pour une clé
        partenaire, porte ce `rentalId` ou votre `partnerCode`.


        **Refus**

        - `RENTAL_STATUS_NOT_ALLOWED` : statut hors `RESERVED`, `IN_PROGRESS`,
        `COMPLETED` (et `CANCELLED` pour un `REFUND`), `PENDING_APPROVAL`
        compris.

        - `PAYMENT_NOT_VERIFIED` (`reason`) : PaymentIntent non conforme ;
        `ALREADY_EXISTS` : déjà enregistré ; `SERVICE_UNAVAILABLE` : Stripe
        injoignable.

        - `PAYMENT_EXCEEDS_DUE` : `PAYMENT` au-delà du dû (SEPA en cours
        déduit).

        - `REFUND_EXCEEDS_PAID` : `REFUND` au-delà du net encaissé ou du
        créditable des factures.

        - `CREDIT_NOTE_NOT_ISSUABLE` : avoir refusé à l’émission.


        **Effets** : `effects.balance` relu après l’écriture ; un `REFUND` émet
        un avoir par facture émise créditable, la plus récente d’abord
        (`effects.creditNotes`, vide sinon).
      operationId: createRentalPayment
      parameters:
        - in: path
          name: rentalId
          schema:
            examples:
              - 9c2d7e4a-5b1f-4d3c-8a6e-0f1b2c3d4e5f
            type: string
            format: uuid
          required: true
          description: Identifiant de la location.
        - $ref: '#/components/parameters/IdempotencyKeyRequired'
      requestBody:
        required: true
        content:
          application/json:
            example:
              type: PAYMENT
              amount: 308.4
              method: TRANSFER
            schema:
              oneOf:
                - description: Encaissement.
                  type: object
                  properties:
                    type:
                      type: string
                      const: PAYMENT
                    amount:
                      description: >-
                        Montant en unités majeures de la devise de la location,
                        strictement positif, sur sa grille (2 décimales en EUR,
                        entier en XPF et XOF) ; le sens vient de `type`.
                      type: number
                    providerReference:
                      description: >-
                        Référence de l’opération chez l’opérateur,
                        `MOBILE_MONEY` seulement (sinon 400 `not_applicable`).
                      anyOf:
                        - type: string
                          maxLength: 64
                        - type: 'null'
                    notes:
                      description: >-
                        Note pour l’équipe du loueur ; refusée à une clé
                        partenaire.
                      anyOf:
                        - type: string
                          maxLength: 500
                        - type: 'null'
                    method:
                      description: >-
                        Moyen de paiement ; `STRIPE` exige
                        `stripePaymentIntentId`.
                      type: string
                      enum:
                        - CREDIT_CARD
                        - CASH
                        - TRANSFER
                        - CHECK
                        - MOBILE_MONEY
                        - OTHER
                        - STRIPE
                    paidAt:
                      description: >-
                        Date de l’opération, RFC 3339 avec décalage ; omise :
                        maintenant. Ni avant la création de la location, ni plus
                        de 5 minutes dans le futur (400 `out_of_range`). Refusée
                        avec `STRIPE` : la date est lue sur le PaymentIntent.
                      examples:
                        - '2026-11-10T10:00:00+01:00'
                      type: string
                    stripePaymentIntentId:
                      description: >-
                        PaymentIntent `pi_…` encaissé sur le compte Stripe de
                        l’agence, dans la devise de la location et pour `amount`
                        exactement ; requis avec `STRIPE`, refusé sinon.
                      type: string
                      maxLength: 255
                      pattern: ^pi_[A-Za-z0-9]+$
                    isPreAuthorization: {}
                  required:
                    - type
                    - amount
                    - method
                  additionalProperties: false
                - description: >-
                    Caution, encaissée ou en empreinte ; hors solde de la
                    location.
                  type: object
                  properties:
                    type:
                      type: string
                      const: DEPOSIT
                    amount:
                      description: >-
                        Montant en unités majeures de la devise de la location,
                        strictement positif, sur sa grille (2 décimales en EUR,
                        entier en XPF et XOF) ; le sens vient de `type`.
                      type: number
                    providerReference:
                      description: >-
                        Référence de l’opération chez l’opérateur,
                        `MOBILE_MONEY` seulement (sinon 400 `not_applicable`).
                      anyOf:
                        - type: string
                          maxLength: 64
                        - type: 'null'
                    notes:
                      description: >-
                        Note pour l’équipe du loueur ; refusée à une clé
                        partenaire.
                      anyOf:
                        - type: string
                          maxLength: 500
                        - type: 'null'
                    method:
                      description: Moyen de la caution.
                      type: string
                      enum:
                        - CREDIT_CARD
                        - CASH
                        - TRANSFER
                        - CHECK
                        - SWIKLY
                        - TYLLT
                        - MOBILE_MONEY
                        - OTHER
                    isPreAuthorization:
                      description: >-
                        true : empreinte (montant bloqué, non débité), admise
                        seulement avec un moyen qui la permet (sinon 400
                        `not_applicable`) et jamais sur une location au mois.
                      default: false
                      type: boolean
                    paidAt:
                      description: >-
                        Date de l’opération, RFC 3339 avec décalage ; omise :
                        maintenant. Ni avant la création de la location, ni plus
                        de 5 minutes dans le futur (400 `out_of_range`).
                      examples:
                        - '2026-11-10T10:00:00+01:00'
                      type: string
                    stripePaymentIntentId: {}
                  required:
                    - type
                    - amount
                    - method
                  additionalProperties: false
                - description: >-
                    Remboursement, déduit du net encaissé ; émet les avoirs
                    nécessaires.
                  type: object
                  properties:
                    type:
                      type: string
                      const: REFUND
                    amount:
                      description: >-
                        Montant en unités majeures de la devise de la location,
                        strictement positif, sur sa grille (2 décimales en EUR,
                        entier en XPF et XOF) ; le sens vient de `type`.
                      type: number
                    providerReference:
                      description: >-
                        Référence de l’opération chez l’opérateur,
                        `MOBILE_MONEY` seulement (sinon 400 `not_applicable`).
                      anyOf:
                        - type: string
                          maxLength: 64
                        - type: 'null'
                    notes:
                      description: >-
                        Note pour l’équipe du loueur ; refusée à une clé
                        partenaire.
                      anyOf:
                        - type: string
                          maxLength: 500
                        - type: 'null'
                    method:
                      description: >-
                        Moyen du remboursement. `STRIPE` est refusé (400
                        `not_applicable`) : remboursez chez Stripe ; Lexio
                        l’enregistre à réception de l’événement Stripe, sauf si
                        l’équipe du loueur l’a déjà saisi à la main.
                      type: string
                      enum:
                        - CREDIT_CARD
                        - CASH
                        - TRANSFER
                        - CHECK
                        - MOBILE_MONEY
                        - OTHER
                        - STRIPE
                    paidAt:
                      description: >-
                        Date de l’opération, RFC 3339 avec décalage ; omise :
                        maintenant. Ni avant la création de la location, ni plus
                        de 5 minutes dans le futur (400 `out_of_range`).
                      examples:
                        - '2026-11-10T10:00:00+01:00'
                      type: string
                    stripePaymentIntentId: {}
                    isPreAuthorization: {}
                  required:
                    - type
                    - amount
                    - method
                  additionalProperties: false
              type: object
      responses:
        '201':
          description: Enregistrer un paiement
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Location:
              $ref: '#/components/headers/Location'
            Idempotent-Replayed:
              $ref: '#/components/headers/IdempotentReplayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Payment'
                  effects:
                    type: object
                    properties:
                      balance:
                        $ref: '#/components/schemas/Balance'
                        description: Solde de la location, relu après l’écriture.
                        examples:
                          - totalTTC: 308.4
                            paidAmount: 308.4
                            dueAmount: 0
                            overpaidAmount: 0
                      creditNotes:
                        description: >-
                          Avoirs émis par un remboursement sur les factures
                          émises, de la plus récente à la plus ancienne ; vide
                          hors `REFUND` ou sans facture créditable.
                        examples:
                          - []
                        maxItems: 50
                        type: array
                        items:
                          $ref: '#/components/schemas/InvoiceRef'
                    required:
                      - balance
                      - creditNotes
                required:
                  - data
                  - effects
        '400':
          description: '`MALFORMED_REQUEST`, `VALIDATION_FAILED`'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/problem+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/MalformedRequestProblem'
                  - $ref: '#/components/schemas/ValidationFailedProblem'
        '401':
          description: >-
            `API_KEY_DISABLED`, `API_KEY_EXPIRED`, `API_KEY_INVALID`,
            `API_KEY_MISSING`, `API_KEY_REVOKED`
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            WWW-Authenticate:
              $ref: '#/components/headers/WwwAuthenticate'
          content:
            application/problem+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ApiKeyDisabledProblem'
                  - $ref: '#/components/schemas/ApiKeyExpiredProblem'
                  - $ref: '#/components/schemas/ApiKeyInvalidProblem'
                  - $ref: '#/components/schemas/ApiKeyMissingProblem'
                  - $ref: '#/components/schemas/ApiKeyRevokedProblem'
        '403':
          description: >-
            `FEATURE_NOT_AVAILABLE`, `INSUFFICIENT_SCOPE`,
            `ORGANIZATION_SUSPENDED`
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/problem+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/FeatureNotAvailableProblem'
                  - $ref: '#/components/schemas/InsufficientScopeProblem'
                  - $ref: '#/components/schemas/OrganizationSuspendedProblem'
        '404':
          description: '`NOT_FOUND`'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/NotFoundProblem'
        '409':
          description: >-
            `ALREADY_EXISTS`, `CREDIT_NOTE_NOT_ISSUABLE`,
            `IDEMPOTENCY_ALREADY_APPLIED`, `IDEMPOTENCY_IN_FLIGHT`,
            `RENTAL_BUSY`, `RENTAL_STATUS_NOT_ALLOWED`
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/problem+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/AlreadyExistsProblem'
                  - $ref: '#/components/schemas/CreditNoteNotIssuableProblem'
                  - $ref: '#/components/schemas/IdempotencyAlreadyAppliedProblem'
                  - $ref: '#/components/schemas/IdempotencyInFlightProblem'
                  - $ref: '#/components/schemas/RentalBusyProblem'
                  - $ref: '#/components/schemas/RentalStatusNotAllowedProblem'
        '413':
          description: '`PAYLOAD_TOO_LARGE`'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PayloadTooLargeProblem'
        '415':
          description: '`UNSUPPORTED_MEDIA_TYPE`'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/UnsupportedMediaTypeProblem'
        '422':
          description: >-
            `IDEMPOTENCY_KEY_REUSED`, `PAYMENT_EXCEEDS_DUE`,
            `PAYMENT_NOT_VERIFIED`, `REFUND_EXCEEDS_PAID`
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/problem+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/IdempotencyKeyReusedProblem'
                  - $ref: '#/components/schemas/PaymentExceedsDueProblem'
                  - $ref: '#/components/schemas/PaymentNotVerifiedProblem'
                  - $ref: '#/components/schemas/RefundExceedsPaidProblem'
        '429':
          description: '`RATE_LIMITED`'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/RateLimitedProblem'
        '500':
          description: '`INTERNAL_ERROR`'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/InternalErrorProblem'
        '503':
          description: '`SERVICE_UNAVAILABLE`'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableProblem'
      security:
        - ApiKey: []
components:
  parameters:
    IdempotencyKeyRequired:
      name: Idempotency-Key
      in: header
      required: true
      example: 8b3e1d2c-4a5f-4c6b-9e7d-1f2a3b4c5d6e
      description: >-
        Clé unique de l’opération, réutilisée à chaque nouvel essai : un rejeu
        avec la même clé et le même corps renvoie la réponse initiale sans rien
        réécrire. Voir [Idempotence](https://docs.lexio.rent/idempotence).
        Facultative avec `?dryRun=true` sur les opérations qui l’acceptent.
      schema:
        type: string
        minLength: 1
        maxLength: 255
        pattern: ^[\x20-\x7E]+$
        examples:
          - 8b3e1d2c-4a5f-4c6b-9e7d-1f2a3b4c5d6e
  headers:
    XRequestId:
      description: Identifiant de la requête, à communiquer au support.
      schema:
        type: string
    RateLimitLimit:
      description: Plafond du seau de débit qui s’applique à la requête.
      schema:
        type: integer
        minimum: 0
    RateLimitRemaining:
      description: Requêtes encore permises dans la fenêtre en cours.
      schema:
        type: integer
        minimum: 0
    RateLimitReset:
      description: Secondes avant la remise à zéro de la fenêtre.
      schema:
        type: integer
        minimum: 0
    Location:
      description: >-
        Chemin absolu de la ressource créée sur l’hôte de l’API, préfixe
        `/api/external/v1` compris.
      schema:
        type: string
    IdempotentReplayed:
      description: >-
        `true` quand la réponse est le rejeu d’une requête déjà traitée avec la
        même `Idempotency-Key`.
      schema:
        type: string
        enum:
          - 'true'
    WwwAuthenticate:
      description: >-
        Schéma d’authentification attendu (`Bearer`), avec
        `error="invalid_token"` pour une clé refusée.
      schema:
        type: string
    RetryAfter:
      description: Secondes à attendre avant de rejouer la requête.
      schema:
        type: integer
        minimum: 0
  schemas:
    Payment:
      description: Encaissement, caution ou remboursement d’une location.
      examples:
        - id: e8a1b2c3-d4e5-4f60-9a7b-8c9d0e1f2a3b
          rentalId: 9c2d7e4a-5b1f-4d3c-8a6e-0f1b2c3d4e5f
          number: PAY-2026.11-0042
          type: PAYMENT
          amount: 308.4
          currency: EUR
          method: TRANSFER
          status: VALIDATED
          isPreAuthorization: false
          paidAt: '2026-11-05T14:20:00+01:00'
          createdAt: '2026-11-05T14:20:03+01:00'
          providerReference: null
          stripePaymentIntentId: null
          notes: null
      type: object
      properties:
        id:
          examples:
            - 7c9e6679-7425-40de-944b-e07fc1f90ae7
          description: Identifiant du paiement.
          type: string
          format: uuid
        rentalId:
          examples:
            - 7c9e6679-7425-40de-944b-e07fc1f90ae7
          description: Location du paiement.
          type: string
          format: uuid
        number:
          description: >-
            Numéro comptable : séquence `PAY` (encaissement), `CAU` (caution) ou
            `REM` (remboursement) de l’organisation.
          examples:
            - PAY-2026.11-0042
          type: string
        type:
          description: >-
            `PAYMENT` : encaissement ; `DEPOSIT` : caution ; `REFUND` :
            remboursement.
          type: string
          enum:
            - PAYMENT
            - DEPOSIT
            - REFUND
        amount:
          description: >-
            Montant réellement encaissé, bloqué ou remboursé, dans `currency` ;
            positif, le sens est porté par `type`. Seul un mouvement de caution
            enregistré dans Lexio au retour (restitution ou retenue) est
            négatif.
          type: number
        currency:
          description: Devise de la location.
          examples:
            - EUR
          type: string
          enum:
            - EUR
            - XPF
            - CHF
            - CAD
            - GBP
            - USD
            - XOF
        method:
          description: Moyen de paiement.
          type: string
          enum:
            - CASH
            - CREDIT_CARD
            - TRANSFER
            - CHECK
            - PAYPAL
            - SWIKLY
            - STRIPE
            - TYLLT
            - MOBILE_MONEY
            - OTHER
            - SEPA_DEBIT
        status:
          description: >-
            Statut de la transaction : seules les lignes `VALIDATED` comptent
            dans le solde de la location. `PENDING` : en attente (prélèvement
            SEPA en cours, remboursement à exécuter).
          type: string
          enum:
            - PENDING
            - VALIDATED
            - REFUSED
            - CANCELLED
        isPreAuthorization:
          description: >-
            true : empreinte de caution, montant bloqué sans être débité ;
            toujours false hors `DEPOSIT`.
          type: boolean
        paidAt:
          examples:
            - '2026-11-10T10:00:00+01:00'
          description: >-
            Date de l’opération ; pour un paiement Stripe, celle du
            PaymentIntent.
          type: string
          format: date-time
        createdAt:
          description: >-
            Instant d’enregistrement ; null pour une ligne antérieure à cette
            information.
          anyOf:
            - examples:
                - '2026-11-10T10:00:00+01:00'
              type: string
              format: date-time
            - type: 'null'
        providerReference:
          description: Référence de l’opérateur Mobile Money ; null pour les autres moyens.
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
        stripePaymentIntentId:
          description: PaymentIntent Stripe qui a réglé ce paiement ; null sinon.
          anyOf:
            - type: string
              pattern: ^pi_[A-Za-z0-9]+$
            - type: 'null'
        notes:
          description: >-
            Libellé libre, de longueur non bornée : une ligne saisie dans Lexio
            ou écrite par le serveur peut dépasser la limite d’entrée de l’API.
            Toujours null pour une clé partenaire.
          anyOf:
            - type: string
            - type: 'null'
      required:
        - id
        - rentalId
        - number
        - type
        - amount
        - currency
        - method
        - status
        - isPreAuthorization
        - paidAt
        - createdAt
        - providerReference
        - stripePaymentIntentId
        - notes
    Balance:
      description: Solde de la location dans sa devise ; la caution n’y entre jamais.
      examples:
        - totalTTC: 308.4
          paidAmount: 0
          dueAmount: 308.4
          overpaidAmount: 0
      type: object
      properties:
        totalTTC:
          description: 'Montant exigible : `totalTTC` de la location, 0 si elle est annulée.'
          type: number
          minimum: 0
        paidAmount:
          description: >-
            Net encaissé : paiements validés moins remboursements validés,
            caution exclue.
          type: number
        dueAmount:
          description: 'Reste à payer : `totalTTC − paidAmount`, 0 au minimum.'
          type: number
          minimum: 0
        overpaidAmount:
          description: >-
            Trop-perçu : `paidAmount − totalTTC`, 0 au minimum ; à rembourser ou
            à conserver par le loueur.
          type: number
          minimum: 0
      required:
        - totalTTC
        - paidAmount
        - dueAmount
        - overpaidAmount
    InvoiceRef:
      description: >-
        Facture ou avoir produit par l’opération ; le document se lit par `GET
        /rentals/{rentalId}/invoices`.
      examples:
        - id: f2b3c4d5-e6f7-4a8b-9c0d-1e2f3a4b5c6d
          number: FAC-2026.11-0103
          type: INVOICE
          creditedInvoiceId: null
          totalHT: 307
          totalTTC: 368.4
      type: object
      properties:
        id:
          description: Facture ou avoir ; null en aperçu (`dryRun`).
          anyOf:
            - examples:
                - 7c9e6679-7425-40de-944b-e07fc1f90ae7
              type: string
              format: uuid
            - type: 'null'
        number:
          description: Numéro de la pièce ; null en aperçu (`dryRun`).
          anyOf:
            - type: string
            - type: 'null'
        type:
          description: '`INVOICE` : facture ; `CREDIT_NOTE` : avoir.'
          type: string
          enum:
            - INVOICE
            - CREDIT_NOTE
        creditedInvoiceId:
          description: Facture que cet avoir crédite ; null pour une facture.
          anyOf:
            - examples:
                - 7c9e6679-7425-40de-944b-e07fc1f90ae7
              type: string
              format: uuid
            - type: 'null'
        totalHT:
          description: Total HT de la pièce, négatif pour un avoir.
          type: number
        totalTTC:
          description: Total TTC de la pièce, négatif pour un avoir.
          type: number
      required:
        - id
        - number
        - type
        - creditedInvoiceId
        - totalHT
        - totalTTC
    MalformedRequestProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/malformed-request
        title:
          type: string
          const: Corps de requête illisible
        status:
          type: number
          const: 400
        code:
          type: string
          const: MALFORMED_REQUEST
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    ValidationFailedProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/validation-failed
        title:
          type: string
          const: Requête invalide
        status:
          type: number
          const: 400
        code:
          type: string
          const: VALIDATION_FAILED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        errors:
          minItems: 1
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
              code:
                type: string
                enum:
                  - required
                  - invalid_type
                  - invalid_format
                  - invalid_value
                  - too_small
                  - too_big
                  - too_many_decimals
                  - out_of_range
                  - unknown_field
                  - null_not_allowed
                  - empty_string
                  - empty_patch
                  - mutually_exclusive
                  - not_applicable
                  - duplicate
                  - end_before_start
                  - date_in_past
                  - nonexistent_local_time
                  - offset_not_allowed
                  - offset_required
                  - upload_expired
                  - upload_incomplete
                  - upload_conflict
              detail:
                type: string
            required:
              - pointer
              - code
              - detail
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - errors
    ApiKeyDisabledProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/api-key-disabled
        title:
          type: string
          const: Clé API désactivée
        status:
          type: number
          const: 401
        code:
          type: string
          const: API_KEY_DISABLED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    ApiKeyExpiredProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/api-key-expired
        title:
          type: string
          const: Clé API expirée
        status:
          type: number
          const: 401
        code:
          type: string
          const: API_KEY_EXPIRED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    ApiKeyInvalidProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/api-key-invalid
        title:
          type: string
          const: Clé API invalide
        status:
          type: number
          const: 401
        code:
          type: string
          const: API_KEY_INVALID
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    ApiKeyMissingProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/api-key-missing
        title:
          type: string
          const: Clé API absente
        status:
          type: number
          const: 401
        code:
          type: string
          const: API_KEY_MISSING
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    ApiKeyRevokedProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/api-key-revoked
        title:
          type: string
          const: Clé API révoquée
        status:
          type: number
          const: 401
        code:
          type: string
          const: API_KEY_REVOKED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    FeatureNotAvailableProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/feature-not-available
        title:
          type: string
          const: Fonctionnalité non incluse
        status:
          type: number
          const: 403
        code:
          type: string
          const: FEATURE_NOT_AVAILABLE
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        feature:
          type: string
          minLength: 1
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - feature
    InsufficientScopeProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/insufficient-scope
        title:
          type: string
          const: Scope insuffisant
        status:
          type: number
          const: 403
        code:
          type: string
          const: INSUFFICIENT_SCOPE
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        requiredScopes:
          minItems: 1
          maxItems: 20
          type: array
          items:
            type: string
            enum:
              - offers.read
              - quotes.write
              - rentals.read
              - rentals.write
              - rentals.operate
              - rentals.delete
              - payments.write
              - payments.refund
              - customers.read
              - customers.write
              - customers.delete
              - vehicles.read
              - vehicles.write
              - vehicles.delete
              - catalog.read
              - catalog.write
              - pricing.read
              - pricing.write
              - maintenance.read
              - maintenance.write
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - requiredScopes
    OrganizationSuspendedProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/organization-suspended
        title:
          type: string
          const: Organisation suspendue
        status:
          type: number
          const: 403
        code:
          type: string
          const: ORGANIZATION_SUSPENDED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    NotFoundProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/not-found
        title:
          type: string
          const: Ressource introuvable
        status:
          type: number
          const: 404
        code:
          type: string
          const: NOT_FOUND
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        resource:
          type: string
          enum:
            - RENTAL
            - RENTAL_OPTION
            - QUOTE
            - PAYMENT
            - INVOICE
            - PHOTO
            - AMENDMENT
            - INSPECTION
            - CUSTOMER
            - VEHICLE
            - VEHICLE_BLOCK
            - CATEGORY
            - OPTION
            - DEDUCTIBLE
            - DEPOSIT
            - MILEAGE_PACKAGE
            - LOCATION
            - SEASON
            - SEASON_CALENDAR_MONTH
            - DURATION_DISCOUNT
            - LEAD_TIME_TIER
            - MAINTENANCE_RECORD
            - MAINTENANCE_OPERATION
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - resource
    AlreadyExistsProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/already-exists
        title:
          type: string
          const: Doublon
        status:
          type: number
          const: 409
        code:
          type: string
          const: ALREADY_EXISTS
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        field:
          type: string
          minLength: 1
        conflictingId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - field
        - conflictingId
    CreditNoteNotIssuableProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/credit-note-not-issuable
        title:
          type: string
          const: Avoir impossible à émettre
        status:
          type: number
          const: 409
        code:
          type: string
          const: CREDIT_NOTE_NOT_ISSUABLE
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    IdempotencyAlreadyAppliedProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/idempotency-already-applied
        title:
          type: string
          const: Écriture déjà appliquée
        status:
          type: number
          const: 409
        code:
          type: string
          const: IDEMPOTENCY_ALREADY_APPLIED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        resourceId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - resourceId
    IdempotencyInFlightProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/idempotency-in-flight
        title:
          type: string
          const: Requête identique en cours
        status:
          type: number
          const: 409
        code:
          type: string
          const: IDEMPOTENCY_IN_FLIGHT
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    RentalBusyProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/rental-busy
        title:
          type: string
          const: Location occupée
        status:
          type: number
          const: 409
        code:
          type: string
          const: RENTAL_BUSY
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    RentalStatusNotAllowedProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/rental-status-not-allowed
        title:
          type: string
          const: Statut de la location incompatible
        status:
          type: number
          const: 409
        code:
          type: string
          const: RENTAL_STATUS_NOT_ALLOWED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        errors:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
              code:
                type: string
                enum:
                  - required
                  - invalid_type
                  - invalid_format
                  - invalid_value
                  - too_small
                  - too_big
                  - too_many_decimals
                  - out_of_range
                  - unknown_field
                  - null_not_allowed
                  - empty_string
                  - empty_patch
                  - mutually_exclusive
                  - not_applicable
                  - duplicate
                  - end_before_start
                  - date_in_past
                  - nonexistent_local_time
                  - offset_not_allowed
                  - offset_required
                  - upload_expired
                  - upload_incomplete
                  - upload_conflict
              detail:
                type: string
            required:
              - pointer
              - code
              - detail
        rentalStatus:
          type: string
          enum:
            - RESERVED
            - PENDING_APPROVAL
            - IN_PROGRESS
            - COMPLETED
            - CANCELLED
        allowedStatuses:
          maxItems: 10
          type: array
          items:
            type: string
            enum:
              - RESERVED
              - PENDING_APPROVAL
              - IN_PROGRESS
              - COMPLETED
              - CANCELLED
        action:
          type: string
          enum:
            - CANCEL
            - PICKUP
            - RETURN
            - RESCHEDULE
            - CHANGE_VEHICLE
            - CHANGE_COVERAGE
            - CHANGE_CUSTOMER
            - SET_OPTION_QUANTITY
            - REMOVE_OPTION
            - EDIT_NOTES
            - EDIT_LOCATIONS
            - DELETE
            - ADD_PAYMENT
            - REFUND
            - DELETE_PAYMENT
            - UPLOAD_PHOTO
            - DELETE_PHOTO
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - rentalStatus
        - allowedStatuses
        - action
    PayloadTooLargeProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/payload-too-large
        title:
          type: string
          const: Corps trop volumineux
        status:
          type: number
          const: 413
        code:
          type: string
          const: PAYLOAD_TOO_LARGE
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        maxBytes:
          type: integer
          minimum: 1
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - maxBytes
    UnsupportedMediaTypeProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/unsupported-media-type
        title:
          type: string
          const: Type de contenu non pris en charge
        status:
          type: number
          const: 415
        code:
          type: string
          const: UNSUPPORTED_MEDIA_TYPE
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        accepted:
          minItems: 1
          maxItems: 10
          type: array
          items:
            type: string
            minLength: 1
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - accepted
    IdempotencyKeyReusedProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/idempotency-key-reused
        title:
          type: string
          const: Clé d’idempotence réutilisée
        status:
          type: number
          const: 422
        code:
          type: string
          const: IDEMPOTENCY_KEY_REUSED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    PaymentExceedsDueProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/payment-exceeds-due
        title:
          type: string
          const: Encaissement supérieur au dû
        status:
          type: number
          const: 422
        code:
          type: string
          const: PAYMENT_EXCEEDS_DUE
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        errors:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
              code:
                type: string
                enum:
                  - required
                  - invalid_type
                  - invalid_format
                  - invalid_value
                  - too_small
                  - too_big
                  - too_many_decimals
                  - out_of_range
                  - unknown_field
                  - null_not_allowed
                  - empty_string
                  - empty_patch
                  - mutually_exclusive
                  - not_applicable
                  - duplicate
                  - end_before_start
                  - date_in_past
                  - nonexistent_local_time
                  - offset_not_allowed
                  - offset_required
                  - upload_expired
                  - upload_incomplete
                  - upload_conflict
              detail:
                type: string
            required:
              - pointer
              - code
              - detail
        dueAmount:
          type: number
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - dueAmount
    PaymentNotVerifiedProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/payment-not-verified
        title:
          type: string
          const: Paiement non vérifié
        status:
          type: number
          const: 422
        code:
          type: string
          const: PAYMENT_NOT_VERIFIED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        errors:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
              code:
                type: string
                enum:
                  - required
                  - invalid_type
                  - invalid_format
                  - invalid_value
                  - too_small
                  - too_big
                  - too_many_decimals
                  - out_of_range
                  - unknown_field
                  - null_not_allowed
                  - empty_string
                  - empty_patch
                  - mutually_exclusive
                  - not_applicable
                  - duplicate
                  - end_before_start
                  - date_in_past
                  - nonexistent_local_time
                  - offset_not_allowed
                  - offset_required
                  - upload_expired
                  - upload_incomplete
                  - upload_conflict
              detail:
                type: string
            required:
              - pointer
              - code
              - detail
        reason:
          type: string
          enum:
            - PI_NOT_FOUND
            - PI_NOT_SUCCEEDED
            - PI_ALREADY_USED
            - PI_RENTAL_MISMATCH
            - CURRENCY_MISMATCH
            - AMOUNT_MISMATCH
            - CONNECT_NOT_CONFIGURED
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - reason
    RefundExceedsPaidProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/refund-exceeds-paid
        title:
          type: string
          const: Remboursement supérieur à l’encaissé
        status:
          type: number
          const: 422
        code:
          type: string
          const: REFUND_EXCEEDS_PAID
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        errors:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
              code:
                type: string
                enum:
                  - required
                  - invalid_type
                  - invalid_format
                  - invalid_value
                  - too_small
                  - too_big
                  - too_many_decimals
                  - out_of_range
                  - unknown_field
                  - null_not_allowed
                  - empty_string
                  - empty_patch
                  - mutually_exclusive
                  - not_applicable
                  - duplicate
                  - end_before_start
                  - date_in_past
                  - nonexistent_local_time
                  - offset_not_allowed
                  - offset_required
                  - upload_expired
                  - upload_incomplete
                  - upload_conflict
              detail:
                type: string
            required:
              - pointer
              - code
              - detail
        maxRefundableAmount:
          type: number
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - maxRefundableAmount
    RateLimitedProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/rate-limited
        title:
          type: string
          const: Trop de requêtes
        status:
          type: number
          const: 429
        code:
          type: string
          const: RATE_LIMITED
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        limit:
          type: string
          enum:
            - PRE_AUTH
            - PER_KEY
            - WRITE
            - QUOTE
        windowSeconds:
          type: integer
          minimum: 1
        retryAfter:
          type: integer
          minimum: 0
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - limit
        - windowSeconds
        - retryAfter
    InternalErrorProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/internal-error
        title:
          type: string
          const: Erreur interne
        status:
          type: number
          const: 500
        code:
          type: string
          const: INTERNAL_ERROR
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
    ServiceUnavailableProblem:
      type: object
      properties:
        type:
          type: string
          const: https://api.lexio.rent/errors/service-unavailable
        title:
          type: string
          const: Service momentanément indisponible
        status:
          type: number
          const: 503
        code:
          type: string
          const: SERVICE_UNAVAILABLE
        detail:
          type: string
        instance:
          type: string
        requestId:
          type: string
        dependency:
          type: string
          enum:
            - PAYMENT_PROVIDER
            - FILE_STORAGE
            - ACCOUNTING
            - EMAIL
      required:
        - type
        - title
        - status
        - code
        - detail
        - instance
        - requestId
        - dependency
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: lck_…
      description: >-
        Clé API `lck_…` créée dans Lexio (Paramètres → Développeur), envoyée en
        `Authorization: Bearer`. Voir
        [Authentification](https://docs.lexio.rent/authentification).

````

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