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
  /803:
    post:
      summary: Définition d'un message 803
      operationId: message803
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BodyType803'
      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:
    BodyType803:
      type: object
      properties:
        NotificationOfDivertedEADESAD:
          $ref: '#/components/schemas/NotificationOfDivertedEADESADType'
      required:
        - NotificationOfDivertedEADESAD

    NotificationOfDivertedEADESADType:
      type: object
      properties:
        ExciseNotification:
          $ref: '#/components/schemas/ExciseNotificationType'
      required:
        - ExciseNotification

    ExciseNotificationType:
      type: object
      description: |
        | **Nom de l'élément**        | **Référentiels** | **Règles**            | **Conditions** |
        |-----------------------------|------------------|-----------------------|----------------|
        | NotificationType            | Ref_66 (TC42)    |                       |                |
        | NotificationDateAndTime     |                  |                       |                |
        | AdministrativeReferenceCode |                  | IC_RG_R030            |                |
        | SequenceNumber              |                  | IC_RG_R232 IC_RG_R255 |                |
      properties:
        NotificationType:
          $ref: '../ie/tcl.yaml#/components/schemas/NotificationType'
        NotificationDateAndTime:
          $ref: '../ie/types.yaml#/components/schemas/DateTimeType'
        AdministrativeReferenceCode:
          $ref: '../ie/types.yaml#/components/schemas/AdministrativeReferenceCodeType'
        SequenceNumber:
          $ref: '../ie/types.yaml#/components/schemas/SequenceNumberType'
      required:
        - NotificationType
        - NotificationDateAndTime
        - AdministrativeReferenceCode
        - SequenceNumber
