openapi: 3.0.1
info:
  title: Euromaster Alliance Logistics API
  description: >
    Euromaster services to provide access to Euromaster's stock. Partners can
    then buy Euromaster's article and request information regarding the
    deliveries.

    Euromaster implements the __EDIWHEEL__ standard
  version: '1.0'
  contact:
    email: dis.euromaster.integration@euromaster.com
servers:
  - url: https://ws.euromastergroup.com/services/franchisee/
    description: PROD Euromaster
  - url: https://ws-test.euromastergroup.com/services/franchisee/
    description: UAT Euromaster
  - url: https://ws-dev.euromastergroup.com/services/franchisee/
    description: DEV Euromaster
security:
  - basicAuth: []
paths:
  /CustomerInquiry:
    post:
      summary: Request to check the product availability at EDIWHEEL A2 format
      responses:
        '200':
          description: Successfull
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/quote_A2'
        '400':
          description: The request sent by the client application is incorrect
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/error'
        '401':
          description: Basic authentification required
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: >-
            The source application is not autorised to access the service or the
            requester is not authorised (unknown pos for example)
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/error'
        '460':
          description: The provider answers is not readable (bad format)
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/error'
        '461':
          description: The provider raised and caught an exception
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/error'
        '500':
          description: Internal Server Error
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/error'
        '503':
          description: Service Currently Unavailable
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/error'
        '504':
          description: Gateway Timeout
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        $ref: '#/components/requestBodies/inquiry'
  /CustomerOrder:
    post:
      summary: Request to order products
      responses:
        '200':
          description: Successfull
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/order_response_A2'
      requestBody:
        $ref: '#/components/requestBodies/order'
  /CustomerDesadv:
    post:
      summary: Request to know the upcoming (and past) deliveries
      responses:
        '200':
          description: Successfull
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/desadv_list'
      requestBody:
        $ref: '#/components/requestBodies/desadv'
