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:
  # Chemin facultatif
  /1005:
    post:
      summary: Définition d'un message 1005
      operationId: message1005
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BodyType1005'
      parameters:
        - $ref: '../api/headerHttp.yaml#/components/parameters/messageId'
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '../api/retourHttp.yaml#/components/schemas/retour200'

components:
  schemas:
    BodyType1005:
      type: object
      properties:
        SubmittedDraftOfEad1005:
          $ref: '#/components/schemas/SubmittedDraftOfEadType1005'
      required:
        - SubmittedDraftOfEad1005

    SubmittedDraftOfEadType1005:
      type: object
      properties:
        ExciseMovementEad:
          $ref: '#/components/schemas/ExciseMovementEadType1005'
        Ead:
          $ref: '#/components/schemas/EadType1005'
      required:
        - Ead

    ExciseMovementEadType1005:
      type: object
      description: |
        | Nom de l'élément                 | Référentiels | Règles | Conditions |
        |----------------------------------|--------------|--------|------------|
        | AdministrativeReferenceCode      |              | R030   | NA         |
        | DateAndTimeOfValidationOfEadEsad |              |        |            |
      properties:
        AdministrativeReferenceCode:
          $ref: '../ie/types.yaml#/components/schemas/AdministrativeReferenceCodeType'
        DateAndTimeOfValidationOfEadEsad:
          $ref: '../ie/types.yaml#/components/schemas/DateTimeType'

      required:
        - AdministrativeReferenceCode
        - SequenceNumber

    EadType1005:
      type: object
      description: |
        | Nom de l'élément     | Référentiels | Règles | Conditions |
        |----------------------|--------------|--------|------------|
        | LocalReferenceNumber |              | BR001  | NA         |
      properties:
        LocalReferenceNumber:
          $ref: '../ie/types.yaml#/components/schemas/LocalReferenceNumberType'