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
  /802:
    post:
      summary: Définition d'un message 802
      operationId: message802
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BodyType802'
      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:
    BodyType802:
      type: object
      properties:
        ReminderMessageForExciseMovement:
          $ref: '#/components/schemas/ReminderMessageForExciseMovementType'
      required:
        - ReminderMessageForExciseMovement

    ReminderMessageForExciseMovementType:
      properties:
        Attributes:
          $ref: '#/components/schemas/AttributesType802'
        ExciseMovement:
          $ref: '#/components/schemas/ExciseMovementType802'
      required:
        - Attributes
        - ExciseMovement

    AttributesType802:
      type: object
      description: |
        | **Nom de l'élément**             | **Référentiels** | **Règles** | **Conditions** |
        |----------------------------------|------------------|------------|----------------|
        | DateAndTimeOfInssuanceOfReminder |                  |            |                |
        | ReminderInformation              |                  |            |                |
        | language                         | Ref_28 (BC12)    |            | IC_RG_C002     |
        | LimitDateAndTime                 |                  |            |                |
        | ReminderMessageType              | Ref_41 (TC48)    |            |                |
        | Crosschecking                    |                  |            |                |
      properties:
        DateAndTimeOfIssuanceOfReminder:
          $ref: '../ie/types.yaml#/components/schemas/DateTimeType'
        ReminderInformation:
          $ref: '#/components/schemas/LSDReminderInformationType'
        LimitDateAndTime:
          $ref: '../ie/types.yaml#/components/schemas/DateTimeType'
        ReminderMessageType:
          $ref: '../ie/tcl.yaml#/components/schemas/ReminderMessageType'
        Crosschecking:
          type: string
        __language:
          $ref: '../ie/types.yaml#/components/schemas/LanguageCodeType'
      required:
        - DateAndTimeOfIssuanceOfReminder
        - LimitDateAndTime
        - ReminderMessageType

    ExciseMovementType802:
      type: object
      description: |
        | **Nom de l'élément**        | **Référentiels** | **Règles**               | **Conditions** |
        |-----------------------------|------------------|--------------------------|----------------|
        | AdministrativeReferenceCode |                  | IC_RG_R030<br>IC_RG_R273 |                |
        | SequenceNumber              |                  | IC_RG_R232               |                |
      properties:
        AdministrativeReferenceCode:
          $ref: '../ie/types.yaml#/components/schemas/AdministrativeReferenceCodeType'
        SequenceNumber:
          $ref: '../ie/types.yaml#/components/schemas/SequenceNumberType'
      required:
        - AdministrativeReferenceCode
        - SequenceNumber

    LSDReminderInformationType:
      type: object
      properties:
        _content_:
          $ref: '../ie/types.yaml#/components/schemas/ReminderInformationType'
        __language:
          $ref: '../ie/types.yaml#/components/schemas/LanguageCodeType'
      required:
        - __language
        - _content_
