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
  /modelObjets:
    post:
      summary: TODO-Supprimer le chemin
      operationId: modelObjets
      responses:
        '200':
          description: 'Ensemble des objets'

components:
  schemas:
    ErrorCodes:
      type: integer
      minimum: 0
      description: |
        Error Codes :
         * `0` - Autre
         * `1` - Erreur inconnue
         * `2` - Erreur technique
         * `12` - Valeur incorrect (code)
         * `15` - Non supporté à cette position
         * `26` - Doublon détecté
         * `90` - CRA inconnu
         * `91` - Numéro de référence local en doublon
         * `92` - Dépassement de la séquence
         * `93` - Numéro de CRA incorrect
      enum:
        - 0
        - 1
        - 2
        - 12
        - 15
        - 26
        - 90
        - 91
        - 92
        - 93

    IdCompteProDouaneType:
      type: string
      maxLength: 255
      description: Id Compte Pro Douane

    NomCompteProDouaneType:
      type: string
      maxLength: 255
      description: Nom Compte Pro Douane

    LSDOriginalAttributeValueType:
      type: string
      maxLength: 350
      description: LSDOriginalAttributeValueType

    LSDErrorReasonType:
      type: string
      maxLength: 350
      description: LSDErrorReasonType

    IndicOrigineMessageType:
      type: string
      minLength: 1
      maxLength: 1
      description: IndicOrigineMessageType

    DateNatType:
      type: string
      description: Date au format YYYYMMDD
      pattern: ^([0-9]){8}$
      example: 95744433

    TypeCirc1:
      type: string
      maxLength: 2
      description: TypeCirc1

    TypeCirc2:
      type: string
      maxLength: 3
      description: TypeCirc2

    PaysType:
      type: string
      maxLength: 35
      minLength: 1
      example: cCy6+3"`P(V)*7+Kg1$|eQkpa2-b?*
      description: PaysType

    IndicExport:
      type: string
      minLength: 1
      maxLength: 1
      description: IndicExport

    IndicExo:
      type: string
      maxLength: 1
      example: L
      description: IndicExo

    NumAcciseType:
      type: string
      pattern: ^([a-zA-Z]){2}([a-zA-Z0-9]){11}$
      description: NumAcciseType
      example:
        - XzSjP3RXErGzR
        - UvsNeLlSX9Tnr

    NumAcciseAnnulType:
      type: string
      maxLength: 16
      minLength: 1
      example: Q#g,;!GJO;c
      description: NumAcciseAnnulType

    NumAccExpType:
      type: string
      pattern: ^([a-zA-Z]){2}([a-zA-Z0-9]){11}$
      description: NumAccExpType

    NumAccDestType:
      type: string
      maxLength: 16
      minLength: 1
      example: l-iJPpH|=\EF
      description: NumAccDestType

    NumTVAType:
      type: string
      maxLength: 35
      minLength: 1
      example: 6E%?R0Dn#pP~Gim,2Nj
      description: NumTVAType

    NomType:
      type: string
      maxLength: 35
      minLength: 1
      example: 6-|^WCnf:0[RXQ1h68[y|&rnf[HN
      description: NomType

    AdresseType:
      type: string
      maxLength: 65
      minLength: 1
      description: Adresse
      example: l@}Bqy\~mjRza39GeS;yKBqYRj6xzK2;OM+)TH^`u~6Gc&o:!gfEY

    CodePostalType:
      type: string
      maxLength: 9
      minLength: 1
      example: c(9Y;:(z
      description: CodePostalType

    NumPageType:
      type: string
      maxLength: 4
      description: NumPage

    PageStepType:
      type: string
      maxLength: 4
      description: PageStep

    MaxOccType:
      type: string
      maxLength: 4
      description: MaxOcc

    VilleType:
      type: string
      maxLength: 35
      minLength: 1
      description: Ville
      example: :U!}jkbz's(ç&_sj

    BureauType:
      type: string
      pattern: ^([a-zA-Z]){2}([a-zA-Z0-9]){6}$
      example: KsBsBdMA
      description: BureauType

    MiseRegDouaType:
      type: string
      maxLength: 350
      minLength: 1
      description: MiseRegDouaType
      example: H:}>POlA+BK2;Z^ZmO".Frc{K7]+\I:W6H8*OzBYc$s{"8M}_$e/q'!qs[kMu=NvvY50Epe,7OBHS&E|Zk7Kq[|Hlh

    BurSortie:
      type: string
      pattern: ^([a-zA-Z]){2}([a-zA-Z0-9]){6}$
      example: XWgfBy4W
      description: BurSortie

    CodeCompl:
      type: string
      minLength: 4
      maxLength: 4
      description: CodeCompl

    QuantityUnitType:
      type: string
      minLength: 1
      maxLength: 1
      description: Quantity Unit

    IdCdr:
      type: string
      description: IdCdr
      minLength: 1
      maxLength: 21
      example: DlgUfAOiC3cSkaG

    DocumentReferenceNumberType:
      type: string
      description: Document Reference number
      minLength: 1
      maxLength: 21
      example: DlgUf;A#OiC3cSk[aG

    DauNumType:
      type: string
      description: Dau numéro
      maxLength: 22
      minLength: 1
      example: DlgUf;A#OiC3cSk[aG

    DateCreation:
      type: string
      description: DateCreation
      minLength: 8
      maxLength: 8

    AadReferenceCodeType:
      type: string
      description: AAD Reference Code
      maxLength: 21
      minLength: 1
      example: DlgUf;A#OiC3cSk[aG

    NomMod:
      type: string
      maxLength: 35
      minLength: 1
      description: NomMod
      example: z#soT<l:)b]{s4gX90}^}XQG]

    IdModelType:
      type: string
      maxLength: 21
      minLength: 1
      description: IdModelType
      example: z#soT<l:)b]{s4gX90}^}XQG]

    IdAgentType:
      type: string
      maxLength: 50
      minLength: 1
      description: IdAgentType
      example: ^{29LmF(:^Ov5,LAQeueHVuA#f5riwu6@G[\*O$K6(,Y

    NomAgentType:
      type: string
      maxLength: 50
      minLength: 1
      description: NomAgentType
      example: ^{29LmF(:^Ov5,LAQeueHVuA#f5riwu6@G[\*O$K6(,Y

    FoncAgentType:
      type: string
      maxLength: 100
      minLength: 1
      description: FoncAgentType
      example: N\lG$=QZF7Z!,tOkD%*g8[nte/jY{aW|ipic(WJ8H$aw+sJrDXJ@r*Z6vI_Z")r;'-N8x]v{w%]>

    GradAgentType:
      type: string
      maxLength: 100
      minLength: 1
      description: GradAgentType
      example: N\lG$=QZF7Z!,tOkD%*g8[nte/jY{aW|ipic(WJ8H$aw+sJrDXJ@r*Z6vI_Z")r;'-N8x]v{w%]>

    NRefBurAgentType:
      type: string
      description: NRefBurAgent
      pattern: ^([a-zA-Z]){2}([a-zA-Z0-9]){6}$
      example: gOzGoueH

    IndServRattType:
      type: integer
      maximum: 9
      description: IndServRatt

    DateValidationBisType:
      type: string
      description: DateValidationBis
      maxLength: 14

    DateValidationType:
      type: string
      description: DateValidation
      maxLength: 8

    CommentaireType:
      type: string
      maxLength: 350
      minLength: 1
      description: Commentaire
      example: N\lG$=QZF7Z!,tOkD%*g8[nte/jY{aW|ipic(WJ8H$aw+sJrDXJ@r*Z6vI_Z")r;'-N8x]v{w%]>

    PostcodeType:
      type: string
      maxLength: 10
      description: Postcode
      minLength: 1
      example: s-N]v{w%]>

    CityType:
      type: string
      maxLength: 50
      minLength: 1
      description: City
      example: JiDAB{xuupi(jK~N

    StreetNameType:
      type: string
      maxLength: 65
      description: StreetName
      minLength: 1
      example: 8Vx`1>)Ed3@@<d0q/Ap]M0P'=au%LCg0#${.gWY7wTJxg\vFsOAuC`U2|6%]@qoT

    StreetNumberType:
      type: string
      maxLength: 11
      minLength: 1
      description: StreetNumber
      example: m5:8sCU

    CrosscheckingType:
      type: string
      minLength: 1
      maxLength: 1
      description: Crosschecking

    CirculationType:
      type: object
      properties:
        TypeCirc1:
          $ref: '#/components/schemas/TypeCirc1'
        LbCirc1:
          type: string
        TypeCirc2:
          $ref: '#/components/schemas/TypeCirc2'
        LbCirc2:
          type: string
      required:
        - TypeCirc1

    AuthentificationType:
      type: object
      properties:
        IdCompteProDouane:
          $ref: '#/components/schemas/IdCompteProDouaneType'
        NomCompteProDouane:
          $ref: '#/components/schemas/NomCompteProDouaneType'

    NationalType:
      allOf:
        - $ref: '#/components/schemas/IdCdr'

    ExciseMovementEadBrouillonType:
      type: object
      properties:
        AdministrativeReferenceCode:
          $ref: '../ie/types.yaml#/components/schemas/AdministrativeReferenceCodeType'
        NumAcciseSuppr:
          $ref: '#/components/schemas/NumAccExpType'
      required:
        - NumAcciseSuppr

    ExciseMovementEaadBrouillonType:
      type: object
      properties:
        AadReferenceCode:
          $ref: '../ie/types.yaml#/components/schemas/AdministrativeReferenceCodeType'
        NumAcciseSuppr:
          $ref: '#/components/schemas/NumAccExpType'

    DAAPapierType:
      type: object
      properties:
        NRefLoc:
          type: string
          maxLength: 22
          description: NRefLoc
        DateValidDAA:
          type: string
          format: date
          description: DateValidDAA
      required:
        - DateValidDAA

    DSAPapierType:
      type: object
      properties:
        NRefLoc:
          type: string
          maxLength: 22
          description: NRefLoc
        DateValidDSA:
          type: string
          format: date
          description: DateValidDSA
      required:
        - DateValidDAA

    DeliveryPlaceTraderType:
      type: object
      properties:
        TraderId:
          type: string
          minLength: 16
          maxLength: 16
        TraderNameType:
          type: string
          maxLength: 182
      required:
        - TraderNameType

    DispatchImportOfficeType:
      type: object
      properties:
        ReferenceNumber:
          type: string
          minLength: 8
          maxLength: 8

    PlaceOfDispatchTraderType:
      type: object
      properties:
        ReferenceOfTaxWarehouse:
          type: string
          minLength: 13
          maxLength: 13
        TraderName:
          type: string
          maxLength: 182
      required:
        - ReferenceOfTaxWarehouse

    ExciseMovementEaadType:
      type: object
      properties:
        IdModel:
          $ref: '#/components/schemas/IdModelType'
        NumAccise:
          $ref: '#/components/schemas/NumAccExpType'
      required:
        - IdModel
        - NumAccise

    ConsignorTraderType:
      type: object
      properties:
        IdExp:
          $ref: '#/components/schemas/NumAccExpType'
      required:
        - IdExp

    ConsigneeTrader-DemType:
      type: object
      description: ConsigneeTrader-Dem
      properties:
        TraderID:
          type: string
          minLength: 16
          maxLength: 16
        TraderName:
          type: string
          maxLength: 182
      required:
        - TraderName

    ConsigneeTraderType:
      type: object
      description: ConsigneeTrader
      properties:
        IdDest:
          $ref: '#/components/schemas/NumAccDestType'
      required:
        - IdDest

    TransportArrangerTraderType:
      type: object
      description: TransportArrangerTrader
      properties:
        VatNumber:
          type: string
          minLength: 35
          maxLength: 35
        TraderName:
          type: string
          maxLength: 182
      required:
        - TraderName

    FirstTransporterTraderType:
      type: object
      description: FirstTransporterTrader
      properties:
        VatNumber:
          type: string
          minLength: 35
          maxLength: 35
        TraderName:
          type: string
          maxLength: 182
      required:
        - TraderName

    ExciseProductsCategoryType:
      type: object
      description: ExciseProductsCategory
      properties:
        ExciseProductsCategoryCode:
          type: string
          minLength: 1
          maxLength: 1
      required:
        - ExciseProductsCategoryCode

    DeliveryPlaceCustomsOfficeType:
      type: object
      properties:
        RefenceNumber:
          type: string
          minLength: 8
          maxLength: 8
      required:
        - RefenceNumber

    ExciseMovementEaad:
      type: object
      properties:
        AadReferenceCode:
          $ref: '#/components/schemas/AadReferenceCodeType'
        DateOfValidationOfEaad:
          type: string
          format: date-time
        SequenceNumber:
          type: string
          maxLength: 2
      required:
        - AadReferenceCode
        - DateOfValidationOfEaad
        - SequenceNumber

    AgentType:
      type: object
      properties:
        IdentifiantAgent:
          $ref: '#/components/schemas/IdAgentType'
        NomAgent:
          $ref: '#/components/schemas/NomAgentType'
        FonctionAgent:
          $ref: '#/components/schemas/FoncAgentType'
        GradeAgent:
          $ref: '#/components/schemas/GradAgentType'
        Bureau:
          $ref: '#/components/schemas/BureauType'
        BureauAcs:
          type: string
      required:
        - IdentifiantAgent
        - NomAgent
        - FonctionAgent
        - GradeAgent

    CompetentAuthorityOfficeType:
      type: object
      properties:
        Bureau:
          type: string
          maxLength: 50
        IndServRatt:
          type: integer
          maximum: 9
      required:
        - Bureau

    CommentsType:
      type: object
      properties:
        DateEm:
          $ref: '#/components/schemas/DateValidationBisType'
        CommentaireDaa:
          $ref: '#/components/schemas/CommentaireType'
      required:
        - DateEm
        - CommentaireDaa

    OrigineMessageType:
      type: object
      properties:
        IndicOrigineMessage:
          $ref: '#/components/schemas/IndicOrigineMessageType'
      required:
        - IndicOrigineMessage

    IdDSAType:
      type: string
      maxLength: 21
      minLength: 1
      description: IdDSAType

    ExciseMovementEsadType:
      type: object
      properties:
        IdDSA:
          $ref: '#/components/schemas/IdDSAType'
        NumAccExpType:
          $ref: '#/components/schemas/NumAccExpType'
      required:
        - IdDSA
        - NumAccExpType

    ExciseMovementDSAbisType:
      type: object
      properties:
        IdDSA:
          $ref: '#/components/schemas/IdDSAType'
        DateValidationDSA:
          $ref: '#/components/schemas/DateCreation'
      required:
        - IdDSA
        - DateValidationDSA

    ExciseMovementEDSAType:
      type: object
      properties:
        IdDSA:
          $ref: '#/components/schemas/IdDSAType'
        DateValidationDSA:
          type: string
          format: date-time
      required:
        - IdDSA
        - DateValidationDSA

    CompetentAuthorityBisType:
      type: object
      properties:
        NomBur:
          $ref: '#/components/schemas/NomType'
        StreetNamebur:
          $ref: '#/components/schemas/StreetNameType'
        StreetNumberbur:
          $ref: '#/components/schemas/StreetNumberType'
        Postcodebur:
          $ref: '#/components/schemas/PostcodeType'
        Citybur:
          $ref: '#/components/schemas/CityType'
        Paysbur:
          $ref: '#/components/schemas/PaysType'
        Codebur:
          $ref: '#/components/schemas/CodebureauType'

    CompetentAuthorityType:
      type: object
      properties:
        NomBur:
          $ref: '#/components/schemas/NomType'
        StreetNamebur:
          $ref: '#/components/schemas/StreetNameType'
        StreetNumberbur:
          $ref: '#/components/schemas/StreetNumberType'
        Postcodebur:
          $ref: '#/components/schemas/PostcodeType'
        Citybur:
          $ref: '#/components/schemas/CityType'
        Paysbur:
          $ref: '#/components/schemas/PaysType'
        Codebur:
          $ref: '#/components/schemas/CodebureauType'
      required:
        - NomBur
        - StreetNamebur
        - Postcodebur
        - Citybur
        - Paysbur

    CirculationDSAType:
      type: object
      properties:
        TypeCirc1:
          $ref: '#/components/schemas/TypeCirc1'

    TVANumType:
      type: string
      maxLength: 14
      minLength: 1
      description: TVANumType

    TVANumFRType:
      type: string
      maxLength: 13
      minLength: 1
      example: uV2a;{{lpy hM
      description: TVANumFRType

    CodebureauType:
      type: string
      pattern: ^([a-zA-Z]){2}([a-zA-Z0-9]){6}$
      example: mWVDJjg4
      description: CodebureauType

    UtNumType:
      type: string
      maxLength: 35
      minLength: 1
      example: bZ\%DdS1+s\+SZd
      description: UtNumType

    Prix:
      type: string
      maxLength: 10
      pattern: ^(0|([1-9]\d{0,9}))$
      example: "5850130 ou 95991385 ou 1234567890"
      description: Prix

    DateType:
      type: string
      pattern: ^\d{2}/\d{2}/\d{4}$
      example: 23/12/2048
      description: DateType

    IndRembType:
      type: string
      description: IndRembType
      maxLength: 1

    typeImpression:
      type: integer
      description: typeImpression
      maximum: 9

    StatutDsaType:
      type: string
      description: StatutDsaType
      maxLength: 15
      minLength: 1
      example: 56XLyO,_xp:PS

    NumDeclType:
      type: string
      description: NumDeclType
      maxLength: 50
      minLength: 1
      example: cQ;`,8H)3jW\f]

    FormalitesBisType:
      type: object
      properties:
        NumDecl:
          $ref: '#/components/schemas/NumDeclType'
        DateDecl:
          $ref: '#/components/schemas/DateType'
        IndRemb:
          $ref: '#/components/schemas/IndRembType'

    FormalitesType:
      type: object
      properties:
        NumDecl:
          $ref: '#/components/schemas/NumDeclType'
        DateDecl:
          $ref: '#/components/schemas/DateType'
        IndRemb:
          $ref: '#/components/schemas/IndRembType'
      required:
        - NumDecl
        - DateDecl
        - IndRemb

    NationType:
      type: object
      properties:
        TypeErreur:
          $ref: '#/components/schemas/TypeErreurType'
        RaisonErreur:
          $ref: '#/components/schemas/RaisonErreurType'
      required:
        - TypeErreur

    TypeErreurType:
      type: string
      maxLength: 15
      minLength: 1
      description: TypeErreurType
      example: KWPX;y/[aw-D^

    RaisonErreurType:
      type: string
      description: RaisonErreurType
      maxLength: 350
      minLength: 1
      example: u`AzBUh<2D\uc7XoV0Njbw`JMFsatQ}A0bf#~3u)HZo>&b<.r@deT<=a$JkzCZ_

    DateRefus:
      allOf:
        - $ref: '#/components/schemas/DateRefusType'

    DateRefusType:
      type: object
      description: DateRefusType
      properties:
        RejectionDate:
          type: string
          format: date-time
      required:
        - RejectionDate

    BodyRecordUniqueReferenceType:
      type: string
      description: Body Record Unique Reference
      pattern: ^[0-9]{1,3}$
      example: 933

    MessageType:
      type: string
      maxLength: 10
      minLength: 1
      example: V0Njbw`JM
      description: MessageType

    GlobalConclusionOfReceipt:
      type: integer
      minimum: 1
      description: |
        Global Conclusion Of Receipt :
         * `1` - Receipt accepted and satisfactory
         * `2` - Receipt accepted although unsatisfactory
         * `3` - Receipt refused
         * `4` - Receipt partially refused
         * `11` - Export Refused
         * `21` - Exit accepted and satisfactory
         * `22` - Exit accepted although unsatisfactory
         * `23` - Exit refused
      enum:
        - 1
        - 2
        - 3
        - 4
        - 11
        - 21
        - 22
        - 23

    EoriNumberType:
      type: string
      maxLength: 17
      description: EoriNumberType

    ExemptQuantityType:
      description: ExemptQuantityType
      type: string
      pattern: ^([0-9]\d{0,14})$|^(([0-9]\d{0,13}|0)\.[0-9])$|^(([0-9]\d{0,12}|0)\.\d[0-9])$|^(([0-9]\d{0,11}|0)\.\d\d[0-9])$
      example: "5850130 ou 95991385.9 ou 32284479386.83 ou 50422051684.144"

    SuspendedQuantityType:
      description: SuspendedQuantityType
      type: string
      pattern: ^([0-9]\d{0,14})$|^(([0-9]\d{0,13}|0)\.[0-9])$|^(([0-9]\d{0,12}|0)\.\d[0-9])$|^(([0-9]\d{0,11}|0)\.\d\d[0-9])$
      example: "5850130 ou 95991385.9 ou 32284479386.83 ou 50422051684.144"

    ConsumptionQuantityType:
      description: ConsumptionQuantityType
      type: string
      pattern: ^([0-9]\d{0,14})$|^(([0-9]\d{0,13}|0)\.[0-9])$|^(([0-9]\d{0,12}|0)\.\d[0-9])$|^(([0-9]\d{0,11}|0)\.\d\d[0-9])$
      example: "5850130 ou 95991385.9 ou 32284479386.83 ou 50422051684.144"