components:
  schemas:
    inquiry_A2:
      properties:
        DocumentID:
          type: string
          maxLength: 17
          enum:
            - A2
          description: Message version (currently only __A2__ supported)
          maximum: 1
        Variant:
          type: string
          maxLength: 1
          enum:
            - 5
          description: Message variant (currently only __5__ supported)
          maximum: 1
        TransportPriority:
          type: string
          maxLength: 4
          enum:
            - REPL RUSH SEAS
          description: |
            To express if the request has a specific priority
             - REPL for REPLenishment
             - RUSH for RUsh ORder
             - SEAS for SEASonal order
            If not set => no specific priority
          maximum: 1
        Campaign:
          type: string
          maxLength: 12
          description: Identifies if the request is related to a sale campaign/promotion
          maximum: 1
        SubstitutionIndicator:
          type: string
          maxLength: 1
          enum:
            - 'Y'
            - 'N'
          description: Identifies if article substitution is required. Yes/No flag
          maximum: 1
        CustomerReference:
          properties:
            DocumentID:
              type: string
              maxLength: 35
              description: Customer reference
              maximum: 1
          required:
            - DocumentID
        BuyerParty:
          $ref: '#/components/schemas/partyID'
        OrderingParty:
          $ref: '#/components/schemas/partyID'
        Consignee:
          $ref: '#/components/schemas/partyID'
        PaymentTerms:
          properties:
            PaymentMethod:
              type: string
              enum:
                - C
                - K
              description: Payment method (C = cash ; K = Credit Card)
              maximum: 1
          required:
            - PaymentMethod
        OrderLine:
          properties:
            LineID:
              type: string
              maxLength: 6
              description: Line identification number
              maximum: 1
            OrderedArticle:
              properties:
                ArticleIdentification:
                  $ref: '#/components/schemas/articleDef'
                RequestedDeliveryDate:
                  type: string
                  format: \d[4]-\d[2]-\d[2]
                  maximum: 1
                RequestedQuantity:
                  properties:
                    QuantityValue:
                      type: number
                      description: Requested quantity
                      maximum: 1
                  required:
                    - QuantityValue
              maximum: 1
              required:
                - ArticleIdentification
                - RequestedQuantity
          required:
            - LineID
            - ArticleIdentification
      required:
        - DocumentID
        - Variant
        - BuyerParty
        - OrderLine
    quote_A2:
      properties:
        DocumentID:
          type: string
          maxLength: 17
          enum:
            - A2
          description: Message version (currently only __A2__ supported)
          maximum: 1
        Variant:
          type: string
          maxLength: 1
          enum:
            - 5
          description: Message variant (currently only __5__ supported)
          maximum: 1
        TransportPriority:
          type: string
          maxLength: 4
          enum:
            - REPL RUSH SEAS
          description: |
            To express if the request has a specific priority
             - REPL for REPLenishment
             - RUSH for RUsh ORder
             - SEAS for SEASonal order
            If not set => no specific priority
          maximum: 1
        Campaign:
          type: string
          maxLength: 12
          description: Identifies if the request is related to a sale campaign/promotion
          maximum: 1
        ErrorHead:
          properties:
            ErrorCode:
              type: string
              enum:
                - 0
                - 1
                - 302
                - 303
              description: >
                Error Code

                - 0: No errors occurred

                - 1: At least one item is incorrect. Details are distinctive in
                the error field on item level

                - 302: No connection to ERP system (inquiry)
              maximum: 1
          required:
            - ErrorCode
        CustomerReference:
          properties:
            DocumentID:
              type: string
              maxLength: 35
              description: Customer reference
              maximum: 1
          required:
            - DocumentID
        BuyerParty:
          $ref: '#/components/schemas/partyID'
        OrderingParty:
          $ref: '#/components/schemas/partyID'
        Consignee:
          $ref: '#/components/schemas/partyID'
        PaymentTerms:
          properties:
            PaymentMethod:
              type: string
              enum:
                - C
                - K
              description: Payment method (C = cash ; K = Credit Card)
              maximum: 1
          required:
            - PaymentMethod
        OrderLine:
          properties:
            LineID:
              type: string
              maxLength: 6
              description: Line identification number
              maximum: 1
            OrderedArticle:
              properties:
                ArticleIdentification:
                  $ref: '#/components/schemas/articleDef'
                ArticleDescription:
                  properties:
                    ArticleDescriptionText:
                      type: string
                      maxLength: 60
                      description: Article desciption
                      maximum: 1
                  required:
                    - ArticleDescriptionText
                Availability:
                  type: string
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                  maximum: 1
                  description: >
                    Article availability

                    - 0: Error, no availability could be determined

                    - 1: The article is immediatly available in the requested
                    quantity

                    - 2: The article isn't available in the requested quantity
                    for the requested delivery date, so temporarily delays
                    orpartial deliveries could occur. Here the announced
                    quantity should be consistent

                    - 3: The article is currently not available
                ArticleComment:
                  type: string
                  maxLength: 60
                  description: Article comment
                  maximum: 1
                RequestedQuantity:
                  properties:
                    QuantityValue:
                      type: number
                      maximum: 1
                  required:
                    - QuantityValue
                  description: Article requested quantity
                  maximum: 1
                Error:
                  properties:
                    ErrorCode:
                      type: string
                      enum:
                        - 0
                        - 499
                        - 902
                      description: |
                        Error Code
                        - 0: No errors occurred
                        - 499: Miscellaneous - processing error
                      maximum: 1
                    ErrorText:
                      type: string
                      maxLength: 60
                      description: Error text
                      maximum: 1
                  required:
                    - ErrorCode
                ScheduleDetails:
                  $ref: '#/components/schemas/schedule'
                substitutingArticle:
                  properties:
                    ArticleIdentification:
                      $ref: '#/components/schemas/articleDef'
                    ArticleDescription:
                      properties:
                        ArticleDescriptionText:
                          type: string
                          maxLength: 60
                          description: Article desciption
                          maximum: 1
                      required:
                        - ArticleDescriptionText
                    QuantityAtDate:
                      properties:
                        DeliveryDate:
                          type: string
                          format: \d[4]-\d[2]-\d[2]
                          description: Estimated delivery date
                        AvailableQuantity:
                          properties:
                            QuantityValue:
                              type: number
                          required:
                            - QuantityValue
                      required:
                        - DeliveryDate
                        - AvailableQuantity
                  required:
                    - ArticleIdentification
              required:
                - ArticleIdentification
                - RequestedQuantity
                - Error
                - ScheduleDetails
          required:
            - LineID
            - OrderedArticle
      required:
        - DocumentID
        - ErrorHead
        - BuyerParty
        - OrderLine
    order_A2:
      properties:
        DocumentID:
          type: string
          maxLength: 17
          enum:
            - A2
          description: Message version (currently only __A2__ supported)
          maximum: 1
        Variant:
          type: string
          maxLength: 1
          enum:
            - 5
          description: Message variant (currently only __5__ supported)
          maximum: 1
        EarliestDeliveryDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: Earliest delivery date at the place of delivery
          maximum: 1
        TransportPriority:
          type: string
          maxLength: 4
          enum:
            - REPL RUSH SEAS
          description: |
            To express if the request has a specific priority
             - REPL for REPLenishment
             - RUSH for RUsh ORder
             - SEAS for SEASonal order
            If not set => no specific priority
          maximum: 1
        Campaign:
          type: string
          maxLength: 12
          description: Identifies if the request is related to a sale campaign/promotion
          maximum: 1
        DeliveryRemarks:
          type: string
          maxLength: 70
          description: Remarks related to the delivery
          maximum: 1
        BlanketOrderReference:
          properties:
            DocumentID:
              type: string
              maxLength: 35
              description: Reference to contract number
              maximum: 1
          required:
            - DocumentID
        CustomerReference:
          properties:
            DocumentID:
              type: string
              maxLength: 35
              description: Customer order number
              maximum: 1
          required:
            - DocumentID
        BuyerParty:
          $ref: '#/components/schemas/partyID'
        OrderingParty:
          $ref: '#/components/schemas/partyID'
        Consignee:
          $ref: '#/components/schemas/partyID'
        PaymentTerms:
          properties:
            PaymentMethod:
              type: string
              enum:
                - C
                - K
              description: Payment method (C = cash ; K = Credit Card)
              maximum: 1
          required:
            - PaymentMethod
        OrderLine:
          properties:
            LineID:
              type: string
              maxLength: 6
              description: Line identification number
              maximum: 1
            PortalReference:
              type: string
              maxLength: 14
              description: Portal reference, for statistic purposes, useless
              maximum: 1
            AdditionalCustomerReferenceNumber:
              properties:
                DocumentID:
                  type: string
                  maxLength: 35
                  description: >-
                    Customer's reference to the business transation on item
                    level
              required:
                - DocumentID
            OrderedArticle:
              properties:
                ArticleIdentification:
                  $ref: '#/components/schemas/articleDef'
                RequestedDeliveryDate:
                  type: string
                  format: \d[4]-\d[2]-\d[2]
                  maximum: 1
                RequestedQuantity:
                  properties:
                    QuantityValue:
                      type: number
                      description: Requested quantity
                      maximum: 1
                  required:
                    - QuantityValue
              description: Article information
              maximum: 1
              required:
                - ArticleIdentification
                - RequestedQuantity
          required:
            - LineID
            - ArticleIdentification
      required:
        - DocumentID
        - CustomerReference
        - BuyerParty
        - OrderLine
    order_response_A2:
      properties:
        DocumentID:
          type: string
          maxLength: 17
          enum:
            - A2
          description: Message version (currently only __A2__ supported)
          maximum: 1
        Variant:
          type: string
          maxLength: 1
          enum:
            - 5
          description: Message variant (currently only __5__ supported)
          maximum: 1
        EarliestDeliveryDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: Earliest delivery date at the place of delivery
          maximum: 1
        TransportPriority:
          type: string
          maxLength: 4
          enum:
            - REPL RUSH SEAS
          description: |
            To express if the request has a specific priority
             - REPL for REPLenishment
             - RUSH for RUsh ORder
             - SEAS for SEASonal order
            If not set => no specific priority
          maximum: 1
        Campaign:
          type: string
          maxLength: 12
          description: Identifies if the request is related to a sale campaign/promotion
          maximum: 1
        DeliveryRemarks:
          type: string
          maxLength: 70
          description: Remarks related to the delivery
          maximum: 1
        ErrorHead:
          properties:
            ErrorCode:
              type: string
              enum:
                - 0
                - 1
                - 302
                - 303
              description: >
                Error Code

                - 0: No errors occurred

                - 1: At least one item is incorrect. Details are distinctive in
                the error field on item level

                - 302: No connection to ERP system (inquiry)
              maximum: 1
          required:
            - ErrorCode
        BlanketOrderReference:
          properties:
            DocumentID:
              type: string
              maxLength: 35
              description: Reference to contract number
              maximum: 1
          required:
            - DocumentID
        CustomerReference:
          properties:
            DocumentID:
              type: string
              maxLength: 35
              description: Customer order number
              maximum: 1
          required:
            - DocumentID
        BuyerParty:
          $ref: '#/components/schemas/partyID'
        OrderingParty:
          $ref: '#/components/schemas/partyID'
        Consignee:
          $ref: '#/components/schemas/partyID'
        PaymentTerms:
          properties:
            PaymentMethod:
              type: string
              enum:
                - C
                - K
              description: Payment method (C = cash ; K = Credit Card)
              maximum: 1
          required:
            - PaymentMethod
        OrderLine:
          properties:
            LineID:
              type: string
              maxLength: 6
              description: Line identification number
              maximum: 1
            SuppliersOrderLineID:
              type: string
              maxLength: 6
              description: Supplier's order line identification number
              maximum: 1
            AdditionalCustomerReferenceNumber:
              properties:
                DocumentID:
                  type: string
                  maxLength: 35
                  description: >-
                    Customer's reference to the business transation on item
                    level
              required:
                - DocumentID
            OrderedArticle:
              properties:
                ArticleIdentification:
                  $ref: '#/components/schemas/articleDef'
                ArticleDescription:
                  properties:
                    ArticleDescriptionText:
                      type: string
                      maxLength: 60
                      description: Article desciption
                      maximum: 1
                  required:
                    - ArticleDescriptionText
                RequestedDeliveryDate:
                  type: string
                  format: \d[4]-\d[2]-\d
                  description: Requested delivery date
                  maximum: 1
                ArticleComment:
                  type: string
                  maxLength: 60
                  description: pecific information related to the article
                  maximum: 1
                OrderReference:
                  properties:
                    DocumentID:
                      type: string
                      maxLength: 35
                  required:
                    - DocumentID
                RequestedQuantity:
                  properties:
                    QuantityValue:
                      type: number
                      description: Requested quantity
                      maximum: 1
                  required:
                    - QuantityValue
                Error:
                  properties:
                    ErrorCode:
                      type: string
                      enum:
                        - 0
                        - 499
                        - 902
                      description: |
                        Error Code
                        - 0: No errors occurred
                        - 499: Miscellaneous - processing error
                      maximum: 1
                    ErrorText:
                      type: string
                      maxLength: 60
                      description: Error text
                      maximum: 1
                  required:
                    - ErrorCode
                ScheduleDetails:
                  $ref: '#/components/schemas/scheduleOrder'
                OrderedQuantity:
                  properties:
                    QuantityValue:
                      type: number
                      description: Ordered quantity
                      maximum: 1
              description: Article information
              maximum: 1
              required:
                - ArticleIdentification
                - ArticleDescription
                - RequestedQuantity
                - OrderReference
                - Error
                - ScheduleDetails
                - OrderedQuantity
          required:
            - LineID
            - OrderedArticle
      required:
        - DocumentID
    desadv_request:
      properties:
        DocumentID:
          type: string
          maxLength: 17
          enum:
            - B2
          description: Message version (currently only __B2__ supported)
          maximum: 1
        Variant:
          type: string
          maxLength: 1
          enum:
            - 1
          description: Message variant (currently only __1__ supported)
          maximum: 1
        DespatchFromDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: To Filter on a starting date
          maximum: 1
        DespatchToDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: To Filter on an ending date
          maximum: 1
        References:
          properties:
            DeliveryNoteReference:
              properties:
                DocumentID:
                  type: string
              description: Delivery note number assigned by Euromaster
              required:
                - DocumentID
        BuyerParty:
          $ref: '#/components/schemas/partyID'
        OrderingParty:
          $ref: '#/components/schemas/partyID'
        Consignee:
          $ref: '#/components/schemas/partyID'
      required:
        - DocumentID
        - BuyerParty
    desadv_list:
      properties:
        DocumentID:
          type: string
          maxLength: 17
          enum:
            - A2
          description: Message version (currently only __A2__ supported)
          maximum: 1
        Variant:
          type: string
          maxLength: 1
          enum:
            - 1
          description: Message variant (currently only __1__ supported)
          maximum: 1
        ErrorHead:
          properties:
            ErrorCode:
              type: string
              enum:
                - 0
                - 1
                - 302
                - 303
              description: >
                Error Code

                - 0: No errors occurred

                - 1: At least one item is incorrect. Details are distinctive in
                the error field on item level

                - 302: No connection to ERP system (inquiry)
              maximum: 1
          required:
            - ErrorCode
        desadv:
          $ref: '#/components/schemas/desadv'
      required:
        - DocumentID
    desadv:
      properties:
        IssueDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: Issuing date of the desadv
          maximum: 1
        DocumentNumber:
          type: string
          maxLength: 17
          description: Desadv number provided by Euromaster
          maximum: 1
        DespatchDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: Date when the goods leave the warehouse
          maximum: 1
        ArrivalDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: Goods estimated arrival date
          maximum: 1
        Measures:
          properties:
            GrossWeight:
              properties:
                Measure:
                  type: number
                  maxLength: 15
                  description: Gross weight of the shipment of the delivery
                  maximum: 1
                MeasureUnitCode:
                  type: string
                  enum:
                    - KGM
                  description: Only KGM allowed
                  maximum: 1
              required:
                - Measure
                - MeasureUnitCode
          required:
            - GrossWeight
        References:
          properties:
            SupplierOrderReference:
              properties:
                DocumentID:
                  type: string
                  maxLength: 17
                  description: Euromaster's order number
              required:
                - DocumentID
            BlanketOrderReference:
              properties:
                DocumentID:
                  type: string
                  maxLength: 35
                  description: N/A for Alliance Logistic
              required:
                - DocumentID
            BuyerOrderReference:
              properties:
                DocumentID:
                  type: string
                  maxLength: 35
                  description: Buyer's order number
              required:
                - DocumentID
            CustomerReference:
              properties:
                DocumentID:
                  type: string
                  maxLength: 35
                  description: Customer's Reference (N/A for Alliance)
              required:
                - DocumentID
            DeliveryListReference:
              properties:
                DocumentID:
                  type: string
                  maxLength: 35
                  description: '????'
                IssueDate:
                  type: string
                  format: \d[4]-\d[2]-\d[2]
                  description: '????'
              required:
                - DocumentID
            Other:
              properties:
                ReferenceTypeCode:
                  type: string
                  enum:
                    - AAS
                    - ABO
                    - ACC
                    - ACD
                    - UC
                    - UCN
                  description: '????'
                DocumentID:
                  type: string
                  maxLength: 35
                  description: '????'
              required:
                - ReferenceTypeCode
                - DocumentID
        BuyerParty:
          $ref: '#/components/schemas/partyID'
        SupplierParty:
          $ref: '#/components/schemas/partyID'
        SalesContact:
          properties:
            Name:
              type: string
              maxLength: 40
              description: Sales' contact name
              maximum: 1
          required:
            - Name
        ShippingLocation:
          properties:
            LocationName:
              type: string
              maxLength: 20
              description: Name of Euromaster's ditribution depot
              maximum: 1
          required:
            - LocationName
        OrderingParty:
          $ref: '#/components/schemas/partyID'
        Consignee:
          properties:
            PartyID:
              type: string
              maxLength: 17
              description: Identification of the party
              maximum: 1
            AgencyCode:
              type: string
              maxLength: 2
              enum:
                - 9
                - 91
                - 92
            Name:
              type: string
              maxLength: 40
              description: Name of the consignee site
              maximum: 4
            Address:
              $ref: '#/components/schemas/address'
      required:
        - IssueDate
        - DocumentNumber
        - DespatchDate
        - References
        - BuyerParty
        - Consignee
    schedule:
      properties:
        DeliveryDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: Estimated date of delivery
          maximum: 1
        AvailableQuantity:
          properties:
            QuantityValue:
              type: number
              description: Available quantity
          required:
            - QuantityValue
      required:
        - DeliveryDate
        - AvailableQuantity
    scheduleOrder:
      properties:
        DeliveryDate:
          type: string
          format: \d[4]-\d[2]-\d[2]
          description: Estimated date of delivery
          maximum: 1
        ConfirmedQuantity:
          properties:
            QuantityValue:
              type: number
              description: Confirmed quantity
          required:
            - QuantityValue
      required:
        - DeliveryDate
        - ConfirmedQuantity
    articleDef:
      properties:
        BuyersArticleID:
          type: string
          maxLength: 17
          description: The buyer's article id
          maximum: 1
        ManufacturersArticleID:
          type: string
          maxLength: 35
          description: >-
            The manufacturers' article id. Can be replace by the Euromaster's
            article ID
          maximum: 1
        EANUCCArticleID:
          type: string
          format: \d[13]
          description: EAN 13 (13 digits)
          maximum: 1
    partyID:
      properties:
        PartyID:
          type: string
          maxLength: 17
          description: Identification of the party
          maximum: 1
        AgencyCode:
          type: string
          maxLength: 2
          enum:
            - 9
            - 91
            - 92
          description: |
            Identifies the agency responsible for the referential (DocumentID)
            - 9 EAN (International Article Numbering association)
            - 91 Assigned by the seller
            - 92 Assigned by the buyer
          maximum: 1
      required:
        - PartyID
        - AgencyCode
    address:
      properties:
        Street:
          type: string
          maxLength: 40
          maximum: 3
        City:
          type: string
          maxLength: 40
          maximum: 1
        District:
          type: string
          maxLength: 40
          maximum: 1
        PostCode:
          type: string
          maxLength: 10
          maximum: 1
        SubCountry:
          type: string
          maxLength: 70
          maximum: 1
        CountryCode:
          type: string
          maxLength: 2
          description: Use SO 3166-1 alpha-2 country code list
          maximum: 1
      required:
        - City
    error:
      properties:
        code:
          type: string
          format: d[3]
        message:
          type: string
          maxLength: 200
      required:
        - code
        - message
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
  requestBodies:
    inquiry:
      content:
        application/xml:
          schema:
            $ref: '#/components/schemas/inquiry_A2'
    order:
      content:
        application/xml:
          schema:
            $ref: '#/components/schemas/order_A2'
    desadv:
      content:
        application/xml:
          schema:
            $ref: '#/components/schemas/desadv_request'
