openapi: 3.0.3
info:
  title: Interface API Gamma Refonte
  description: Interface API Gamma Refonte
  version: 1.0.0
  contact:
    name: DGDDI - Douane Française
    url: https://www.douane.gouv.fr/

paths:
  /mvvdsaconf:
    post:
      summary: Endpoint de déclenchement d'un message MVVDSAConf
      description: Endpoint de déclenchement d'un message MVVDSAConf
      operationId: messageMVVDSAConf
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MVVDSAConf'
      parameters:
        - $ref: '../api/headerHttp.yaml#/components/parameters/messageId'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: string
                example: Réponse OK
        '400':
          description: Erreur de validation

components:
  schemas:
    MVVDSAConf:
      type: object
      properties:
        MVVDSAConf:
          $ref: '#/components/schemas/MVVDSAConfType'
      required:
        - MVVDSAConf

    MVVDSAConfType:
      type: object
      description: |
        | **Nom de l'élément** | **Référentiels** | **Règles** | **Conditions** |
        |----------------------|------------------|------------|----------------|
        | Entete               |                  |            |                |
        | ReferenceMouvement   |                  |            |                |
      properties:
        Entete:
          $ref: '#/components/schemas/EnteteMVVDSAConfType'
        ReferenceMouvement:
          $ref: '#/components/schemas/ReferenceMouvementMVVDSAConfType'
      required:
        - Entete

    EnteteMVVDSAConfType:
      type: object
      description: |
        | **Nom de l'élément** | **Référentiels** | **Règles** | **Conditions** |
        |----------------------|------------------|------------|----------------|
        | TypeAction           |                  | FR_RG_R170 |                |
        | SIRETPrestataire     |                  |            |                |
      properties:
        TypeAction:
          $ref: '../fr/fr-mvvdsa.yaml#/components/schemas/TypeActionType'
        SIRETPrestataire:
          $ref: '../fr/fr-mvvdsa.yaml#/components/schemas/SIRETPrestataireType'
      required:
        - TypeAction
        - SIRETPrestataire

    ReferenceMouvementMVVDSAConfType:
      type: object
      description: |
        | **Nom de l'élément** | **Référentiels** | **Règles**               | **Conditions** |
        |----------------------|------------------|--------------------------|----------------|
        | TypeDocument         |                  | FR_RG_R191               |                |
        | LRN                  |                  |                          |                |
        | NumeroDocument       |                  | FR_RG_R175<br>FR_RG_R176 |                |
        | Statut               | Ref_67 (TC50)    |                          |                |
        | NumSeq               |                  | FR_RG_ENR002             |                |
      properties:
        TypeDocument:
          $ref: '../fr/fr-mvvdsa.yaml#/components/schemas/TypeDocumentType'
        LRN:
          $ref: '../ie/types.yaml#/components/schemas/LocalReferenceNumberType'
        NumeroDocument:
          $ref: '../fr/fr-mvvdsa.yaml#/components/schemas/NumeroDocumentType'
        Statut:
          $ref: '../ie/types.yaml#/components/schemas/ExciseOperateStateTypes'
        NumSeq:
          $ref: '../ie/types.yaml#/components/schemas/SequenceNumberType'
      required:
        - TypeDocument
        - NumeroDocument
        - Statut
        - NumSeq