openapi: 3.1.1
info:
  title: API Documentation & specification
  contact:
    name: API Support
    url: http://www.gridbees.com/en/contact.html
    email: support@gridbees.com
  description: |
    # Overview
    Gridbees API is built on HTTP and is a RESTful API. Gridbees Tour API is developed for merchants to be able to manage orders.
    The API services are published on HTTPS and use OAUTH2 protocol. Every call carries an OAuth2 access token, obtained with the client ID and client secret Gridbees gives you: `POST /accesstoken` with `grant_type` `client_credentials`, then the header `Authorization: Bearer ACCESS_TOKEN` on each request (details under "Security" in every operation).

    # Definitions
    ### Product
      A product is the stock keeping unit (SKU), the item to sale. The attributes of a product could include manufacturer, material, service, warranty terms.
      Gridbees PIM is the repository of all products used by the different services of the solution

    ### Offer
      An offer is a set of products and represents the commercial agreements sold by the merchant.
      This offer represents a tour or an activity. An offer can have:
      -  one or several products, for example: the offer “Eiffel tower tour + diner” is composed of two products. The first one is the “Eiffel tower” product and the second one is “the diner”.
      -  Prices, optionally depending of the travel date, the time, the passenger type (Adult, Infant, Baby,...), the language,
      -  Additional services such as a “hotel night”.
      -  A period of publication, during this period the offer is active and can be ordered

    ### Order
      An order contains the list of information allowing to book some offers.
      An order has one or several order lines, and each order line is for an offer/tour to book.
      The order has mandatory information such as the passengers list, the amounts, payments, and addresses.

      Gridbees services can manage many references, because the service can be connected to other platforms to book an offer.
      For instance, the customer (the passenger) can book through an e-commerce website.
      The website can use a booking platform at first level, and this platform is connected to Gridbees services.
      If the required offer is managed by another supplier’s platform, Gridbees service must call this supplier platform to book the offer.
      The references managed in this case are:
      -  <b>Transaction number</b>, the booking reference generated by Gridbees
      -  <b>External transaction number</b>, the reference generated by the e-commerce website
      -  <b>Platform reference number</b>, the booking reference generated by the platform between the e-commerce website and Gridbees services.
      -  <b> Supplier reference number</b> the booking reference generated by the supplier’s platform

      ### Dates

      All Gridbees services use UTC datetime and the default format is: <b>yyyy-MM-dd'T'HH:mm:ss.SSSZ</b>.

      The list of offers to sell comes from [offer/publish](#operation/OfferPublish). The property offer.properties.departuretimes informs about the potential dates, hours and langs, the merchant can propose to customers.

      The service [Availabilities](#operation/BookingAvailabilities) informs about the stocks for all potential dates.

      The dates returned by [Availabilities](#operation/BookingAvailabilities) are in the timezone of the supplier.

      <b>The merchant must pay attention of the UTC date to fill in the [Pricing service](#operation/ValorizationValorize). Only dates returned by the Availabilities service can potentially have stocks.

    # Booking process Workflows

      ### Pull the offers (batch mode)

    The merchant needs to [pull the offers](#operation/OfferPublish) published by the supplier.
    Usually, this operation is done once a day for all published offers. If offers are frequently updated, the merchant can periodically pull the updated offers, ie delta updates.

    ### Pull the availabilties (batch mode)
    [Pull the availabilities](#operation/BookingAvailabilities) to know the available stocks for each published offers. You need to request the availabilities for a given period.
    If you don't fill a period, the default is the stock of the day.
    At this step, the merchant knows the offers to sell and the availablities.

    ### Add offers to basket
    Customers choose offers to purchase and add them to basket.

    ### Check availability of each offer in the basket
    To avoid to sell offers with no stocks, you may check the [availabilty](#operation/BookingAvailability) with the information known in the basket (travel date, lang, activity hour, quantity,...).

    ### Valorize the basket, checkout step
    Gridbees [pricing](#operation/ValorizationValorize) service is responsible to certify all prices and apply eligible promotions.

    ### make a reservation
    Once the customer validated the basket, before to check the payment, you may block the stock of the offers in the basket.
    This operation will guarantee the availability of the offers for a short duration. Once this period is over, the stock is no longer guaranteed.
    Controls on the amounts returning by the pricing service are done to certify the prices in the reservation. The order reference is created at this stage.

    #### confirm the reservation
    Once the payment is confirmed, you must confirm the reservation to definitely block the stock for all offers and create the attached vouchers.

    ### view vouchers
    At any time, you can access to the vouchers of your purchased orders.

    ### Amendment
    It is possible to update some properties of the purchased order. Mainly, Billing info, passengers details, emails, phones can be modified.

    ### Order Cancellation
    The customer can cancel the order. The cancellation service will apply the the cancellation terms, release the stocks and vouchers.


  version: 1.6.20
servers:
  - url: https://valorization.endpoints.b2t-gridbees.cloud.goog/
tags:
  - name: Offer catalog
    description : |

      A merchant needs to pull the offers list to sell. Each offer has a publication period (offer.startdate, offer.enddate). During this period, the merchant can sell the offer depending the availability.

      Depending of the activity domain (telecom, retail, tourism,...), prices can be complex to define.

      For example, for Retail activity domain, an offer will have some prices such as :
      - crossed price
      - selling price

      For subscription management, an offer could have prices depending of :
      - plan rate
      - payment mode

      For tourism domain, the price of an offer depends of :
      - the travel date, hour and potentially the lang
      - Person type (Adult, Child, Infant, ...)

      Gridbees is able to model any kind of price structure.

  - name: Promotion Service
    description : |
      List of services to manage promotions. To know more about promotion management, you can access to the [Promotion page](http://www.gridbees.com/en/functdoc/en-promotion-engine).

  - name: Pricing Service
    description : |
      The pricing service is used to check and guarantee all prices and services inside the submitted basket.
  - name: Booking Service

security:
  - ClientCredentials: []

components:

  securitySchemes:
    ClientCredentials:
      type: oauth2
      description: |
        Every call is authenticated with an OAuth2 access token. Gridbees gives each partner a **client ID** and a
        **client secret**: contact Gridbees support to get them, and keep the secret on your servers, never in a
        browser page or a mobile application.

        To call a service, an application:
        -  requests an access token with its client ID and client secret (`POST /accesstoken` on its Gridbees API host),
        -  receives an access token, its lifetime and a refresh token (to get a new access token when it expires),
        -  sends the access token in the `Authorization` header of every request: `Authorization: Bearer ACCESS_TOKEN`.

        Gridbees services authenticate and authorize each request from its access token.

        ####	Request an access token with the client ID and client secret
        ```
        POST /accesstoken HTTP/1.1
        Host: YOUR_GRIDBEES_API_HOST
        Content-Type: application/json

        {
          "grant_type" : "client_credentials",
          "client_id" : "YOUR_CLIENT_ID",
          "client_secret" : "YOUR_CLIENT_SECRET"
        }
        ```

        ####	Response
        ```
          {
            "token_type": "Bearer",
            "access_token": "ACCESS_TOKEN",
            "expires_in": 35999,     //lifetime in seconds
            "refresh_token": "REFRESH_TOKEN"
          }
        ```

        #### Refresh an expired access token with the refresh token
        ```
        POST /accesstoken HTTP/1.1
        Host: YOUR_GRIDBEES_API_HOST
        Content-Type: application/json

        {
          "grant_type" : "refresh_token",
          "client_id" : "YOUR_CLIENT_ID",
          "client_secret" : "YOUR_CLIENT_SECRET",
          "refresh_token" : "REFRESH_TOKEN"
        }
        ```

        #### Call a service, for example /booking/availability
        ```
        POST /booking/availability HTTP/1.1
        Host: YOUR_GRIDBEES_API_HOST
        Authorization: Bearer ACCESS_TOKEN
        Content-Type: application/json

        {
          //request body
        }
        ```
      flows:
        clientCredentials:
          tokenUrl: /accesstoken
          refreshUrl: /accesstoken
          scopes: {}

  schemas:
    Address:
      type: object
      description: "Address object"
      required:
        - streetname
        - city
        - postalcode
      properties:
        uid :
          type : string
          description:  unique identifier
          format: uuid
        usage :
          type : string
          description:  "Usage of this address"
          enum:
            - DLV
            - BIL
            - DROPOFF
            - PICKUP
        Isnormalized :
          type : boolean
          description : Is Normalized ?
        qualitycode :
          type : boolean
          description : Quality code
        isative :
          type : boolean
          description : Is active ?
        streetnumber :
          type : string
          description : Street number
        streetname :
          type : string
          description : Street name
        streettype :
          type : string
          description : Street type
        district :
          type : string
          description : District
        building :
          type : string
          description : Building
        city :
          type : string
          description : City
        postalcode :
          type : string
          description : Postal code
        province :
          type : string
          description : Province
        countrycode :
          type : string
          description : Country code
        additionalinfo :
          type : array
          description: Additional info
          items:
            $ref: '#/components/schemas/MetaData'
        name :
          type : array
          description: Name associated to this address
          items:
            $ref: '#/components/schemas/Person'
        geoloc :
          type : array
          description: Geolocalization
          items:
            $ref: '#/components/schemas/Geoloc'
        createdate :
          type : string
          description:  creation date
          format: date-time
        updatedate :
          type : string
          description:  update date
          format: date-time
    AdditionalService:
      type: object
      required:
        - servicetype
        - code
        - quantity
      properties:
        servicetype:
          type: string
          description: Type of additionnal service
          example: NIGHT, GUARANTEE, RECOVERY, ASSEMBLY,...
        code:
          type: string
          description: additionnal service code
        quantity:
          type: number
        pricing :
          description: Prices of the additional service
          type: array
          items:
            $ref: '#/components/schemas/MasterData'
    Amount:
      type: object
      required:
        - currency
      properties:
        currency:
          type: string
        grossamount:
          type: number
          description:
            the public price of an offer
          format: double
        netamount:
          type: number
          description:
            the amount resulting from the difference of the gross amount and the different prices to reduce or to add
          format: double
        totaltorefund:
          type: number
          format: double
          description:
            the amount to refund to the customer
        totaltopay:
          type: number
          format: double
          description:
            the amount to pay by the customer
        adjustedamount:
          type: number
          format: double
          description:
            The amount to add to the gross amount. Could come from promotion rules
        discountamount:
          type: number
          format: double
          description:
            the amount to be reduced to the gross amount. Could come from promotion rules
        commisionamount:
          type: number
          format: double
          description:
            the commission amount to be returned to the merchant
        fees:
          type: number
          format: double
          description:
            the delivery fees amount. Calculated by valorize service
        feesdiscountamount:
          type: number
          format: double
          description:
            The fees discount amount to reduce to the fees
        additionalserviceamount:
          type: number
          format: double
          description:
            additional services amount to add to the gross amount.
        additionalassemblyamount:
          type: number
          format: double
          description:
            The amount of the assembly fees
        additionalrecoveryamount:
          type: number
          format: double
          description:
            The amount of the recovery fees
        hashamount:
          type: string
      description: Basket valorized amounts
    Availability:
      type: object
      properties:
        availabilityline:
          type: array
          items:
            $ref: '#/components/schemas/AvailabilityLine'
          description: Availability lines
        isactual :
          type : boolean
          description: Actual or theoretical availability
        messagetype :
          type: string
        version :
          type : string
        revision :
          type : string
        channelcode :
          type : string
        site :
          type : string
    AvailabilityLine:
      type: object
      required:
        - offerid
      properties:
        offerid:
          type: string
          description: offer technical identifier
        offercode :
          type : string
          description: Offer business code
        quantity :
          type: integer
          description: Requested quantity
        date :
          type: string
          format: date-time
          description: date in UTC
        hour :
          type : string
          description: hour in format HH:MM
        lang :
          type : string
          description: two digits language code (iso -639-1)
        vendorcode :
          type : string
          description: vendor code
        totalquantity :
          type: integer
          description: actual total quantity returned
        freesales:
          type : boolean
          description: means the stock is infinite
        quantitydetails:
          description: optionnaly used to give details aboout the returned availability
          $ref: '#/components/schemas/MasterData'
        canbeordered:
          type: boolean
          description: if this flag is set to FALSE, that means this offer cannot be purchased
        currency:
          type : string
        unitpriceselling:
          type : number
        resupplyingdelay:
          type: integer
          description: resupplying delay, in case of shortage
        retrocessiondelay:
          type: integer
          description: Retrocession delay

    AvailabilitiesRequest:
      type : object
      properties:
        startdate:
          type : string
          format: date-time
        enddate:
          type : string
          format: date-time
        availabilitylines:
          type: array
          items:
            $ref: '#/components/schemas/OfferCode'
      example:
        {"startdate":"2020-04-01T23:00:00.000Z","enddate":"2020-04-02T22:59:59.000Z"}

    AvailabilitiesResponse:
      type : object
      properties:
        startdate:
          type : string
          format: date-time
        enddate:
          type : string
          format: date-time
        availabilitylines:
          type: array
          items:
            $ref: '#/components/schemas/OfferCode'
      example:
        {"startdate":"2020-04-01T22:00:00.000Z","enddate":"2020-04-03T21:59:59.000Z","availabilitylines":[{"offerid":"1f3d07b1647144ce999d5b0ab31ee385","offercode":"TDS1","date":"2020-04-02T00:00:00.000+02:00","hour":"09:00","totalquantity":10},{"offerid":"71825be3a4d74cfe8d679d26c98980a8","offercode":"VTP8","date":"2020-04-02T00:00:00.000+02:00","hour":"08:00","lang":"en","totalquantity":10},{"offerid":"71825be3a4d74cfe8d679d26c98980a8","offercode":"VTP8","date":"2020-04-02T00:00:00.000+02:00","hour":"08:00","lang":"fr","totalquantity":10}]}

    AvailabilityRequest:
      type : object
      properties:
        availability:
          $ref: '#/components/schemas/Availability'
        availabilitycontext:
          $ref: '#/components/schemas/ContextDetails'
      example:
        {"availability":{"availabilityline":[{"offerid":"1f3d07b1647144ce999d5b0ab31ee385","date":"2020-04-02T00:00:00.000Z","hour":"09:00","quantity":7,"lang":"en","quantitydetails":[{"mdobject":"INDIVIDUAL","code":"ADULT","value":"4"},{"mdobject":"INDIVIDUAL","code":"CHILD","value":"3"},{"mdobject":"INDIVIDUAL","code":"INFANT","value":"0"}]}]}}

    AvailabilityResponse:
      type : object
      properties:
        availability:
          $ref: '#/components/schemas/Availability'
        availabilitycontext:
          $ref: '#/components/schemas/ContextDetails'

    BasketAddedProduct :
      type: object
      properties:
        reference :
          type: string
          description: offer busyness reference
        offerid :
          type: string
          description: offer technical key
        crossedOutPrice :
          type: number
          format: double
          description: crossed-out price
        sellingPrice :
          type: number
          format: double
          description: selling price
        discount :
          type: number
          format: double
          description: discount price
        productItem :
          $ref: '#/components/schemas/ProductItem'

    BasketRequest:
      required:
        - identifier
        - lines
        - ordertracking
      type: object
      properties:
        identifier:
          $ref: '#/components/schemas/Identifier'
        ordertracking:
          $ref: '#/components/schemas/TrackingData'
        comtracking:
          $ref: '#/components/schemas/CommercialTracking'
        businesscreationdate:
          type: string
          description: Business creation date
          format: date-time
        lines:
          type: array
          description: Basket lines
          items:
            $ref: '#/components/schemas/BasketLine'
      example:
        {"identifier":{"structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"}},"ordertracking":{"orderchannel":"API_B2B","vendorcode":"002102"},"lines":[{"linenum":1,"quantity":3,"offerid":"32e82324a32c4b7589963e4d36eb8e05","offerbookingdate":"2020-03-15T00:00:00.000Z","offerbookinghour":"09:30","offerlang":"en","pricing":[{"mdobject":"INDIVIDUAL","code":"ADULT","quantity":2},{"mdobject":"INDIVIDUAL","code":"CHILD"," quantity":1},{"mdobject":"INDIVIDUAL","code":"INFANT"," quantity":0}]}]}
    BasketLine:
      required:
        - linenum
        - offerid
        - quantity
      type: object
      properties:
        linenum:
          type: integer
          description: Line number
        referencecode:
          type: string
          description: Reference code
        offercode:
          type: string
        offerid:
          type: string
          description: Technical identifier
        linestatus:
          type: string
          description: Status of the line.
          example:  1 - Productadded 2 - offer refused by customer
        offercodification:
          type: string
          description: Codification
        quantity:
          type: integer
          description: Quantity
        amount2:
          $ref: '#/components/schemas/Amount'
        crossedoutprice:
          type: number
          format: double
          description: Crossed out price
        sellingprice:
          type: number
          format: double
          description: Selling price
        promotionenddate:
          type: string
          format: date-time
          description: Info on expiration of the promotion
        taxdetails:
          type: array
          items:
            $ref: '#/components/schemas/TaxDetail'
          description: Info on expiration of the promotion
        additionalservices:
          type: array
          items:
            $ref: '#/components/schemas/AdditionalService'
          description: Additional service
        offerbookingdate:
          type: string
          description: Date of the booking
        offerbookinghour:
          type: string
          description: Hour of the booking
        offerlang:
          type: string
          description: Lang of the booking
        group:
          type: string
          description: Group number
        groupcode:
          type: string
          description: Group code
        pricing:
          $ref: '#/components/schemas/MasterData'
          description: Additional info on prices
    BasketResponse:
      type: object
      properties:
        identifier:
          $ref: '#/components/schemas/Identifier'
        ordertracking:
          $ref: '#/components/schemas/TrackingData'
        comtracking:
          $ref: '#/components/schemas/CommercialTracking'
        businesscreationdate:
          type: string
          description: Business creation date
          format: date-time
        lines:
          type: array
          items:
            $ref: '#/components/schemas/BasketLine'
        basketdetails:
          $ref: '#/components/schemas/ContextDetails'
        amount:
          $ref: '#/components/schemas/Amount'
        basketrules:
          type: array
          description: Applied rules
          items:
            $ref: '#/components/schemas/BasketRule'
      example:
        {"identifier":{"structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"}},"ordertracking":{"vendorcode":"002102","orderchannel":"API_B2B"},"promotionenddate":[{"attribute":"EndDateBasketLine","value":"2020-10-31T22:59:00.000Z"}],"basketrules":[{"linenum":0,"rulename":"BasketDiscountPercent","discountamount":50.0,"priorityrule":{"promotionid":"59c5b24627d6457a946165ded2e2d29a","promotiontype":"PROMO_BASKET_LEVEL","enddate":"2020-10-31T22:59:00.000Z","combinablepromo":false,"combinablecop":false,"haspromocode":false,"commissiondiscountprice":true,"promotionname":"Welcome Promotion","isrevertedprice":false}}],"amount":{"currency":"EUR","grossamount":50.0,"netamount":0.0,"totaltopay":0.0,"discountamount":50.0,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"hashamount":"c4318ab4519be4bcee99bb91c8e111e61ac154e3d580cee6dd5e276044933f24"},"lines":[{"linenum":1,"offercode":"LVS","offerid":"32e82324a32c4b7589963e4d36eb8e05","offerbookingdate":"2020-03-15T16:38:39.690Z","offerbookinghour":"09:30","offerlang":"en","quantity":2,"amount":{"currency":"EUR","grossamount":50.0,"netamount":50.0,"totaltopay":50.0,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"commissionamount":0.0,"hashamount":"fb1128e17f58d70736e058c5fcae17e3e7194d222df2f855b3079a3be9959155"},"sellingprice":25.0,"pricing":[{"mdobject":"INDIVIDUAL","code":"ADULT","quantity":2,"label":"25.0","price":25.0},{"mdobject":"INDIVIDUAL","code":"CHILD","quantity":0,"label":"13.0","price":13.0},{"mdobject":"INDIVIDUAL","code":"INFANT","quantity":0,"label":"0.0","price":0.0}]}],"basketdetails":{"status":"OK"}}
    BasketRule:
      type: object
      properties:
        linenum:
          type: integer
        rulename:
          type: string
        initialamount:
          type: number
          format: double
        discountamount:
          type: number
          format: double
        adjustedamount:
          type: number
          format: double
        priorityrule:
          $ref: '#/components/schemas/PriorityRule'
        customdata:
          type: number
          format: double
      description: Basket applied rule
    BillingInfo:
      type: object
      properties:
        groupcode:
          type: string
          description: Billing group code
        paymentmode:
          type: string
          description: Payment mode
        paymentdelay:
          type: string
          description: Delay to pay the invoice
        prepaymentmode:
          type: string
          description: Pre payment information. Possible values are BILLING, NET, GROSS
        pricecode1:
          type: string
          description: First price code to access to the commission grid
        pricecode2:
          type: string
          description: Second price code to access to the commission grid
        receipttopassenger:
          type: boolean
          description: If the payment receipt must be sent to the customer
        vouchertopassenger:
          type: boolean
          description: If the voucher document must be sent to the customer
    BookingActivity:
      type: object
      properties:
        offercode:
          type: string
          description: Code of the offer
        quantity:
          type: integer
          description: quantity
    BookingCondition:
      type: object
      properties:
        starttraveldate:
          type: string
          format: time-time
          description: Start travel date
        endtraveldate:
          type: string
          format: time-time
          description: End travel date
        basketamount:
          type: number
          format: double
          description: Basket amount
        basketlineamount:
          type: number
          format: double
          description: Basket line amount
        operator:
          type: string
          description: Operator
        passengers:
          type: array
          items:
            $ref: '#/components/schemas/BookingPassenger'
          description: Passengers types condition
        langs:
          type: array
          items:
            type: string
          description: Languages
        channels:
          type: array
          items:
            type: string
          description: Channel conditions
        applications:
          type: array
          items:
            type: string
          description: Allowed applications list
        activities:
          type: array
          items:
            $ref: '#/components/schemas/BookingActivity'
          description: offers list
        productfilter:
          type: array
          items:
            $ref: '#/components/schemas/MetaData'
          description: Filter to restrict the discount
        productexception:
          type: array
          items:
            $ref: '#/components/schemas/MetaData'
          description: Filter to exclude some offers in the discount
    BookingDiscount:
      type: object
      properties:
        discountname:
          type: string
          enum:
            - Enumeration
            - BasketDiscountPercent
            - BasketDiscountAmount
            - LineDiscountAmount
            - LineDiscountPercent
            - FeeDiscountPercent
            - TheCheapestPercent
            - PaxDiscountPercent
            - FeeDiscountAmount
            - FeeDiscountPercent
            - SetFees
        quantity:
          type: integer
          description: Quantity
        discounttype:
          description: Type of discount
          enum:
            - PERCENT
            - FIXED
        discountvalue:
          type: number
          format: double
          description: Discount value
        perpurchase:
          type: number
          format: double
          description: Per purchase
        perquantity:
          type: integer
          format: double
          description: Per quantity
        productfilter:
          type: array
          items:
            $ref: '#/components/schemas/MetaData'
          description: Filter to restrict the discount
        productexception:
          type: array
          items:
            $ref: '#/components/schemas/MetaData'
          description: Filter to exclude some offers in the discount
    BookingPassenger:
      type: object
      properties:
        reservationtype:
          type: string
          description: Reservation type
          example: INDIVIDUAL, PRIVATIZATION
        passengertype:
          type: string
          description: Passenger type
          example: ADULT, CHILD, INFANT
        quantity:
          type: integer
          description: quantity
    BookingRule:
      type: object
      properties:
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/BookingCondition'
          description: Conditions list
        behaviours:
          type: array
          items:
            $ref: '#/components/schemas/BookingDiscount'
          description: Discounts list
    BookingRequest:
      type: object
      properties:
        externaltransactionnumber:
          type: string
        destinationcode:
          type: string
        offercode:
          type: string
        offercodes:
          description: list of offer codes to query
          type : array
          items:
            type: string
        startdate:
          type : string
          format: date-time
        enddate:
          type : string
          format: date-time
        requestcontext :
          $ref: '#/components/schemas/RequestContext'
    Cancellation:
      type: object
      properties:
        minday:
          type: integer
          description: Minimum day before cancellation date
        maxday:
          type: integer
          description: Maximum day before cancellation date
        rate:
          type: number
          format: double
          description: Rate to apply
    CancellationDetail:
      type: object
      properties:
        creditnote:
          type: string
          description: Credit note amount
        cancellationfees:
          description: Cancellation fees amount
          type: number
          format: double
        cancellationdate:
          description: Cancellation date amount
          type: string
          format: date-time
        commissionamount:
          description: Commission amount after the cancellation
          type: number
          format: double
    CancellationRequest:
      type: object
      required:
        - orderid
      properties:
        orderid:
          type: integer
          description: Order primary key
        vendorcode:
          type: string
          description: Vendor code
        cancellationdate:
          type: string
          format: date-time
        ordernumid:
          type: string
          description: Order transaction number
        comment:
          type: string
          description: Comment to store on the cancellation
      example:
        {"orderid":"9ed8c8fb5f034ffda61a4b81a3bce42d",  "ordernumid" : "LZI3Y00000895"}

    CancellationBookingResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/Order'
        ordercontext:
          $ref: '#/components/schemas/ContextDetails'
      example:
        {"order":{"orderid":"82bf4511e2d74876ad12bebac9a2f3df","ordertracking":{"user":"s.lavenant","platformreferencenumber":"2003WS4895","transactionnumber":"L1IRC000010047","vendorcode":"003298","orderchannel":"CALLCENTER","emitterid":"GUI","bookingid":"7ccb7b1fe8a2473dac86bf73994f2dde"},"cancellationdetail":{"cancellationfees":0,"notification":{"eventcode":"STANDARD","eventtype":"CANCELLATION"},"cancellationdate":"2020-03-12T23:00:00.000Z","commissionamount":0,"creditnote":829},"identifier":{"contactid":"4423af5e37264a87917b43e392ecdeed","structure":{"countrycode":"FR","marketcode":"FR","blcode":"PCV"}},"businesscreationdate":"2020-03-13T13:17:03.684Z","statusdetail":{"latest":[{"statustype":"Operational","user":"Api USer","code":"CANCELLED","date":"2020-03-13T13:19:08.089Z"},{"user":"Api USer","code":"PAID","date":"2020-03-13T13:17:48.206Z","statustype":"PAYMENT"}],"order":[{"user":"Api USer","code":"CANCELLED","date":"2020-03-13T13:19:08.089Z","statustype":"Operational"},{"user":"Api USer","code":"PROCESSED","date":"2020-03-13T13:17:48.815Z","statustype":"Operational"},{"statustype":"PAYMENT","user":"Api USer","code":"PAID","date":"2020-03-13T13:17:48.206Z"},{"statustype":"Operational","user":"merchant user","code":"PENDING","date":"2020-03-13T13:17:04.106Z"},{"user":"merchant user","code":"PENDING","date":"2020-03-13T13:17:04.106Z","statustype":"PAYMENT"}]},"deliverydetail":{"email":{"usage":"BIL","isprincipal":true,"emailvalue":"s.wolf@gridbees.com"},"customdata":[{"attribute":"pickuphour","value":"2020-03-20T09:00:00.000Z"},{"attribute":"dropoffhour","value":"2020-03-20T13:00:00.000Z"}],"passengers":[{"lastname":"Loustria","persontype":"ADULT","firstname":"gnadi"}]},"amount":{"currency":"EUR","hashamount":"b80f7b95d4456a2208528f02c1d3e58a9f2dcc596c156d973d2bc43647d9997c","grossamount":830,"totaltorefund":828,"totaltopay":830,"netamount":830},"payment":{"isprepaid":true,"groupedpayment":{"orderids":["82bf4511e2d74876ad12bebac9a2f3df"],"totalpaid":830},"paymentdate":"2020-03-13T13:17:48.206Z","prepaidamount":830,"details":[{"paymentmode":"CASH","paymentdate":"2020-03-13T13:17:48.206Z","paymentcode":"DISCOUNT","status":"PAID","totalpaid":430,"updatedate":"2020-03-13T13:17:48.206Z","externalpaymentreference":"548d49696d544dcb86263524c5ca8c27","movementtype":"CASHING"},{"paymentmode":"CASH","paymentdate":"2020-03-13T13:17:48.206Z","paymentcode":"EURO","status":"PAID","totalpaid":400,"updatedate":"2020-03-13T13:17:48.206Z","externalpaymentreference":"548d49696d544dcb86263524c5ca8c27","movementtype":"CASHING"}],"totalpaid":830,"processingmode":"PREPAYMENT","updatedate":"2020-03-13T13:17:48.354Z","externalpaymentreference":"93195671"},"updatedate":"2020-03-13T13:19:08.089Z","comtracking":{"isgift":false,"isquotation":false,"tickets":[{"media":{"url":"http://api-uat.gridbees.com/medias/tickets/3776/715a/3776715a9dfe6f91b02a37ac263b79092a47a.pdf","size":29489,"languagecode":"fr","mediatype":"PDF"},"suppliercode":"PCV","formattype":"BARCODE","value":"L1IRC000010047","categories":{"ADULT":10},"businesstype":"VOUCHER","subformattype":"QR","reservationdate":"2020-03-20T09:00:00.000Z","transactionnumber":"L1IRC000010047","languagecode":"fr"}],"documents":[{"media":{"mediatype":"PDF","url":"http://api-uat.gridbees.com/medias/docs/7931/b7ef/79310f1000f2a2f499e35d512ea6912cc0c2.pdf","size":1263,"languagecode":"fr-FR"},"businesstype":"RECEIPT_CC_PAYMENT","documentnumid":"D548d49696d544dcb86263524c5ca8c27","linkedtransactionnumbers":["L1IRC000010047"],"createdate":"2020-03-13T13:17:48.280Z","amount":32}]},"billingaddress":{"isactive":true,"isnormalized":false,"usage":"BIL","name":{"lastname":"Loustria","civility":"MR","firstname":"Solange"}},"createdate":"2020-03-13T13:17:04.106Z","ordertype":"ORDER","lines":[{"bookinglang":"fr","quantity":10,"linenum":1,"offerdestinations":[{"destinationcode":"CITYTOUR"}],"offercancellations":[{"minday":2,"maxday":2,"rate":50},{"minday":0,"maxday":1,"rate":100}],"productitems":[{"quantity":1,"productcode":"HISTOV-HISTO","suppliers":[]},{"productcode":"BP-CROI","suppliers":[],"quantity":1},{"suppliers":[],"quantity":1,"productcode":"TE-VIS-2E"},{"productcode":"VIS-TDV","suppliers":[],"quantity":1}],"amount":{"currency":"EUR","hashamount":"a0a965586ea81c2f30f189a286ce2cf0d18047d19660ae180a340cadffe1df8a","additionalassemblyamount":0,"additionalserviceamount":0,"additionalrecoveryamount":0,"grossamount":830,"totaltopay":830,"totaltorefund":829,"netamount":830},"bookingdate":"2020-03-19T23:00:00.000Z","sellingprice":83,"bookinghour":"10:00","offerid":"93dd2ab917ab4746901aac6f4a5f3930","referencecode":"PS","cancellationdetail":{"creditnote":829,"commissionamount":0,"cancellationfees":0},"pricing":[{"price":83,"mdobject":"INDIVIDUAL","quantity":10,"code":"ADULT"}]}]},"ordercontext":{"status":"OK"}}

    CancellationValorizationResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/OrderCancel'
        ordercontext:
          $ref: '#/components/schemas/ContextDetails'
      example:
        {"order":{"orderid":"9ed8c8fb5f034ffda61a4b81a3bce42d","amount":{"currency":"EUR","grossamount":69.0,"netamount":62.1,"totaltopay":62.1,"totaltorefund":9.0,"commissionamount":6.9,"hashamount":"08271aece4aa37b6e81728a7bc5f9e536460967ebaba0d009d8e8871b6b7c56e"},"cancellationdetail":{"creditnote":47.1,"cancellationfees":0.0,"commissionamount":6.9}},"ordercontext":{"status":"OK","message":"PAYMENTMODECHANGED"}}
    ClaimDetail:
      type: object
      properties:
        typology:
          type: string
          description: Typology
        channel:
          type: string
          description: Channel code
        emitterid:
          type: string
          description: Emitter of the claim
        origin:
          type: string
          description: Origin
        detailcontent:
          type: string
          description: Content of the detail
        createdate:
          type: string
          format: date-time
          description: Creation date
    ClaimTrack:
      type: object
      properties:
        codification:
          $ref: '#/components/schemas/Codification'
          description: Codification of the claim
        identifier:
          $ref: '#/components/schemas/Identifier'
          description: Identifier
        structure:
          $ref: '#/components/schemas/Structure'
          description: Structure
        claimtype:
          type: string
          description: Claim type
        claimcode:
          type: string
          description: Claim code
        claimjuscode:
          type: string
          description: Claim proof code
        topic:
          type: string
          description: Topic of the claim
        details:
          type: array
          items:
            $ref: '#/components/schemas/ClaimDetail'
          description: Details list
        status:
          type: string
          description: Status of the claim
        satisfaction:
          type: string
          description: Comment on the claim
    Commission:
      type: object
      properties:
        commissionid:
          type: string
          description: Unique technical key
        unicitykey:
          type: string
          description: Business key
        offercode:
          type: string
          description: Offer code  concerned by this commission
        pricecode:
          type: string
          description: Price code of the commission
        departmentcode:
          type: string
          description: Department code of the commission
        prices:
          type: array
          items:
            $ref: '#/components/schemas/Price'
          description: List of commission prices
        createdate:
          type: string
          format: date-time
          description: Creation date
        updatedate:
          type: string
          format: date-time
          description: Modification date
    Codification:
      type: object
      properties:
        code:
          type: string
          description: Code
        numid:
          type: string
          description: Identifier number
        typology:
          type: string
          description: Typology
        eancode:
          type: string
          description: EAN code
        label:
          type: string
          description: Label
        externalcode:
          type: string
          description: External code
        externalref:
          type: string
          description: External reference
        vendorcode:
          type: string
          description: Vendor code
        programcode1:
          type: string
          description: Custom code 1
        programcode2:
          type: string
          description: Custom code 2
        programref:
          type: string
          description: Custom reference
    Comment:
      type: object
      properties:
        user:
          type: string
          description: User creating the comment
        message:
          type: string
          description: The message of the comment
        createdate:
          type: string
          format: date-time
          description: Creation date
        updatedate:
          type: string
          format: date-time
          description: Modification date
    Contact:
      type: object
      properties:
        contactid:
          type: string
          description: unique technical key of the contact
        unicitykey:
          type: string
          description: unique business key of the contact
        typology:
          type: string
          description: Type of the client
        person:
          $ref: '#/components/schemas/Person'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/Email'
            description: Email contact
        phones:
          type: array
          items:
            $ref: '#/components/schemas/Phone'
            description: Phone contact
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
    CommercialTracking:
      type: object
      properties:
        promocode:
          type: string
          description: Promo code used to fire some promotions. This information comes from the Gridbees prices valorization service
        externalpromocode:
          type: string
          description: If the promotion comes another prices valorization service, the code is stored in this field
        vouchernumid:
          type: string
          description: Promotion voucher codes are unique codes available only one time. This information comes from the Gridbees prices valorization service.
        isgift:
          type: string
          description: Boolean value to inform this order is a gift, meaning to do not fill the prices in the order thank you mail
        isupselled:
          type: boolean
        isupgraded :
          type: boolean
        isreplacement :
          type: boolean
        isquotation:
          type: boolean
        expiredquotationdate:
          type : string
          format : date-time
        tickets:
          type : array
          items:
            $ref: '#/components/schemas/Ticket'
    ContextDetails:
      type: object
      properties:
        externalbookingid:
          type: string
        user:
          type: string
          example: testuser
        status:
          type: string
        code:
          type: string
        message:
          type: string
    DeliveryDetail:
      type: object
      properties:
        deliverymode:
          type: string
          description: Delivery mode
        instruction:
          type: array
          items:
            $ref: '#/components/schemas/MetaData'
          description: Delivery instruction
        deliveryaddress:
          $ref: '#/components/schemas/Address'
          description: Delivery address
        otheraddresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
          description: Other addresses
        passengers:
          type: array
          items:
            $ref: '#/components/schemas/Person'
          description: Passengers list
        email:
          $ref: '#/components/schemas/Email'
          description: Email contact
        phone:
          $ref: '#/components/schemas/Phone'
          description: Phone contact
    Departure:
      type: object
      required:
        - startdate
        - enddate
      properties:
        openingforsale:
          type: boolean
          description: Opening for sale
        startdate:
          type: string
          format: date-time
          description: Start publication date
        enddate:
          type: string
          format: date-time
          description: End publication date
        weekhours:
          type: array
          items:
            $ref: '#/components/schemas/WeekHour'
          description: Hours and languages
    Email:
      type: object
      properties:
        uid:
          type: string
          description:  unique identifier
          format: uuid
        Usage:
          type: string
          description: Usage for this email
          example: PRINCIPAL, PROFESIONNAL
        Isprincipal:
          type: boolean
          description: Is principal?
        emailvalue:
          type: string
          description: Email value
        quality:
          type: boolean
          description: email quality
    ExclusionDate:
      type: object
      properties:
        date:
          type: string
          format: date-time
          description: Exclusion Date
        departuretime:
          type: string
          description: Exclusion Departure time
        languages:
          type: array
          items:
            type: string
          description: Exclusion Languages
    Geoloc:
      type: object
      required:
        - X
        - Y
      properties:
        X:
          type: number
        Y:
          type: number
        H:
          type: number
        sector:
          type: string
    GroupedPayment:
      type: object
      properties:
        usage:
          type: string
          description: usage
        totalpaid:
          type: number
          format: double
          description: Total paid for this group
        orderids:
          type: array
          items:
            type: string
          description: List of orderid (primary keys) concerned by this group
    Identifier:
      required:
        - structure
      type: object
      properties:
        contactid:
          type: string
        externalnumid:
          type: string
          description: external identifier
        sponsorid:
          type: string
        structure:
          $ref: '#/components/schemas/Structure'
      description: Identifier
    Item:
      type: object
      required:
        - productcode
      properties:
        productcode:
          type: string
          description: Product code
        quantity:
          type: integer
          default: 1
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/MasterData'
          description: Attributes list
    MasterData:
      type: object
      required:
        - mdobject
        - code
      properties:
        mdobject :
          type: string
        code :
          type: string
        value :
          type: string
        price :
          type: number
    Media :
      type: object
      properties:
        url:
          type: string
          description: Url to download the media
        mediatype:
          type: string
          description: Media Type
          example: PDF, BITMAP
        islocalisable:
          type: boolean
          description: This media is related to a language
        languagecode:
          type: string
          description: If localizable, the field stores the language code
    MetaData:
      type: object
      required:
        - attribute
      properties:
        attribute:
          type: string
        value:
          type: string

    MetaDataQuantityPercent:
      type: object
      required:
        - attribute
      properties:
        attribute:
          type: string
        value:
          type: string
        quantity:
          type: integer
          default: 1
        percent:
          type: number
    MetaDataCategorization:
      type: object
      required:
        - attribute
      properties:
        datatype:
          type: string
        attribute:
          type: string
        category:
          type: string
        quantity:
          type: integer
          default: 1
        ispercent:
          type: boolean
        value :
          type: number
    MultiDestination:
      type: object
      properties:
        destinationcode:
          type: string
        productcode:
          type: string
        duration:
          type: integer
        durationunit:
          type: string
        pertinence:
          type: integer
    Offer:
      type: object
      properties:
        unicitykey:
          type: string
          description: Unique business key
        unicitycode:
          type: string
          description: Offer code
        offertype:
          type: string
          description: Offer type
        codification:
          type: string
          description: Offer codification
        title:
          type: string
          description: Offer title
        offerdescription:
          type: string
          description: Offer description
        structure:
          $ref: '#/components/schemas/Structure'
          description: Offer structure
        products:
          type: array
          items:
            $ref: '#/components/schemas/OfferProduct'
          description: Product's list
        properties:
          $ref: '#/components/schemas/OfferProperty'
          description: Offer properties
        pricing:
          $ref: '#/components/schemas/Pricing'
          description: Pricing list
        medias:
          type: array
          items:
            $ref: '#/components/schemas/Media'
          description: Images list
        status:
          type: string
          description: Offer status
        startdate:
          type: string
          format: date-time
          description: Start publication date
        enddate:
          type: string
          format: date-time
          description: End publication date
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/MasterData'
          description: Attributes list
        createdate:
          type: string
          format: date-time
          description: Technical creation date
        updatedate:
          type: string
          format: date-time
          description: Technical modification date

    OfferCode:
      type: object
      required:
        - offercode
      properties:
        offerid:
          type: string
          description: technical key
        offercode:
          type: string
          description: Unique business key
        enddate:
          type: string
          format: date-time
        hour:
          type: string
          description: Activity hour
        totalquantity:
          type: integer
          description: total available quantity

    OfferProduct:
      type: object
      properties:
        openingforsale:
          type: boolean
          description: Opening for sale
        startdate:
          type: string
          format: date-time
          description: Start publication date
        enddate:
          type: string
          format: date-time
          description: End publication date
        items:
          $ref: '#/components/schemas/Item'
          description: List of items
    OfferProperty:
      type: object
      properties:
        season:
          type: string
          description: Season
        cancellations:
          type: array
          items:
            $ref: '#/components/schemas/Cancellation'
          description: Cancellation terms of sales
        destinations:
          $ref: '#/components/schemas/MultiDestination'
        departuretimes:
          type: array
          items:
            $ref: '#/components/schemas/Departure'
          description: Departure times
        exclusiondates:
          type: array
          items:
            $ref: '#/components/schemas/ExclusionDate'
          description: Exclustion dates
        reservations:
          $ref: '#/components/schemas/Reservation'
          description: Reservation List
        channels:
          type: array
          items:
            type: string
          description: Channels
        reservationtypes:
          type: array
          items:
            $ref: '#/components/schemas/ReservationType'
          description: Details on Reservation types
        services:
          type: array
          items:
            $ref: '#/components/schemas/OfferService'
          description: Additional services
    OfferRequest:
      type: object
      properties:
        offerid :
          type: string
          description: technical offer Identifier
        offerids :
          type: array
          items:
            type : string
          description: List of offer Id
        unicitycode :
          type: string
          description: Offer code
        unicitycodes :
          type: array
          items:
            type : string
          description: List offer code
        startdate :
          type: string
          format: date-time
          description: Start date of the publication
        enddate :
          type: string
          format: date-time
          description: End date of the publication
        lastupdatedate :
          type: string
          format: date-time
          description: Retrieve the offers updated since lastupdatedate
      example:
        {}
    OfferService:
      type: object
      properties:
        servicetype:
          type: string
          description: Service type
        serviceincluded:
          type: boolean
          description: Mandatory or not
        servicecapacity:
          type: integer
          description: Capacity
        productcode:
          type: string
          description: Product code
        quantity:
          type: integer
          description: Quantity
        prices:
          type: array
          items:
            $ref: '#/components/schemas/Price'
          description: Prices
    Order:
      required:
        - amount
        - ordertracking
        - billingaddress
        - lines
      type: object
      properties:
        orderid:
          type: string
          description: Internal Order Identifier
        identifier:
          $ref: '#/components/schemas/Identifier'
        ordertracking:
          $ref: '#/components/schemas/TrackingData'
          description: Order Tracking
        comtracking:
          $ref: '#/components/schemas/CommercialTracking'
          description: Commercial Tracking
        ordertype:
          type: string
          description: Order type
        amount:
          $ref: '#/components/schemas/Amount'
        billingaddress:
          $ref: '#/components/schemas/Address'
          description: Billing address
        deliverydetail:
          $ref: '#/components/schemas/DeliveryDetail'
          description: Delivery details
        Payment:
          $ref: '#/components/schemas/Payment'
          description: Payment details
        cancellationdetail:
          $ref: '#/components/schemas/CancellationDetail'
          description: Details on the cancellation
        customdata:
          $ref: '#/components/schemas/MetaData'
          description: Custom data. To use, if needed to store some data. Not analyzed by Gridbees
        lines:
          type: array
          items:
            $ref: '#/components/schemas/OrderLine'
          description: order lines
        statusdetail:
          $ref: '#/components/schemas/OrderStatusDetail'
          description: Order status
        businesscreationdate:
          type: string
          format: date-time
          description: Business creation date
        createdate:
          type: string
          format: date-time
          description: Technical creation date
        updatedate:
          type: string
          format: date-time
          description: Technical modification date
      example:
        {"orderid":"116e80c594e24508bae7989ec01038c1","ordertracking":{"transactionnumber":"R1SRF000010045"},"identifier":{"contactid":"735893e056574fa4ac912c7b608d9de8","structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"}},"amount":{"currency":"EUR","grossamount":119,"netamount":101.15,"totaltopay":101.15,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"commissionamount":17.85,"hashamount":"3a7067978472cafa4f4919fc23918c906bc55ca9baf3676b199b9d9ee3c54508"},"payment":{"processingmode":"BILLING","isprepaid":false,"totalpaid":0,"paymentdate":"2020-03-13T10:40:08.731Z","details":[{"movementtype":"CASHING","status":"PAID","paymentmode":"BILLING","paymentcode":"EURO","isprepaid":false,"totalpaid":101.15,"paymentdate":"2020-03-13T10:40:08.731Z","updatedate":"2020-03-13T10:40:08.731Z"}],"updatedate":"2020-03-13T10:40:08.731Z"},"businesscreationdate":"2020-03-13T10:40:08.595Z","lines":[{"linenum":1,"referencecode":"VGAM","offerid":"94464cd590654300ad1b132be594b4a6","quantity":1,"amount":{"currency":"EUR","grossamount":119,"netamount":101.15,"totaltopay":101.15,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"commissionamount":17.85,"commissiondiscountrate":0.15,"hashamount":"89b8c17f1628c93e29881b24cc8c6f29d384cff2603cc9c65aae6afab631b1df"},"sellingprice":119,"pricing":[{"mdobject":"INDIVIDUAL","code":"ADULT","value":"1","quantity":1,"label":"119.0","price":119}],"productitems":[{"productcode":"VERSSP-ENT-JM","quantity":1},{"productcode":"VERSSP-ENT-GE","quantity":1},{"productcode":"CHVER-VIS-G-AP","quantity":1}],"bookingdate":"2020-03-27T23:00:00.000Z","bookinglang":"en","offercancellations":[{"minday":2,"maxday":2,"rate":50},{"minday":0,"maxday":1,"rate":100}],"offerdestinations":[{"destinationcode":"VERSAILLES"}]}],"statusdetail":{"order":[{"statustype":"Filtering","code":"TOREPROCESS","cause":"OUTOFSTOCK","message":"Check availability failed Le tour/date/heure introuvable dans la BDD","date":"2020-03-13T10:40:09.117Z","user":"apixml"},{"statustype":"Operational","code":"PENDING","date":"2020-03-13T10:40:09.117Z","user":"apixml"},{"statustype":"PAYMENT","code":"PAID","date":"2020-03-13T10:40:09.117Z","user":"apixml"},{"statustype":"Operational","code":"PENDING","date":"2020-03-13T10:40:08.681Z","user":"apixml"},{"statustype":"PAYMENT","code":"PENDING","date":"2020-03-13T10:40:08.681Z","user":"apixml"}],"latest":[{"statustype":"Filtering","code":"TOREPROCESS","cause":"OUTOFSTOCK","date":"2020-03-13T10:40:09.117Z","user":"apixml"},{"statustype":"Operational","code":"PENDING","date":"2020-03-13T10:40:09.117Z","user":"apixml"},{"statustype":"PAYMENT","code":"PAID","date":"2020-03-13T10:40:09.117Z","user":"apixml"}]},"createdate":"2020-03-13T10:40:08.682Z","updatedate":"2020-03-13T10:40:09.117Z","billingaddress":{"usage":"BIL","isnormalized":false,"isactive":false,"streetnumber":"79 AVENUE ARISTIDE BRIAND","streettype":"BATIMENT 6","city":"ARCUEIL","postalcode":"94110","countrycode":"FR","name":{"civility":"MR","lastname":"My Family","firstname":"Little"},"legalentity":{"companyname":"My Little Company"}},"deliverydetail":{"passengers":[{"persontype":"ADULT","lastname":"Blondy","firstname":"Alpha","birthdate":"2019-05-29T22:00:00.000Z"}],"otheraddresses":[{"usage":"PICKUP","isnormalized":false,"isactive":true,"streetname":"25, rue claude chappe","city":"PLAISIR","postalcode":"78370","countrycode":"FR","legalentity":{"companyname":"MYHOTEL"}},{"usage":"DROPOFF","isnormalized":false,"isactive":true,"streetname":"25, rue claude chappe","city":"PLAISIR","postalcode":"78370","countrycode":"FR","legalentity":{"companyname":"MYTHOTEL"}}],"customdata":[{"attribute":"dropoffhour","value":"2019-09-18T11:00:00.000Z"},{"attribute":"pickuphour","value":"2019-09-17T07:00:00.000Z"}]}}

    OrderConfirm:
      required:
        - orderid
        - ordertracking
      type: object
      properties:
        orderid:
          type: string
          description:  technical Identifier
        ordertracking:
          $ref: '#/components/schemas/TrackingData'
        Payment:
          $ref: '#/components/schemas/Payment'
          description: Payment details
      example:
        {"order":{"orderid":"116e80c594e24508bae7989ec01038c1","ordertracking":{"transactionnumber":"R1SRF000010045"}},"ordercontext":{"externalbookingid":"068b126cb4df4ba589c500bea6d6f73c"}}

    OrderReservation:
      required:
        - amount
        - ordertracking
        - billingaddress
        - lines
      type: object
      properties:
        contact:
          $ref: '#/components/schemas/Contact'
        identifier:
          $ref: '#/components/schemas/Identifier'
        ordertracking:
          $ref: '#/components/schemas/TrackingData'
          description: Order Tracking
        comtracking:
          $ref: '#/components/schemas/CommercialTracking'
          description: Commercial Tracking
        amount:
          $ref: '#/components/schemas/Amount'
        billingaddress:
          $ref: '#/components/schemas/Address'
          description: Billing address
        deliverydetail:
          $ref: '#/components/schemas/DeliveryDetail'
          description: Delivery details
        Payment:
          $ref: '#/components/schemas/Payment'
          description: Payment details
        customdata:
          $ref: '#/components/schemas/MetaData'
          description: Custom data. To use, if needed to store some data. Not analyzed by Gridbees
        lines:
          type: array
          items:
            $ref: '#/components/schemas/OrderLine'
          description: order lines
        businesscreationdate:
          type: string
          format: date-time
          description: Business creation date

    OrderRequest:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/OrderReservation'
        ordercontext:
          $ref: '#/components/schemas/ContextDetails'
          description: Order Context

    OrderResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/Order'
        ordercontext:
          $ref: '#/components/schemas/ContextDetails'
          description: Order Context
      example:
        {"orderid":"116e80c594e24508bae7989ec01038c1","ordertracking":{"externaltransactionnumber":"105WS2344443","transactionnumber":"R1SRF000010045","vendorcode":"009317","orderchannel":"API","emitterid":"API_B2B","bookingid":"0f6f6aa4ae244d95a7f8f9bc49b9930d","user":"apixml"},"deliverydetail":{"otheraddresses":[],"email":{"usage":"BIL","isprincipal":true,"emailvalue":"s.lavenant@pariscityvision.com"},"customdata":[{"attribute":"pickuphour","value":"2020-03-27T23:00:00.000Z"},{"attribute":"dropoffhour","value":"2020-03-28T03:00:00.000Z"}],"passengers":[{"civility":"M","firstname":"Leon","persontype":"ADULT","languagecode":"en","lastname":"BROSKTES"}],"instruction":[{"attribute":"CLIENT","value":"vegetarian foods"}]},"amount":{"hashamount":"3a7067978472cafa4f4919fc23918c906bc55ca9baf3676b199b9d9ee3c54508","currency":"EUR","commissionamount":17.85,"grossamount":119,"totaltopay":101.15,"netamount":101.15},"payment":{"processingmode":"BILLING","updatedate":"2020-03-13T10:40:08.603Z","paymentdate":"2020-03-13T10:40:08.088Z"},"account":{"emails":[{"usage":"BIL","isprincipal":false,"emailvalue":"g.maccco@ground.gridbees"}],"blocked":false,"billinginfo":{"groupcode":"OLO","vouchertopassenger":false,"receipttopassenger":false,"paymentdelay":30,"paymentmode":"BILLING"}},"identifier":{"structure":{"countrycode":"FR","marketcode":"FR","blcode":"PCV"},"contactid":"735893e056574fa4ac912c7b608d9de8"},"billingaddress":{"isnormalized":false,"countrycode":"","usage":"BIL","name":{"lastname":"BROSKTES","civility":"M","firstname":"Leon","persontype":"ADULT","languagecode":"en"},"isactive":true},"ordertype":"BOOKING","createdate":"2020-03-13T10:40:08.682Z","tenantid":"54d85jk712zj57fslkd526fkds86187c","lines":[{"offerid":"94464cd590654300ad1b132be594b4a6","referencecode":"VGAM","quantity":1,"linenum":1,"offerdestinations":[{"destinationcode":"VERSAILLES"}],"offercancellations":[{"minday":2,"maxday":2,"rate":50},{"minday":0,"maxday":1,"rate":100}],"productitems":[{"productcode":"VERSSP-ENT-JM","quantity":1},{"quantity":1,"productcode":"VERSSP-ENT-GE"},{"quantity":1,"productcode":"CHVER-VIS-G-AP"}],"amount":{"totaltopay":101.15,"netamount":101.15,"commissiondiscountrate":0.15,"hashamount":"89b8c17f1628c93e29881b24cc8c6f29d384cff2603cc9c65aae6afab631b1df","currency":"EUR","commissionamount":17.85,"grossamount":119},"pricing":[{"code":"ADULT","label":"119.0","value":"1","price":119,"mdobject":"INDIVIDUAL","quantity":1}],"bookingdate":"2020-03-27T23:00:00.000Z","sellingprice":119,"bookinglang":"en"}],"order":{"statusdetail":{"latest":[{"code":"PENDING","date":"2020-03-13T10:40:08.681Z","statustype":"Operational","user":"apixml"},{"user":"apixml","code":"PENDING","date":"2020-03-13T10:40:08.681Z","statustype":"PAYMENT"}],"order":[{"user":"apixml","code":"PENDING","date":"2020-03-13T10:40:08.681Z","statustype":"Operational"},{"user":"apixml","code":"PENDING","date":"2020-03-13T10:40:08.681Z","statustype":"PAYMENT"}]},"businesscreationdate":"2020-03-13T10:40:08.595Z"},"ordercontext":{"status":"OK","endbookingdate":"2020-03-13T11:10:08.677Z","bookingid":"0f6f6aa4ae244d95a7f8f9bc49b9930d","externalbookingid":"068b126cb4df4ba589c500bea6d6f73c"}}

    OrderCancel:
      type: object
      properties:
        orderid:
          type: string
          description: Internal Order Identifier
        amount:
          $ref: '#/components/schemas/Amount'
        cancellationdetail:
          $ref: '#/components/schemas/CancellationDetail'
          description: Details on the cancellation

    OrderLine:
      type: object
      properties:
        linenum:
          type: integer
          description: Line number
        referencecode:
          type: string
          description: Offer code
        offerid:
          type: string
          description: Offer Identifier
        quantity:
          type: integer
          description: Line quantity
        amount:
          $ref: '#/components/schemas/Amount'
        crossedoutprice:
          type: number
          format: double
          description: Crossed out price
        sellingprice:
          type: number
          format: double
          description: Selling price
        pricing:
          $ref: '#/components/schemas/MasterData'
          description: Additional info on prices
        productitems:
          type: array
          items:
            $ref: '#/components/schemas/ProductItem'
        cancellationdetail:
          type: array
          items:
            $ref: '#/components/schemas/CancellationDetail'
        taxdetails:
          type: array
          items:
            $ref: '#/components/schemas/TaxDetail'
        additionalservices:
          type: array
          items:
            $ref: '#/components/schemas/AdditionalService'
          description: Additional services
        offercancellations:
          type: array
          items:
            $ref: '#/components/schemas/Cancellation'
        offerdestinations:
          type: array
          items:
            $ref: '#/components/schemas/MultiDestination'
        groupcode:
          type: string
          description: Group code
        bookingdate:
          type: string
          format: date-time
          description: Tour travel date
        bookinghour:
          type: string
          format: date-time
          description: Tour travel hour
        bookinglang:
          type: string
          format: date-time
          description: Tour travel lang
    OrderStatus:
      type: object
      properties:
        statustype:
          type: string
          description: Status type (Operational, Payment, Filtering)
        code:
          type: string
          description: Code of the type (PENDING, PROCESSED,..)
        message:
          type: string
          description: Message of the status
        user:
          type: string
          description: User
    OrderStatusDetail:
      type: object
      properties:
        latest:
          $ref: '#/components/schemas/OrderStatus'
          description: lastest status per statustype
        order:
          type: array
          items:
            $ref: '#/components/schemas/OrderStatus'
            description: order status history
          example:
            {"order":{"orderid":"9ed8c8fb5f034ffda61a4b81a3bce42d","amount":{"currency":"EUR","grossamount":69.0,"netamount":62.1,"totaltopay":62.1,"totaltorefund":9.0,"commissionamount":6.9,"hashamount":"08271aece4aa37b6e81728a7bc5f9e536460967ebaba0d009d8e8871b6b7c56e"},"cancellationdetail":{"creditnote":47.1,"cancellationfees":0.0,"commissionamount":6.9}},"ordercontext":{"status":"OK","message":"PAYMENTMODECHANGED"}}

    OrderUpdateRequest:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/UpdateRequest'
        ordercontext:
          $ref: '#/components/schemas/ContextDetails'
          description: Order Context

    Payment:
      type: object
      properties:
        usage:
          type: string
        processingmode:
          type: string
          description:    Processing mode
        isprepaid:
          type: boolean
          description:    Is pre-paid ?
        groupedpayment:
          $ref: '#/components/schemas/GroupedPayment'
          description:    orders list concerned by this payment
        totalpaid:
          type: number
          format: double
          description:  Amount paid by the customer
        totalrefunded:
          type: number
          format: double
          description:    Last date of the payment
        details:
          type: array
          items:
            $ref: '#/components/schemas/PaymentDetail'
          description:    Details on the payment
        refunddate:
          type: string
          format: date-time
          description: Refunded date
        paymentdate:
          type: string
          format: date-time
          description: payment date
        createdate:
          type: string
          format: date-time
          description: Creation date
        updatedate:
          type: string
          format: date-time
          description: modification date
    PaymentDetail:
      type: object
      properties:
        status:
          type: string
          description: Status of this payment
        cause:
          type: string
          description: Cause
        paymenttype:
          type: string
        paymentmode:
          type: string
          description: payment mode
          example:  BILLING, CHECK, CC, CASH
        paymentcode:
          type: string
          description: payment code
        isautodebit:
          type: boolean
        Isprepaid:
          type: boolean
          description: Is pre-paid ?
        totalpaid:
          type: number
          format: double
          description: Total paid for this payment mode
        externalpaymentreference:
          type: string
          description: external payment reference
        externaltransactionnumber:
          type: string
          description: external payment reference
        paymentdate:
          type: string
          format: date-time
          description: Last date of the payment
    Person:
      type: object
      required:
        - attribute
      properties:
        persontype:
          type : string
        civility:
          type: string
        firstname:
          type: string
        lastname:
          type: string
        sex:
          type: string
        languagecode :
          type : string
          description : language code
        patronym :
          type : string
        birthdate :
          type : string
        familysituation :
          type : string
        numberofchildren :
          type : integer
        createdate:
          type: string
          description:  creation date
          format: date-time
        updatedate:
          type: string
          description:  update date
          format: date-time
    Phone:
      type: object
      properties:
        uid:
          type: string
          description:  unique identifier
          format: uuid
        Usage:
          type: string
          description: Usage for this phone
          example: HOME, BUSINESS
        Isprincipal:
          type: boolean
          description: Is principal?
        phonevalue:
          type: string
          description: phone value
        quality:
          type: boolean
          description: phone quality
    Price:
      type: object
      properties:
        openingforsale:
          type: boolean
          description: If this price is opened for sales. If true, this price can be published
        startdate:
          type: string
          format: date-time
          description: Start date of the publication
        enddate:
          type: string
          format: date-time
          description:    End date of the publication
        crossedoutprice:
          type: number
          format: double
          description: The crossed-out price
        pricelist:
          type: array
          items:
            $ref: '#/components/schemas/PriceList'
    PriceList:
      type: object
      properties:
        sellingprice:
          type: number
          format: double
          description: The default public price
        customparam1:
          type: string
          description: Custom type
          example: INDIVUDIAL, PRIVATIZATION, ..
        customparam2:
          type: string
          description: Custom subtype
          example:  ADULT, CHILD, INFANT,.
    Pricing:
      type: object
      properties:
        currencycode:
          type: string
          description: Currency code
        lowestsellingprice:
          type: number
          format: double
          description: Lowest selling price control
        crossedoutprice:
          type: number
          format: double
        sellingprice:
          type: number
          format: double
        price:
          type: array
          items:
            $ref: '#/components/schemas/Price'
          description: prices list
    PriorityRule:
      type: object
      properties:
        promotionid:
          type: string
        promotiontype:
          type: string
        promotionname:
          type: string
        enddate:
          type: string
          format: date-time
        combinablepromo:
          type: boolean
        combinablecop:
          type: boolean
        haspromocode:
          type: boolean
        commissiondiscountprice:
          type: boolean
        isrevertedprice:
          type: boolean
    ProcessingMessage:
      type: object
      properties:
        processingtype:
          type: string
          description: Processing message type
        code:
          type: string
          description:    Code of the processing message
        justification:
          type: string
          description:    Justification of the processing message
        linenum:
          type: integer
          description:    The basket line concerned by this message
        offerid:
          type: string
          description:    The offer concerned by this processing message
    Promotion:
      type: object
      properties:
        promotionid :
          type: string
          description: technical key
        unicitykey :
          type : string
          description: business key
        structure :
          $ref: '#/components/schemas/Structure'
        usagelimit :
          type: string
          description: type of the promotion
          enum:
            - LimitedNumber
            - NoLimit
            - Voucher
        usagelimitDetails :
          type: integer
          description: mandatory if usagelimit set to LimitedNumber. Define in this case the max quantity used for this limit.
        promotioncodes :
          type: array
          format: string
          description: Optional promotion codes with semicolon separator
        startdate :
          type: string
          format: date-time
          description: start date of the promotion to be actived
        enddate:
          type: string
          format: date-time
          description: end date of the promotion.
        status :
          type: string
          description: status of the promotion
          enum:
            - Created
            - Published
            - Unpublished
        title :
          type: string
          description: short title of the promotion
        description :
          type: string
          description: promotion description
        rules :
          type: array
          items:
            $ref: '#/components/schemas/Rule'
          description: rules list.
        combinablepromo:
          type: boolean
          default: true
          description: If set to TRUE, that means, if no exclusive promotion is already applied to the input basket, this promotion can be applied. Otherwise, this promotion can't be applied.
        commissiondiscountprice:
          type: boolean
          default: false
          description: if set to TRUE, the calculation of the commission is done of the discounted price, otherise the calculation is done on the gross price.
        createdate:
          type: string
          format: date-time
          description: creation date set by the service
        updatedate:
          type: string
          format: date-time
          description: modification date set by the service
      example: {"promotionid":"b6939432d0494e588866ff89514a78e7","structure":{"blcode":"GRIDBEES"},"promotioncodes":["SUMMER2021;SPRING2021"],"startdate":"2021-04-01T14:27:00.000Z","enddate":"2020-09-30T14:27:00.000Z","status":"Created","rules":[{"ruleID":"3062f860-f071-4242-893e-139d8d86106d","conditions":[{"conditionid":"125473a9-cc66-4804-8f3e-8217109333b3","conditionlabel":"10","parameter1":"BasketLine","parameter2":">=","parameter3":"10"}],"behaviours":[{"behaviourid":"d8ca6f36-d919-488b-bef4-f9b452ceb501","behaviourlabel":"10","isreversedprice":false,"parameter1":"BasketDiscountAmount","parameter2":"10","parameter8":""}],"description":"My little promotion"}],"title":"promo of the year","priority":1000,"combinablepromo":true,"commissiondiscountprice":false}
    PromotionCreate:
      type: object
      properties:
        unicitykey :
          type : string
          description: business key
        structure :
          $ref: '#/components/schemas/Structure'
        usagelimit :
          type: string
          description: type of the promotion
          enum:
            - LimitedNumber
            - NoLimit
            - Voucher
        usagelimitDetails :
          type: integer
          description: mandatory if usagelimit set to LimitedNumber. Define in this case the max quantity used for this limit.
        promotioncodes :
          type: array
          format: string
          description: Optional promotion codes with semicolon separator
        startdate :
          type: string
          format: date-time
          description: start date of the promotion to be actived
        enddate:
          type: string
          format: date-time
          description: end date of the promotion.
        status :
          type: string
          description: status of the promotion
          enum:
            - Created
            - Published
            - Unpublished
        title :
          type: string
          description: short title of the promotion
        description :
          type: string
          description: promotion description
        rules :
          type: array
          items:
            $ref: '#/components/schemas/Rule'
          description: rules list.
        combinablepromo:
          type: boolean
          default: true
          description: If set to TRUE, that means, if no exclusive promotion is already applied to the input basket, this promotion can be applied. Otherwise, this promotion can't be applied.
        commissiondiscountprice:
          type: boolean
          default: false
          description: if set to TRUE, the calculation of the commission is done of the discounted price, otherise the calculation is done on the gross price.
      example: {"structure":{"blcode":"GRIDBEES"},"promotioncodes":["SUMMER2021;SPRING2021"],"startdate":"2021-04-01T14:27:00.000Z","enddate":"2020-09-30T14:27:00.000Z","status":"Created","rules":[{"ruleID":"3062f860-f071-4242-893e-139d8d86106d","conditions":[{"conditionid":"125473a9-cc66-4804-8f3e-8217109333b3","conditionlabel":"10","parameter1":"BasketLine","parameter2":">=","parameter3":"10"}],"behaviours":[{"behaviourid":"d8ca6f36-d919-488b-bef4-f9b452ceb501","behaviourlabel":"10","isreversedprice":false,"parameter1":"BasketDiscountAmount","parameter2":"10","parameter8":""}],"description":"My little promotion"}],"title":"promo of the year","priority":1000,"combinablepromo":true,"commissiondiscountprice":false}
    PromotionRequest:
      type: object
      properties:
        promotionid :
          type: string
          description: technical key
        promotionids:
          type: array
          format : string
          description: technical identifiers
        businesslinecode:
          type: string
          description: Business line code
        countrycode:
          type: string
          description: Country code
        languagecode:
          type: string
          description: Language code
        haspromocode:
          type: boolean
          description: The promotion has a promocode
        marketcode:
          type: string
          description: Market code
        usagelimit :
          type: string
          description: type of the promotion
          enum:
            - LimitedNumber
            - NoLimit
            - Voucher
        enddate:
          type: string
          format: date-time
          description: end date of the promotion.
        status :
          type: string
          description: status of the promotion
          enum:
            - Created
            - Published
            - Unpublished
      RequestContext:
        type: object
        properties:
          queryprojection:
            description: list of fields to filter in the response
            type: array
            items:
              type: string

      example:
        {}

    PromotionTagRequest:
      type: object
      properties:
        businesslinecode:
          type: string
          description: Business line code
        countrycode:
          type: string
          description: Country code
        languagecode:
          type: string
          description: Language code
        promotionid:
          type: string
          description: technical identifier
        haspromocode:
          type: boolean
          description: The promotion has a promocode
        marketcode:
          type: string
          description: Market code
      example:
        {}
    PromotionBooking:
      type: object
      properties:
        promotionid:
          type: string
          description: Technical identifier of the promotion
        haspromocode:
          type: boolean
          description: Promotion has a promocode
        startbookingdate:
          type: string
          format: date-time
          description: Promotion start date
        endbookingdate:
          type: string
          format: date-time
          description: Promotion end date
        businesslinecode:
          type: string
          description: Business line code
        countrycode:
          type: string
          description: Country code
        marketcode:
          type: string
          description: Market code
        salience:
          type: integer
          description: Priority of the promotion
        rules:
          type: array
          items:
            $ref: '#/components/schemas/PriorityRule'
          description: Promotion rules list
      example:
        [{"promotionid":"093e610e56f343ba807237a3a860df01","haspromocode":false,"startbookingdate":"2020-02-27T15:20:00.000Z","endbookingdate":"2020-03-31T14:20:00.000Z","businesslinecode":"PCV","rules":[{"conditions":{"activities":[{"offercode":"VAM","quantity":1}]},"behaviours":[{"discountname":"LineDiscountPercent","discounttype":"PERCENT","discountvalue":50.0}]}]},{"promotionid":"c9e9fe47cc554540a627c50e51c217d3","haspromocode":false,"startbookingdate":"2020-02-02T23:01:00.000Z","endbookingdate":"2020-04-12T22:59:00.000Z","businesslinecode":"PCV","rules":[{"conditions":{"starttraveldate":"2020-02-02T23:01:00.000Z","endtraveldate":"2020-03-31T21:59:00.000Z","channels":["API","CALLCENTER","WEB_B2B"],"activities":[{"offercode":"MS1","quantity":1},{"offercode":"PS","quantity":1}],"productfilter":[{"attribute":"channel","value":"API"},{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2B"},{"attribute":"vendorcode","value":"006460"}]},"behaviours":[{"discountname":"PaxDiscountPercent","reservationtype":"INDIVIDUAL","reservationvaluetype":"ADULT","quantity":1,"discounttype":"PERCENT","discountvalue":10.0,"productfilter":[{"attribute":"channel","value":"API"},{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2B"}]},{"discountname":"PaxDiscountPercent","reservationtype":"INDIVIDUAL","reservationvaluetype":"CHILD","quantity":1,"discounttype":"PERCENT","discountvalue":10.0,"productfilter":[{"attribute":"channel","value":"API"},{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2B"}]}]},{"conditions":{"starttraveldate":"2020-02-02T23:01:00.000Z","endtraveldate":"2020-03-31T21:59:00.000Z","channels":["API","CALLCENTER","WEB_B2B"],"activities":[{"offercode":"VAP","quantity":1}],"productfilter":[{"attribute":"vendorcode","value":"006460"},{"attribute":"channel","value":"API"},{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2B"}]},"behaviours":[{"discountname":"PaxDiscountAmount","discounttype":"FIXED","discountvalue":0.0,"productfilter":[{"attribute":"vendorcode","value":"006460"}]}]}]}]
    ProductItem:
      type: object
      properties:
        productid:
          type: string
        productcode:
          type: string
        itemnumid:
          type: string
        quantity:
          type: integer
        itemlabel:
          type: string
        promisedavailability:
          type: string
          format: date-time
        customdata:
          $ref: '#/components/schemas/MetaData'
        vatcode:
          type: string
        vatrate:
          type: string
        category:
          type: string
        family:
          type: string
        subfamily:
          type: string
        productgroup:
          type: string
        shippingrate:
          type: string
        segment1 :
          type: string
        segment2 :
          type: string
    Reservation:
      type: object
      properties:
        minquantity:
          type: integer
          description: Minimum quantity
        maxquantity:
          type: integer
          description: Maximum quantity
        reservationtype:
          type: string
          description: Reservation type
    ReservationType:
      type: object
      properties:
        minquantity:
          type: integer
          description: Minimum quantity
        maxquantity:
          type: integer
          description: Maximum quantity
        code:
          type: string
          description: Code
        value:
          type: string
          description: Value
    ResultCode:
      type: object
      properties:
        result :
          type: string
          description: Boolean return code
      example: { "result" : true}
    RequestContext:
      type: object
      properties:
        queryprojection:
          description: list of fields to filter in the response
          type: array
          items:
            type: string
    Rule:
      type: object
      properties:
        ruleID :
          type: string
          description: auto-generated by the service
        salience:
          type: integer
          description: all eligible promotions are applied to the input basket. This priority property defines the order to apply the eligible promotions.  From the highest to the lowest.
        conditions :
          type: array
          items:
            $ref: '#/components/schemas/RuleCondition'
        behaviours :
          type: array
          items:
            $ref: '#/components/schemas/RuleBehaviour'
        description :
          type: string
          description: promotion description
    RuleCondition:
      type: object
      properties:
        conditionid :
          type: string
          description: auto-generated by the service
        conditionlabel :
          type: string
          description: description
        parameter1 :
          type: string
          oneOf:
            - enum:
              - BasketAmount
              - BasketLine
              - ProdID
              - ProdCategory
              - ProdFamily
              - ProdSubFamily
              - PaymentDetail
              - DeliveryDetail
              - ProdCustomParam1
              - ProductFilters
              - BundleProductQuantity
              - OfferQuantity,
              - Frequency
              - Shop
              - SynchronizeProduct
              - Canal
              - Reservation
              - Lang
              - Vendor
              - OfferType
              - PassengerType
              - ProductGroup
              - Offer
              - Application
              - SubscriptionPreference
              - SubscriptionType
              - CommissionAmount
              - CommissionPercent
    RuleBehaviour:
      type: object
      properties:
        behaviourid :
          type: string
          description: auto-generated by the service
        behaviourlabel :
          type: string
          description: description
        isreversedprice :
          type: boolean
        parameter1 :
          type: string
          oneOf:
            - enum:
                - BasketDiscountPercent
                - BasketDiscountAmount
                - LineDiscountPercent
                - LineDiscountAmount
                - AddProd
                - SetFees
                - FeeDiscountAmount
                - FeeDiscountPercent
                - DeferredVoucher
                - DeferredEmailTemplate
                - CommissionAmount
                - CommissionPercent
                - TheCheapestPercent
                - GroupDiscountPercent
                - AddSynchronizedProduct
                - PaxDiscountAmount
                - PaxDiscountPercent
                - SubscriptionAmount
                - SubscriptionPercent
                - OfferDiscountPercent
                - OfferDiscountAmount
        parameter2 :
          type: string
        paramter3 :
          type: string
        paramter4 :
          $ref: '#/components/schemas/BasketAddedProduct'
        paramter5 :
          $ref: '#/components/schemas/MetaData'
        paramter6 :
          $ref: '#/components/schemas/MetaData'
        parameter7 :
          type: string
        paramter8 :
          type: string
        paramter9 :
          $ref: '#/components/schemas/MetaDataQuantityPercent'
        paramter10 :
          $ref: '#/components/schemas/MetaDataCategorization'
    SearchRequest:
      type: object
      properties:
        orderid:
          type: string
          description: Order Identifier
        orderids:
          type: array
          items:
            type: string
          description: Order Identifiers
        vendorcodes:
          type: array
          items:
            type : string
          description: Vendor code
        paymentmode:
          type: string
          description: Payment mode
        invoicenumber:
          type: string
          description: Invoice number
        ordertype:
          type: string
          description: order type
          example: BOOKING, ORDER, QUOTATION
        structure:
          $ref: '#/components/schemas/Structure'
          description: Structure (only, marketcode, countrycode, shopcode are filtered)
        user:
          type: string
          description: The user assigned to the booking
        booking:
          $ref: '#/components/schemas/BookingRequest'
          description: External references
        transactionnumber:
          type: string
          description: Business booking reference
        lastname:
          type: string
          description: Billing adrress lastname
        firstname:
          description: billing address first name
        paymentstatus:
          type: string
          description: Booking payment status
          example: PAID, PENDING
        orderstatus:
          type: string
          description: Booking status
          example: PROCESSED, PENDING
        startdate:
          type: string
          format: date-time
          description: Start creation date
        enddate:
          type: string
          format: date-time
          description: End creation date
        startexpirationdate:
          type: string
          format: date-time
          description: If it is a quotation, start  date of the expired delay
        endexpirationdate:
          type: string
          format: date-time
          description: If it is a quotation, end  date of the expired delay
        requestcontext:
          $ref: '#/components/schemas/RequestContext'
          description: restrict fields to return in the response
      example:
        {"orderids":["2db89c7b69f54767ae8280bbb9449c47", "116e80c594e24508bae7989ec01038c1"],"requestcontext":{"queryprojection":["orderid","amount","lines"]}}
    Structure:
      required:
        - blcode
      type: object
      properties:
        blcode:
          type: string
          example: Demo
        countrycode:
          type: string
          example: FR
        marketcode:
          type: string
          example: FR
    TaxDetail:
      type: object
      properties:
        taxtype :
          type: string
        code:
          type: string
        reference:
          type: string
        label:
          type: string
        vatcode:
          type: string
        vatrate:
          type: number
          format: double
        price:
          type: number
          format: double
        quantity:
          type: integer
    Ticket :
      type: object
      properties:
        businesstype:
          type: string
          description: Type of ticket (VOUCHER or TICKET)
        transactionnumber :
          type: string
          description: Reference of the reservation
        categories:
          type: string
          description: category type concerned by the ticket/voucher.
          example: for tourism activity => ADULT, CHILD, INFANT
        reservationdate:
          description: Reservation date
          type: string
          format: date-time
        formattype:
          type: string
          description: The format of the the ticket
          example: BARCODE, QROCODE
        subformattype:
          type: string
          description: The sub type of the format
          example: EAN128
        media:
          description: Info about the media
          $ref: '#/components/schemas/Media'
      example:
        {"businesstype":"VOUCHER","suppliercode":"","transactionnumber":"CJGD0000008538","supplierbookingreference":"","categories":{},"reservationdate":"2020-02-18T13:00:00.000Z","languagecode":"en","formattype":"BARCODE","subformattype":"QR","media":{"url":"http://api-uat.gridbees.com/medias/tickets/02ba/68ac/02ba68ac5b8fc17bebdf4675e55dc0826d3a.pdf","mediatype":"PDF","size":15144,"languagecode":"en"}}
    TicketRequest:
      type: object
      properties:
        orderid:
          type: string
          description: Order Identifier
        orderids:
          type: array
          items:
            type: string
          description: Order Identifiers
        startdate:
          type: string
          format: date-time
          description: Start creation date
        enddate:
          type: string
          format: date-time
          description: End creation date
      example:
        {"orderids":["2db89c7b69f54767ae8280bbb9449c47", "116e80c594e24508bae7989ec01038c1"]}

    UpdateRequest:
      type: object
      required:
        - orderid
        - ordertracking
        - billingaddress
        - lines
      properties:
        orderid:
          type: string
          description: Internal Order Identifier
        identifier:
          $ref: '#/components/schemas/Identifier'
        ordertracking:
          $ref: '#/components/schemas/TrackingDataUpdate'
          description: Order Tracking
        comtracking:
          $ref: '#/components/schemas/CommercialTracking'
          description: Commercial Tracking
        amount:
          $ref: '#/components/schemas/Amount'
        billingaddress:
          $ref: '#/components/schemas/Address'
          description: Billing address
        deliverydetail:
          $ref: '#/components/schemas/DeliveryDetail'
          description: Delivery details
        Payment:
          $ref: '#/components/schemas/Payment'
          description: Payment details
        customdata:
          $ref: '#/components/schemas/MetaData'
          description: Custom data. To use, if needed to store some data. Not analyzed by Gridbees
        lines:
          type: array
          items:
            $ref: '#/components/schemas/OrderLine'
          description: order lines

    TrackingData:
      type: object
      properties:
        vendorcode:
          type: string
          description: vendor Identifier
        orderchannel:
          type: string
          description: Order Channel
        contactchannel:
          type: string
          description: Contact channel
        site:
          type: string
          description: Client site code
        agency:
          type: string
          description: Client agency code
        user:
          type: string
          description: User to assign the operation
        externalbookingid:
          type: string
          description: Client booking reference
        bookingid:
          type: string
          description: Gridbees Booking identifier
        externaltransactionnumber:
          type: string
          description: Client External business reference
        transactionnumber:
          type: string
          description: Gridbees business reference
        platformreferencenumber:
          type: string
          description: Other platform business reference
        supplierreferencenumber:
          type: string
          description: Other supplier business reference
        invoicenumber:
          type: string
          description: Invoice reference
        comments:
          type: array
          items:
            $ref: '#/components/schemas/Comment'
          description: List of comments

    TrackingDataUpdate :
      required:
        - transactionnumber
      type: object
      properties:
        vendorcode:
          type: string
          description: vendor Identifier
        orderchannel:
          type: string
          description: Order Channel
        contactchannel:
          type: string
          description: Contact channel
        site:
          type: string
          description: Client site code
        agency:
          type: string
          description: Client agency code
        user:
          type: string
          description: User to assign the operation
        externalbookingid:
          type: string
          description: Client booking reference
        bookingid:
          type: string
          description: Gridbees Booking identifier
        externaltransactionnumber:
          type: string
          description: Client External business reference
        transactionnumber:
          type: string
          description: Gridbees business reference
        platformreferencenumber:
          type: string
          description: Other platform business reference
        supplierreferencenumber:
          type: string
          description: Other supplier business reference
        invoicenumber:
          type: string
          description: Invoice reference
        comments:
          type: array
          items:
            $ref: '#/components/schemas/Comment'
          description: List of comments

    WeekHour:
      type: object
      properties:
        date:
          type: string
          format: date-time
          description: Date
        departuretime:
          type: string
          description: Departure time
        languages:
          type: array
          items:
            type: string
          description: Languages

paths:
  /promotion/upsert:
    post:
      tags:
        - Promotion Service
      summary: promotion/upsert

      description: |
        This service is use to create or update a promotion. If the promotionid field is filled, the service will search the concerned promotion and update it.

        In case of update, the promotion stored is the database is replaced by the input promotion is the request. No merge is done.

        If pomotionid is not filled or filled but not found, a new promotion is created.

      operationId: PromotionUpsert
      requestBody:
        description: Request query object
        content:
          application/json:
            examples:
              Telecom:
                description: |
                  Promotion for any basket having an offer EPL-LIVETV, will get a 20% Off on this offer.
                value : {"promotionid":"d6489a5bcd4b4ae69b80a23ff2a1886e", "unicitykey":"EPL Early birds","usagelimit":"Voucher","startdate":"2020-05-14T22:00:00.000Z","enddate":"2020-06-30T21:59:00.000Z","status":"Published","rules":[{"ruleID":"47df9560-49be-4185-812b-9025b4cf82d3","salience":6567,"conditions":[{"conditionid":"0d44bc4c-506a-43c1-bb68-019d5091f11a","conditionlabel":"EPL Live","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"EPL-LIVETV","quantity":1}]}],"behaviours":[{"behaviourid":"7715175a-fa2e-4360-adaf-40e74fc86cd8","behaviourlabel":"20OFF","parameter1":"LineDiscountPercent","parameter2":"20"}],"description":"EPLLive-Rule"}],"title":"EPL Early birds during ECL finals","priority":140,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":false,"salience":6567}
              Retail:
                description : |
                  Promotion for a basket containing offer code = 2WS1, once the purchase is done, use the template EMAIL-FOODTHAI-VOUCHER to email a single-use code of the campaign FOOD33PERCENT
                value : {"promotionid":"0e173f52135f484a83f597f78332f87a","tenantid":"a6ca93d74c284a1bad47c04191af1188","voucherIdCode":"a4490432ba52412e910c8da50bd08a84","startdate":"2019-10-31T23:00:00.000Z","enddate":"2020-05-30T16:19:00.000Z","status":"Published","rules":[{"ruleID":"14e3b5ba-dff6-468a-9f6f-1b1d7db207de","salience":3467,"conditions":[{"conditionid":"9744d16a-8885-4bd5-87bc-da07bc5f1424","conditionlabel":"2WS1 Offer","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"2WS1","quantity":1}]}],"behaviours":[{"behaviourid":"e5aeff12-cf57-45a7-91be-fe4ec690a18e","behaviourlabel":"Send Coupon","parameter1":"DeferredEmailTemplate","parameter2":"FOOD33PERCENT","parameter3":"EMAIL-FOODTHAI-VOUCHER"}],"description":"YearlyPayment"}],"title":"Promotion - Send a coupon for 2WS1","priority":1,"combinablepromo":true,"combinablecop":false,"commissiondiscountprice":false,"salience":3467}
              Tourism:
                description: |
                  Promotion for any purchase or activity code = PS, comig from CALLCENTER or WEB_B2B channel, for a travel date between 2020-02-27 and 2020-10-30.
                  Get 15% Off on ADULT passengers and 10% Off on CHILD passengers.
                value : {"promotionid":"1a1f19321c1c442ba8b1f94ff4fc2965","voucherIdCode":"913c22450fc74960a56d5df0efec41ef","unicitykey":"B2C - PS -10%","structure":{"blcode":"PCV"},"startdate":"2020-02-27T08:51:00.000Z","enddate":"2020-08-13T21:59:00.000Z","status":"Published","rules":[{"ruleID":"bfc91478-ecd1-40af-97ee-2e77ae00830f","salience":9999,"conditions":[{"conditionid":"5b7ed86a-3fef-4c99-a586-8b157a044d0c","conditionlabel":"CANAL","parameter1":"Canal","parameter5":[{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2C"}]},{"conditionid":"086aa6b9-1876-41cf-8402-2a0e2bed96db","conditionlabel":"DATE","parameter1":"Reservation","parameter2":"2020-02-27T08:51:00.000Z","parameter3":"2020-10-30T22:59:00.000Z"},{"conditionid":"aa20109f-3357-4ac3-93a8-9fdc87aa58fb","conditionlabel":"TOUR","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"PS","quantity":1}]}],"behaviours":[{"behaviourid":"0326acc8-925d-4a19-bfdf-40e151ddeb5b","behaviourlabel":"REMISE","isrevertedprice":false,"parameter1":"PaxDiscountPercent","parameter10":[{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"ADULT","ispercent":1,"quantity":1,"value":15},{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"CHILD","ispercent":1,"quantity":1,"value":10}]}],"description":"ps"}],"title":"B2C - PS -10%","priority":1,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":true,"salience":9999}
            schema:
              $ref: '#/components/schemas/Promotion'
        required: true
      responses:
        200:
          description:
            .
          content:
            application/json:
              examples:
                Telecom:
                  description: |
                    Promotion for any basket having an offer EPL-LIVETV, will get a 20% Off on this offer.
                  value : {"promotionid":"d6489a5bcd4b4ae69b80a23ff2a1886e", "unicitykey":"EPL Early birds","usagelimit":"Voucher","startdate":"2020-05-14T22:00:00.000Z","enddate":"2020-06-30T21:59:00.000Z","status":"Published","rules":[{"ruleID":"47df9560-49be-4185-812b-9025b4cf82d3","salience":6567,"conditions":[{"conditionid":"0d44bc4c-506a-43c1-bb68-019d5091f11a","conditionlabel":"EPL Live","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"EPL-LIVETV","quantity":1}]}],"behaviours":[{"behaviourid":"7715175a-fa2e-4360-adaf-40e74fc86cd8","behaviourlabel":"20OFF","parameter1":"LineDiscountPercent","parameter2":"20"}],"description":"EPLLive-Rule"}],"title":"EPL Early birds during ECL finals","priority":140,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":false,"salience":6567}
                Retail:
                  description : |
                    Promotion for a basket containing offer code = 2WS1, once the purchase is done, use the template EMAIL-FOODTHAI-VOUCHER to email a single-use code of the campaign FOOD33PERCENT
                  value : {"promotionid":"0e173f52135f484a83f597f78332f87a","tenantid":"a6ca93d74c284a1bad47c04191af1188","voucherIdCode":"a4490432ba52412e910c8da50bd08a84","startdate":"2019-10-31T23:00:00.000Z","enddate":"2020-05-30T16:19:00.000Z","status":"Published","rules":[{"ruleID":"14e3b5ba-dff6-468a-9f6f-1b1d7db207de","salience":3467,"conditions":[{"conditionid":"9744d16a-8885-4bd5-87bc-da07bc5f1424","conditionlabel":"2WS1 Offer","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"2WS1","quantity":1}]}],"behaviours":[{"behaviourid":"e5aeff12-cf57-45a7-91be-fe4ec690a18e","behaviourlabel":"Send Coupon","parameter1":"DeferredEmailTemplate","parameter2":"FOOD33PERCENT","parameter3":"EMAIL-FOODTHAI-VOUCHER"}],"description":"YearlyPayment"}],"title":"Promotion - Send a coupon for 2WS1","priority":1,"combinablepromo":true,"combinablecop":false,"commissiondiscountprice":false,"salience":3467}
                Tourism:
                  value : {"promotionid":"1a1f19321c1c442ba8b1f94ff4fc2965","voucherIdCode":"913c22450fc74960a56d5df0efec41ef","unicitykey":"B2C - PS -10%","structure":{"blcode":"PCV"},"startdate":"2020-02-27T08:51:00.000Z","enddate":"2020-08-13T21:59:00.000Z","status":"Published","rules":[{"ruleID":"bfc91478-ecd1-40af-97ee-2e77ae00830f","salience":9999,"conditions":[{"conditionid":"5b7ed86a-3fef-4c99-a586-8b157a044d0c","conditionlabel":"CANAL","parameter1":"Canal","parameter5":[{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2C"}]},{"conditionid":"086aa6b9-1876-41cf-8402-2a0e2bed96db","conditionlabel":"DATE","parameter1":"Reservation","parameter2":"2020-02-27T08:51:00.000Z","parameter3":"2020-10-30T22:59:00.000Z"},{"conditionid":"aa20109f-3357-4ac3-93a8-9fdc87aa58fb","conditionlabel":"TOUR","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"PS","quantity":1}]}],"behaviours":[{"behaviourid":"0326acc8-925d-4a19-bfdf-40e151ddeb5b","behaviourlabel":"REMISE","isrevertedprice":false,"parameter1":"PaxDiscountPercent","parameter10":[{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"ADULT","ispercent":1,"quantity":1,"value":15},{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"CHILD","ispercent":1,"quantity":1,"value":10}]}],"description":"ps"}],"title":"B2C - PS -10%","priority":1,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":true,"salience":9999}

              schema:
                $ref: '#/components/schemas/Promotion'
        401:
          description: The resource requires authentication, which was not supplied
            with the request
          content: {}
      x-codegen-request-body-name: request

  /promotion/set:
    post:
      tags:
        - Promotion Service
      summary: promotion/set
      description: |
        This service is use to create a new promotion.
      operationId: PromotionSet
      requestBody:
        description: Request query object
        content:
          application/json:
            examples:
              Telecom:
                description: |
                  Promotion for any basket having an offer EPL-LIVETV, will get a 20% Off on this offer.
                value : { "unicitykey":"EPL Early birds","usagelimit":"Voucher","startdate":"2020-05-14T22:00:00.000Z","enddate":"2020-06-30T21:59:00.000Z","status":"Published","rules":[{"ruleID":"47df9560-49be-4185-812b-9025b4cf82d3","salience":6567,"conditions":[{"conditionid":"0d44bc4c-506a-43c1-bb68-019d5091f11a","conditionlabel":"EPL Live","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"EPL-LIVETV","quantity":1}]}],"behaviours":[{"behaviourid":"7715175a-fa2e-4360-adaf-40e74fc86cd8","behaviourlabel":"20OFF","parameter1":"LineDiscountPercent","parameter2":"20"}],"description":"EPLLive-Rule"}],"title":"EPL Early birds during ECL finals","priority":140,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":false,"salience":6567}
              Retail:
                description : |
                  Promotion for a basket containing offer code = 2WS1, once the purchase is done, use the template EMAIL-FOODTHAI-VOUCHER to email a single-use code of the campaign FOOD33PERCENT
                value : {"startdate":"2019-10-31T23:00:00.000Z","enddate":"2020-05-30T16:19:00.000Z","status":"Published","rules":[{"ruleID":"14e3b5ba-dff6-468a-9f6f-1b1d7db207de","salience":3467,"conditions":[{"conditionid":"9744d16a-8885-4bd5-87bc-da07bc5f1424","conditionlabel":"2WS1 Offer","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"2WS1","quantity":1}]}],"behaviours":[{"behaviourid":"e5aeff12-cf57-45a7-91be-fe4ec690a18e","behaviourlabel":"Send Coupon","parameter1":"DeferredEmailTemplate","parameter2":"FOOD33PERCENT","parameter3":"EMAIL-FOODTHAI-VOUCHER"}],"description":"YearlyPayment"}],"title":"Promotion - Send a coupon for 2WS1","priority":1,"combinablepromo":true,"combinablecop":false,"commissiondiscountprice":false,"salience":3467}
              Tourism:
                description: |
                  Promotion for any purchase or activity code = PS, comig from CALLCENTER or WEB_B2B channel, for a travel date between 2020-02-27 and 2020-10-30.
                  Get 15% Off on ADULT passengers and 10% Off on CHILD passengers.
                value : {"unicitykey":"B2C - PS -10%","structure":{"blcode":"PCV"},"startdate":"2020-02-27T08:51:00.000Z","enddate":"2020-08-13T21:59:00.000Z","status":"Published","rules":[{"ruleID":"bfc91478-ecd1-40af-97ee-2e77ae00830f","salience":9999,"conditions":[{"conditionid":"5b7ed86a-3fef-4c99-a586-8b157a044d0c","conditionlabel":"CANAL","parameter1":"Canal","parameter5":[{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2C"}]},{"conditionid":"086aa6b9-1876-41cf-8402-2a0e2bed96db","conditionlabel":"DATE","parameter1":"Reservation","parameter2":"2020-02-27T08:51:00.000Z","parameter3":"2020-10-30T22:59:00.000Z"},{"conditionid":"aa20109f-3357-4ac3-93a8-9fdc87aa58fb","conditionlabel":"TOUR","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"PS","quantity":1}]}],"behaviours":[{"behaviourid":"0326acc8-925d-4a19-bfdf-40e151ddeb5b","behaviourlabel":"REMISE","isrevertedprice":false,"parameter1":"PaxDiscountPercent","parameter10":[{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"ADULT","ispercent":1,"quantity":1,"value":15},{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"CHILD","ispercent":1,"quantity":1,"value":10}]}],"description":"ps"}],"title":"B2C - PS -10%","priority":1,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":true,"salience":9999}
            schema:
              $ref: '#/components/schemas/PromotionCreate'
        required: true
      responses:
        200:
          description:
            .
          content:
            application/json:
              examples:
                Telecom:
                  description: |
                    Promotion for any basket having an offer EPL-LIVETV, will get a 20% Off on this offer.
                  value : {"promotionid":"d6489a5bcd4b4ae69b80a23ff2a1886e", "unicitykey":"EPL Early birds","usagelimit":"Voucher","startdate":"2020-05-14T22:00:00.000Z","enddate":"2020-06-30T21:59:00.000Z","status":"Published","rules":[{"ruleID":"47df9560-49be-4185-812b-9025b4cf82d3","salience":6567,"conditions":[{"conditionid":"0d44bc4c-506a-43c1-bb68-019d5091f11a","conditionlabel":"EPL Live","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"EPL-LIVETV","quantity":1}]}],"behaviours":[{"behaviourid":"7715175a-fa2e-4360-adaf-40e74fc86cd8","behaviourlabel":"20OFF","parameter1":"LineDiscountPercent","parameter2":"20"}],"description":"EPLLive-Rule"}],"title":"EPL Early birds during ECL finals","priority":140,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":false,"salience":6567}
                Retail:
                  description : |
                    Promotion for a basket containing offer code = 2WS1, once the purchase is done, use the template EMAIL-FOODTHAI-VOUCHER to email a single-use code of the campaign FOOD33PERCENT
                  value : {"promotionid":"0e173f52135f484a83f597f78332f87a","tenantid":"a6ca93d74c284a1bad47c04191af1188","voucherIdCode":"a4490432ba52412e910c8da50bd08a84","startdate":"2019-10-31T23:00:00.000Z","enddate":"2020-05-30T16:19:00.000Z","status":"Published","rules":[{"ruleID":"14e3b5ba-dff6-468a-9f6f-1b1d7db207de","salience":3467,"conditions":[{"conditionid":"9744d16a-8885-4bd5-87bc-da07bc5f1424","conditionlabel":"2WS1 Offer","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"2WS1","quantity":1}]}],"behaviours":[{"behaviourid":"e5aeff12-cf57-45a7-91be-fe4ec690a18e","behaviourlabel":"Send Coupon","parameter1":"DeferredEmailTemplate","parameter2":"FOOD33PERCENT","parameter3":"EMAIL-FOODTHAI-VOUCHER"}],"description":"YearlyPayment"}],"title":"Promotion - Send a coupon for 2WS1","priority":1,"combinablepromo":true,"combinablecop":false,"commissiondiscountprice":false,"salience":3467}
                Tourism:
                  value : {"promotionid":"1a1f19321c1c442ba8b1f94ff4fc2965", "unicitykey":"B2C - PS -10%","structure":{"blcode":"PCV"},"startdate":"2020-02-27T08:51:00.000Z","enddate":"2020-08-13T21:59:00.000Z","status":"Published","rules":[{"ruleID":"bfc91478-ecd1-40af-97ee-2e77ae00830f","salience":9999,"conditions":[{"conditionid":"5b7ed86a-3fef-4c99-a586-8b157a044d0c","conditionlabel":"CANAL","parameter1":"Canal","parameter5":[{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2C"}]},{"conditionid":"086aa6b9-1876-41cf-8402-2a0e2bed96db","conditionlabel":"DATE","parameter1":"Reservation","parameter2":"2020-02-27T08:51:00.000Z","parameter3":"2020-10-30T22:59:00.000Z"},{"conditionid":"aa20109f-3357-4ac3-93a8-9fdc87aa58fb","conditionlabel":"TOUR","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"PS","quantity":1}]}],"behaviours":[{"behaviourid":"0326acc8-925d-4a19-bfdf-40e151ddeb5b","behaviourlabel":"REMISE","isrevertedprice":false,"parameter1":"PaxDiscountPercent","parameter10":[{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"ADULT","ispercent":1,"quantity":1,"value":15},{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"CHILD","ispercent":1,"quantity":1,"value":10}]}],"description":"ps"}],"title":"B2C - PS -10%","priority":1,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":true,"salience":9999}
              schema:
                $ref: '#/components/schemas/Promotion'
        401:
          description: The resource requires authentication, which was not supplied
            with the request
          content: {}
      x-codegen-request-body-name: request

  /promotion/search:
    post:
      tags:
        - Promotion Service
      summary: promotion/search
      description: |
        This service is use to search promotions.
      operationId: PromotionSearch
      requestBody:
        description: Request query object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromotionRequest'
        required: true
      responses:
        200:
          description:
            .
          content:
            application/json:
              examples:
                Telecom:
                  description: |
                    Promotion for any basket having an offer EPL-LIVETV, will get a 20% Off on this offer.
                  value : [{"promotionid":"d6489a5bcd4b4ae69b80a23ff2a1886e", "unicitykey":"EPL Early birds","usagelimit":"Voucher","startdate":"2020-05-14T22:00:00.000Z","enddate":"2020-06-30T21:59:00.000Z","status":"Published","rules":[{"ruleID":"47df9560-49be-4185-812b-9025b4cf82d3","salience":6567,"conditions":[{"conditionid":"0d44bc4c-506a-43c1-bb68-019d5091f11a","conditionlabel":"EPL Live","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"EPL-LIVETV","quantity":1}]}],"behaviours":[{"behaviourid":"7715175a-fa2e-4360-adaf-40e74fc86cd8","behaviourlabel":"20OFF","parameter1":"LineDiscountPercent","parameter2":"20"}],"description":"EPLLive-Rule"}],"title":"EPL Early birds during ECL finals","priority":140,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":false,"salience":6567}]
                Retail:
                  description : |
                    Promotion for a basket containing offer code = 2WS1, once the purchase is done, use the template EMAIL-FOODTHAI-VOUCHER to email a single-use code of the campaign FOOD33PERCENT
                  value : [{"promotionid":"0e173f52135f484a83f597f78332f87a","tenantid":"a6ca93d74c284a1bad47c04191af1188","voucherIdCode":"a4490432ba52412e910c8da50bd08a84","startdate":"2019-10-31T23:00:00.000Z","enddate":"2020-05-30T16:19:00.000Z","status":"Published","rules":[{"ruleID":"14e3b5ba-dff6-468a-9f6f-1b1d7db207de","salience":3467,"conditions":[{"conditionid":"9744d16a-8885-4bd5-87bc-da07bc5f1424","conditionlabel":"2WS1 Offer","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"2WS1","quantity":1}]}],"behaviours":[{"behaviourid":"e5aeff12-cf57-45a7-91be-fe4ec690a18e","behaviourlabel":"Send Coupon","parameter1":"DeferredEmailTemplate","parameter2":"FOOD33PERCENT","parameter3":"EMAIL-FOODTHAI-VOUCHER"}],"description":"YearlyPayment"}],"title":"Promotion - Send a coupon for 2WS1","priority":1,"combinablepromo":true,"combinablecop":false,"commissiondiscountprice":false,"salience":3467}]
                Tourism:
                  value : [{"promotionid":"1a1f19321c1c442ba8b1f94ff4fc2965","voucherIdCode":"913c22450fc74960a56d5df0efec41ef","unicitykey":"B2C - PS -10%","structure":{"blcode":"PCV"},"startdate":"2020-02-27T08:51:00.000Z","enddate":"2020-08-13T21:59:00.000Z","status":"Published","rules":[{"ruleID":"bfc91478-ecd1-40af-97ee-2e77ae00830f","salience":9999,"conditions":[{"conditionid":"5b7ed86a-3fef-4c99-a586-8b157a044d0c","conditionlabel":"CANAL","parameter1":"Canal","parameter5":[{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2C"}]},{"conditionid":"086aa6b9-1876-41cf-8402-2a0e2bed96db","conditionlabel":"DATE","parameter1":"Reservation","parameter2":"2020-02-27T08:51:00.000Z","parameter3":"2020-10-30T22:59:00.000Z"},{"conditionid":"aa20109f-3357-4ac3-93a8-9fdc87aa58fb","conditionlabel":"TOUR","parameter1":"Offer","parameter8":[{"attribute":"offercode","value":"PS","quantity":1}]}],"behaviours":[{"behaviourid":"0326acc8-925d-4a19-bfdf-40e151ddeb5b","behaviourlabel":"REMISE","isrevertedprice":false,"parameter1":"PaxDiscountPercent","parameter10":[{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"ADULT","ispercent":1,"quantity":1,"value":15},{"datatype":"PASSENGER","attribute":"INDIVIDUAL","category":"CHILD","ispercent":1,"quantity":1,"value":10}]}],"description":"ps"}],"title":"B2C - PS -10%","priority":1,"combinablepromo":false,"combinablecop":false,"commissiondiscountprice":true,"salience":9999}]

              schema:
                type: array
                items:
                $ref: '#/components/schemas/Promotion'
        401:
          description: The resource requires authentication, which was not supplied
            with the request
          content: {}
      x-codegen-request-body-name: request

  /promotion/publish :
    post:
      tags:
        - Pricing Service
        - Promotion Service
      operationId: PromotionPublish
      summary: promotion/publish
      description: |
        This service informs the merchant about the list and conditions of all active promotions in the system.

        For example, the merchant needs to display on some product pages or page lists, some discounts information like “10% off on offer A”.

         If exits a promotion such as “for all basket amount greater than 100 euros, you have 10% off”, so you will be able to display a tag (sticker) on any offer having a price greater than 100 euros.

        To know more about promotion management, you can access to the [Promotion page](http://www.gridbees.com/en/functdoc/en-promotion-engine).

        List of conditions used by the service :
        - BasketAmount
        - BasketLine
        - PassengerType
        - Channel
        - Offer
        - Lang
        - Reservation
        - Subscription
        - Subscription Preference
        - Vendor

        List of benefits used by the service :
        - BasketDiscountAmount
        - BasketDiscountPercent
        - LineDiscountAmount
        - LineDiscountPercent
        - TheCheapestPercent
        - PaxDiscountPercent
        - PaxDiscountAmount
        - FeeDiscountAmount
        - FeeDiscountPercent
        - SetFees
        - SubscriptionAmount
        - SubscriptionPercent
        - DeferredEmailTemplate
      requestBody:
        description: Request basket
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromotionTagRequest'
        required: true
      responses:
        200:
          description:
            .
          content:
            application/json:
              examples:
                Telecom:
                  value : [{"promotionid":"0e173f52135f484a83f597f78332f87a","haspromocode":false,"startbookingdate":"2019-11-01T00:00:00.000+01:00","endbookingdate":"2020-05-30T18:19:00.000+02:00","rules":[{"conditions":{"offers":[{"offercode":"2WS1","quantity":1}]},"behaviours":[{"discountname":"DeferredEmailTemplate","emailvoucher":{"campaigncode":"FOOD33PERCENT","templatecode":"EMAIL-FOODTHAI-VOUCHER"}}]}]},{"promotionid":"cf5caecdcfda4a619a4c9a2115aa985b","haspromocode":true,"startbookingdate":"2020-05-06T14:59:00.000+02:00","endbookingdate":"2020-06-30T14:59:00.000+02:00","businesslinecode":"BL1","rules":[{"conditions":{"subscriptions":["8CZ000000018","LQC000000017","8CV000000016"]},"behaviours":[{"discountname":"SubscriptionPercent","isreverseprice":false,"preferences":[{"datatype":"SubscriptionPercent","attribute":"MONTH","category":"MONTHPERMONTH","ispercent":1,"quantity":1,"value":10.0}]}]}]}]
                Retail:
                  value : [{"promotionid":"665df9c3385141a1b1a86cb1ff8a2d69","haspromocode":false,"startbookingdate":"2017-11-03T08:00:00.000+01:00","endbookingdate":"2021-11-07T00:59:00.000+01:00","rules":[{"conditions":{"basketamount":500.0,"operator":">=","productfilter":[{"attribute":"labels","value":"50x250"}]},"behaviours":[{"discountname":"BasketDiscountAmount","discounttype":"FIXED","discountvalue":100.0,"perPurchase":0.0,"productfilter":[{"attribute":"labels","value":"50x250"}]}]}]}]
                Tourism:
                  value : [{"promotionid":"784d2382a9da4e76a176e919913f551a","haspromocode":true,"startbookingdate":"2018-11-25T20:50:00.000Z","endbookingdate":"2021-01-01T20:50:00.000Z","rules":[{"conditions":{"basketamount":0.0,"operator":">="},"behaviours":[{"discountname":"BasketDiscountPercent","isreverseprice":false,"discounttype":"PERCENT","discountvalue":10.0}]},{"conditions":{"offers":[{"offercode":"CHCH","quantity":3},{"offercode":"PS","quantity":3}]},"behaviours":[{"discountname":"PaxDiscountAmount","reservationtype":"INDIVIDUAL","reservationvaluetype":"ADULT","isreverseprice":true,"quantity":1,"discounttype":"FIXED","discountvalue":35.0},{"discountname":"PaxDiscountAmount","reservationtype":"INDIVIDUAL","reservationvaluetype":"CHILD","isreverseprice":true,"quantity":1,"discounttype":"FIXED","discountvalue":15.0}]}]},{"promotionid":"d7b86578e37941fe8228e3a280fb63e1","haspromocode":true,"startbookingdate":"2020-02-26T13:11:00.000Z","endbookingdate":"2027-03-31T12:11:00.000Z","businesslinecode":"PCV","countrycode":"FR","marketcode":"FR","rules":[{"conditions":{"langs":["en","es","fr"]},"behaviours":[{"discountname":"PaxDiscountPercent","reservationtype":"INDIVIDUAL","reservationvaluetype":"ADULT","isreverseprice":false,"quantity":1,"discounttype":"PERCENT","discountvalue":15.0},{"discountname":"PaxDiscountPercent","reservationtype":"INDIVIDUAL","reservationvaluetype":"CHILD","isreverseprice":false,"quantity":1,"discounttype":"PERCENT","discountvalue":15.0}]}]},{"promotionid":"2336fddc8eb74b9188c9cdbd1bffb13c","haspromocode":true,"startbookingdate":"2020-04-19T12:01:00.000Z","endbookingdate":"2020-05-31T12:01:00.000Z","businesslinecode":"PCV","rules":[{"conditions":{"passengers":[{"reservationtype":"INDIVIDUAL","passengertype":"ADULT","quantity":2}]},"behaviours":[{"discountname":"BasketDiscountAmount","isreverseprice":false,"discounttype":"FIXED","discountvalue":15.0}]}]},{"promotionid":"626cc1b2b456457baefdc61c6369d76a","haspromocode":true,"startbookingdate":"2020-04-29T11:40:00.000Z","endbookingdate":"2030-06-29T11:40:00.000Z","businesslinecode":"PCV","rules":[{"conditions":{"basketamount":15.0,"operator":">=","passengers":[{"reservationtype":"INDIVIDUAL","passengertype":"ADULT","quantity":2}]},"behaviours":[{"discountname":"BasketDiscountPercent","isreverseprice":false,"discounttype":"PERCENT","discountvalue":80.0,"perPurchase":60.0}]}]},{"promotionid":"e8f432c32fef4f208e98ac8c02b759e1","haspromocode":true,"startbookingdate":"2020-05-10T13:24:00.000Z","endbookingdate":"2020-08-30T13:24:00.000Z","businesslinecode":"PCV","rules":[{"conditions":{"basketamount":20.0,"operator":">="},"behaviours":[{"discountname":"BasketDiscountPercent","isreverseprice":true,"discounttype":"PERCENT","discountvalue":10.0}]}]}]
              schema:
                type: array
                items:
                $ref: '#/components/schemas/PromotionBooking'
        401:
          description: The resource requires authentication, which was not supplied
            with the request
          content: {}
      x-codegen-request-body-name: request

  /promotion/delete/{promotionid}:
    get:
      tags:
        - Promotion Service
      summary: promotion/delete
      description: |
        This service is use to delete a promotion. If the promotion was already loaded, the pricing service will unload the deleted promotion.
      operationId: PromotionDelete
      responses:
        200:
          description:
            The request is correctly processed.
          content:
            application/json:
              schema:
                type: array
                items:
                $ref: '#/components/schemas/ResultCode'
        401:
          description: The resource requires authentication, which was not supplied
            with the request
          content: {}
      x-codegen-request-body-name: request

  /offer/publish:
    post:
      tags:
        - Offer catalog
      summary: /offer/publish
      operationId: OfferPublish
      requestBody:
        description: Offer request object
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfferRequest'
        required: true
      responses:
        200:
          description: List of published offers
          content:
            application/json:
              examples:
                Telecom:
                  value : [{"offerid":"563df08e239f4b0181c7a9ef44c68953","unicitykey":"EPLCatchup","offertype":"SUBSCRIPTION","codification":{},"structure":{"blcode":"BL1","countrycode":"TH","marketcode":"TH"},"products":[{"openingforsale":true,"startdate":"2019-09-30T22:00:00.000Z","enddate":"2020-12-31T22:59:59.000Z","items":[{"productcode":"EPLCatchup","quantity":1}]}],"properties":{"season":"2019","displaytypes":[{"code":"MONTH","value":"MONTHPERMONTH"},{"code":"MONTH","value":"WEEKPERMONTH"},{"code":"YEAR","value":"YEARPERYEAR"},{"code":"YEAR","value":"MONTHPERYEAR"}],"preferences":{"customparam1":["CC","DD"],"customparam2":["MONTH","DAY","YEAR"],"customparam3":["YEARPERYEAR","MONTHPERYEAR","MONTHPERMONTH","WEEKPERMONTH"]},"control":{}},"pricing":{"prices":[{"openingforsale":true,"startdate":"2019-09-30T22:00:00.000Z","enddate":"2021-01-31T22:59:59.000Z","pricelist":[{"sellingprice":150.0,"customparam1":"MONTH","customparam2":"MONTHPERMONTH"},{"sellingprice":37.5,"customparam1":"MONTH","customparam2":"WEEKPERMONTH"},{"sellingprice":1800.0,"customparam1":"YEAR","customparam2":"YEARPERYEAR"},{"sellingprice":150.0,"customparam1":"YEAR","customparam2":"MONTHPERYEAR"}]}]},"medias":[{"url":"http://api-dev.gridbees.com/medias/images/7487/b39d/7487b39d88bb974533d4f24524799f3843ef830c.png","rank":1,"islocalisable":false}],"status":"Published","startdate":"2019-09-30T22:00:00.000Z","enddate":"2021-01-31T22:59:59.000Z","attributes":[{"mdaxis":"title","languagecode":"en-GB","value":"EPL Catchup (highlights, old games)","backend":{"backendtype":"String","islocalizable":true}},{"mdaxis":"title","languagecode":"fr-FR","value":"EPL Catchup (highlights, old games)","backend":{"backendtype":"String","islocalizable":true}},{"mdaxis":"offerdescription","languagecode":"en-GB","value":" ","backend":{"backendtype":"String","islocalizable":true}}],"createdate":"2019-11-29T08:50:35.013Z","updatedate":"2020-05-06T11:31:15.674Z"}]
                Retail:
                  value : [{"offerid":"a12d05a173e745a381161fed41567749","unicitykey":"FOODTHAI","offertype":"ONESHOT","codification":{},"structure":{"blcode":"BL1","countrycode":"AU","marketcode":"AU"},"products":[{"openingforsale":true,"startdate":"2018-12-31T23:00:00.000Z","enddate":"2021-03-31T21:59:59.000Z","items":[{"productcode":"Deal7-Eleven","quantity":1}]}],"properties":{"season":"2019","control":{}},"pricing":{"currencycode":"THB","sellingprice":850.0,"prices":[]},"medias":[{"url":"http://api-dev.gridbees.com/medias/images/012e/157c/012e157cdca752481f459934157a1a3223ae20b5.jpg","rank":1,"islocalisable":false}],"status":"Published","startdate":"2019-10-31T23:00:00.000Z","enddate":"2021-07-16T22:00:00.000Z","attributes":[{"mdaxis":"title","languagecode":"en-GB","value":"delicious with shabby, soft sausage. ","backend":{"backendtype":"String","islocalizable":true}},{"mdaxis":"offerdescription","languagecode":"en-GB","value":"Satisfying you with a full buffet of international and seafood. Good quality raw materials Including a menu of Thai, Japanese, European food, served with tea, coffee, fruit juice","backend":{"backendtype":"String","islocalizable":true}}],"createdate":"2019-12-15T17:45:33.069Z","updatedate":"2020-05-07T08:49:17.066Z"}]
                Tourism:
                  value : [{"promotionid":"093e610e56f343ba807237a3a860df01","haspromocode":false,"startbookingdate":"2020-02-27T15:20:00.000Z","endbookingdate":"2020-03-31T14:20:00.000Z","businesslinecode":"PCV","rules":[{"conditions":{"activities":[{"offercode":"VAM","quantity":1}]},"behaviours":[{"discountname":"LineDiscountPercent","discounttype":"PERCENT","discountvalue":50}]}]},{"promotionid":"c9e9fe47cc554540a627c50e51c217d3","haspromocode":false,"startbookingdate":"2020-02-02T23:01:00.000Z","endbookingdate":"2020-04-12T22:59:00.000Z","businesslinecode":"PCV","rules":[{"conditions":{"starttraveldate":"2020-02-02T23:01:00.000Z","endtraveldate":"2020-03-31T21:59:00.000Z","channels":["API","CALLCENTER","WEB_B2B"],"activities":[{"offercode":"MS1","quantity":1},{"offercode":"PS","quantity":1}],"productfilter":[{"attribute":"channel","value":"API"},{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2B"},{"attribute":"vendorcode","value":"006460"}]},"behaviours":[{"discountname":"PaxDiscountPercent","reservationtype":"INDIVIDUAL","reservationvaluetype":"ADULT","quantity":1,"discounttype":"PERCENT","discountvalue":10,"productfilter":[{"attribute":"channel","value":"API"},{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2B"}]},{"discountname":"PaxDiscountPercent","reservationtype":"INDIVIDUAL","reservationvaluetype":"CHILD","quantity":1,"discounttype":"PERCENT","discountvalue":10,"productfilter":[{"attribute":"channel","value":"API"},{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2B"}]}]},{"conditions":{"starttraveldate":"2020-02-02T23:01:00.000Z","endtraveldate":"2020-03-31T21:59:00.000Z","channels":["API","CALLCENTER","WEB_B2B"],"activities":[{"offercode":"VAP","quantity":1}],"productfilter":[{"attribute":"vendorcode","value":"006460"},{"attribute":"channel","value":"API"},{"attribute":"channel","value":"CALLCENTER"},{"attribute":"channel","value":"WEB_B2B"}]},"behaviours":[{"discountname":"PaxDiscountAmount","discounttype":"FIXED","discountvalue":0,"productfilter":[{"attribute":"vendorcode","value":"006460"}]}]}]}]


              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Offer'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}

  /valorization/valorize:
    post:
      tags:
        - Pricing Service
      summary: valorization/valorize
      description: |
        This service is used to calculate all prices of a basket.
        The service discards all input prices coming within the request and set all known prices inside the basket. If a price hasn’t been found, the service returns an error.
        The input basket is controlled before to be valorized. The checklist is :
        -  existence of at least one basket line
        -  each basket line must have a unique offer identifier, and the offer is published
        -  the requested quantity is a positive value
        -   if a vendor exists and not blocked
        -  Check the validity of the promocode if given

        The service set the price :
        -  for each offer of the basket
        -  for each additionnal services attached to the offers

        If for a basket line, many prices exist due to for example a typology of price (National price, local, advertising price,…), the service applies the business logic to find the good price.

        Once all prices and all checks are OK, the service applies all active promotions on the basket.
        An active promotion, is published promotion such as the period include the submission date of the basket.

        Promotions are divided into :
        -  a list of conditions (minimum of basket amount, a specific product,..)
        -  a list of benefits (discount in percentage, added offer, discount on delivery fees,…)

        If for a given active promotion, the basket satisfies all the conditions, then all the benefits are applied to the basket.
        At the end, the service calculates some hash control to guaranty the prices won’t be altered.
        The hash is stored in the amount node of the basket and each lines.
        If you use Gridbees Booking service, those hash will be recalculated by the booking service.
        The value of the hash in the request will be compared with the value obtained by the booking service.

        The service uses these fields to create the hash :
        - amount.grossamount
        - amount.netamount
        - amount.commissionamount
        - amount.totaltopay
        - amount.totaltorefund
        - amount.discountamount
        - amount.additionalserviceamount
        - amount.additionalassemblyamount
        - amount.additionalrecoveryamount
        - amount.feesdiscountamount
        - amount.discountamount
        - amount.adjustedamount
        - amount.fees
        - ordertracking .vendorcode
        - line.offerid
        - line.quantity
        - line.offerbookingdate
        - line.offerbookinghour

        The service uses the algorithm SHA-256 to generate the hash by adding a secret key.

        <table id="t01">
        <caption>Pricing Error Codes</caption>
        <tr>
        <th>Error Code</th>
        <th>Description</th>
        </tr>
        <tr>
        <td>PROMONOTMARKET</td>
        <td>The promotion code doesn’t exist in the market</td>
        </tr>
        <tr>
        <td>PROMOEXPIRED</td>
        <td>Promotion code expired</td>
        </tr>
        <tr>
        <td>PROMONOTEXISTS</td>
        <td>Promotion code not exists</td>
        </tr>
        <tr>
        <td>PROMONOTPUPLISHED</td>
        <td>Promotion not published</td>
        </tr>
        <tr>
        <td>VOUCHEREXPIRED</td>
        <td>Coupon code is expired</td>
        </tr>
        <tr>
        <td>VOUCHERUSED</td>
        <td>Coupon code is already burned</td>
        </tr>
        <tr>
        <td>OFFERNOTEXIST</td>
        <td>Offer not exists</td>
        </tr>
        <tr>
        <td>PRICENOTFOUND</td>
        <td>Offer exists but the price isn’t found</td>
        </tr>
        <tr>
        <td>PROMOCODENOTSATISFIED</td>
        <td>Promotion code is valid, but not all the conditions are satisfied</td>
        </tr>
        <tr>
        <td>PAYMENTMODECHANGED</td>
        <td>The merchant payment mode has changed </td>
        </tr>
        <tr>
        <td>VENDORNOTEXIST</td>
        <td>Vendor not exists</td>
        </tr>
        <tr>
        <td>VENDORBLOCKED</td>
        <td>Vendor is blocked</td>
        </tr>

        <tr>
        <td>PAYMENTISPENDING</td>
        <td>Payment is pending</td>
        </tr>
        <tr>
        <td>ORDERNOTFOUND</td>
        <td>Order not found for the cancellation</td>
        </tr>
        </table>


      operationId: ValorizationValorize
      requestBody:
        description: Request basket
        content:
          application/json:
            examples:
              tourism :
                description: |
                  Example of pricing, with a promotion triggered. On the PS offer, 15% off on adult and 10% off on Child, if the request comes from the channel CALLCENTER.
                value: {"identifier":{"structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"}},"ordertracking":{"emitterid":"GUI","vendorcode":"200183","orderchannel":"CALLCENTER","bookingid":"8e5e5fdf-5e51-44a1-ac3b-e73433552531"},"comtracking":{"isgift":false,"isquotation":false},"businesscreationdate":"2020-05-09T08:35:49.438Z","lines":[{"linenum":1,"quantity":4,"offerid":"3f06e18a68674348b2098823dbebba6d","linestatus":0,"offerbookingdate":"2020-07-24T22:00:00.000Z","offerbookinghour":"12:00","offerlang":"en","pricing":[{"mdobject":"INDIVIDUAL","code":"ADULT","quantity":3},{"mdobject":"INDIVIDUAL","code":"CHILD","quantity":1}]}]}

              retail :
                description: |
                  Example of pricing call, A promotion is triggered for each basketline with the label = SIN_IVA_ES_19
                value : {"identifier":{"structure":{"blcode":"CONFO","countrycode":"ES","marketcode":"ESPEN","languagecode":"es"}},"ordertracking":{"emitterid":"00001","orderchannel":"WEB"},"deliverydetail":{"deliverynetwork":"A","feenetwork":"D"},"lines":[{"linenum":1,"offerid":"238c27a53ccb40c89ecdb8559a54dbcf","quantity":1,"group":1,"productitems":[{"itemnumid":"376763","productnumid":"376763","productid":"3c409991dd2d47e7a0afb3439fe77992","quantity":1,"vatcode":"02","category":"2415","family":"generico","subfamily":"12","shippingrate":"9","productgroup":"1","segment1":"229","segment2":"2412","customdata":[{"attribute":"labels","value":"SIN_IVA_CANARIAS 2020,JARDIN_15,SIN_IVA_ES_19,SIN_IVA_PT_19,SIN_IVA_PORTUGAL 2020"},{"attribute":"navigation","value":"NAV06543,NAV06596,NAV06545,NAV5231882"}]}],"additionalservices":[{"servicetype":"assembly","code":"assembly_price_1","price":45,"quantity":0,"reference":"830032"}],"taxdetails":[]}]}

              telecom :
                description: |
                  Pricing for a VODSeries subscription offer, annual subscription with monthly payment. If WALLET payment mode, get 10% Off on the basket.
                value: {"identifier":{"structure":{"blcode":"BL1","countrycode":"TH","marketcode":"TH"}},"ordertracking":{"emitterid":"GUI","vendorcode":"ELE","orderchannel":"CALLCENTER"},"lines":[{"linenum":1,"referencecode":"SeriesVOD","offerid":"eceac9012c49404ca67da9c1300bb430","quantity":1,"offerbookingdate":"2020-05-31T22:00:00.000Z","productitems":[{"productcode":"SeriesVOD","quantity":1}],"pricing":[{"mdobject":"YEAR","mdtype":"VALUE","code":"MONTHPERYEAR","value":"1"}],"preferences":{"paymentstartdate":"2020-07-31T22:00:00.000Z","customparam1":"CC","customparam2":"MONTH","customparam3":"YEARPERYEAR"}}],"paymentmodes":[{"paymentmode":"TRUEMONEY","paymentcode":"WALLET"}]}

            schema:
              $ref: '#/components/schemas/BasketRequest'
        required: true
      responses:
        200:
          description:
            You need to check basketdetails.status to know if your request is successful or not.
          content:
            application/json:
              examples:
                tourism :
                  description: |
                    basketrules node informs on the triggered promotions. Amount node embeds all amount information like commission, discount and total to pay by the customer
                  value : {"identifier":{"structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"}},"ordertracking":{"emitterid":"GUI","vendorcode":"200183","orderchannel":"CALLCENTER","bookingid":"8e5e5fdf-5e51-44a1-ac3b-e73433552531"},"comtracking":{"isgift":false,"isquotation":false},"promotionenddate":[{"attribute":"EndDateBasketLine","value":"2020-08-13T21:59:00.000Z"}],"basketrules":[{"linenum":0,"rulename":"PaxDiscountPercent","discountamount":44.65,"priorityrule":{"promotionid":"1a1f19321c1c442ba8b1f94ff4fc2965","promotiontype":"PROMO_BASKET_LEVEL","enddate":"2020-08-13T21:59:00.000Z","combinablepromo":false,"combinablecop":false,"haspromocode":false,"commissiondiscountprice":true,"promotionname":"B2C - PS -10%","isrevertedprice":false}}],"businesscreationdate":"2020-05-09T08:35:49.438Z","amount":{"currency":"EUR","grossamount":322.0,"netamount":249.61,"totaltopay":277.35,"discountamount":44.65,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"commissionamount":27.74,"hashamount":"52c3e29d4e141098ed63d5fb3efb3563f1e72632c7c074f465c0518b15f88c82"},"lines":[{"linenum":1,"offercode":"PS","offerid":"3f06e18a68674348b2098823dbebba6d","linestatus":0,"offerbookingdate":"2020-07-24T22:00:00.000Z","offerbookinghour":"12:00","offerlang":"en","quantity":4,"amount":{"currency":"EUR","grossamount":322.0,"netamount":294.26,"totaltopay":322.0,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"commissionamount":27.74,"commissiondiscountrate":0.1,"hashamount":"4b4194b033121ed4313a9a2abd38d0d7d8df197e7ca1518858760c2465529b37"},"sellingprice":80.5,"pricing":[{"mdobject":"INDIVIDUAL","code":"ADULT","quantity":3,"label":"83.0","price":83.0},{"mdobject":"INDIVIDUAL","code":"CHILD","quantity":1,"label":"73.0","price":73.0}]}],"basketdetails":{"status":"OK"}}
                retail :
                  value : {"identifier":{"structure":{"blcode":"CONFO","countrycode":"ES","languagecode":"es","marketcode":"ESPEN"}},"ordertracking":{"emitterid":"00001","orderchannel":"WEB"},"basketrules":[{"linenum":1,"rulename":"LineDiscountPercent","discountamount":51.91,"priorityrule":{"promotionid":"558f01da98444cc290cb05dfc83bfe32","promotiontype":"PROMO_LINE_LEVEL","enddate":"2020-05-31T22:00:00.000Z","combinablepromo":true,"combinablecop":true,"haspromocode":false,"commissiondiscountprice":false}},{"linenum":0,"rulename":"GlobalFeesAmount","discountamount":20.0},{"linenum":1,"rulename":"LineFeesAmount","discountamount":20.0}],"amount":{"currency":"EUR","grossamount":299.0,"netamount":247.09,"totaltopay":267.09,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"fees":20.0,"hashamount":"b31944d06775c517700902aac6b8c81fe857c313459e142bf8f332a1d8d8474d"},"deliverydetail":{"deliverynetwork":"A","feenetwork":"D"},"lines":[{"linenum":1,"offercode":"0000000000000376763STD00000","offerid":"238c27a53ccb40c89ecdb8559a54dbcf","quantity":1,"amount":{"currency":"EUR","grossamount":299.0,"netamount":247.09,"totaltopay":267.09,"discountamount":51.91,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"fees":20.0,"hashamount":"a103e1e00ccf0568aa5bfbf72a0f9ad5f968a1dca5c1b4b6c141cd4fdb2745e2"},"crossedoutprice":299.0,"sellingprice":299.0,"promotionenddate":[{"attribute":"EndDateBasketLine","value":"2020-05-31T22:00:00.000Z"}],"additionalservices":[{"servicetype":"assembly","code":"assembly_price_1","reference":"830032","price":45.0,"quantity":0}],"taxdetails":[],"productitems":[{"productid":"3c409991dd2d47e7a0afb3439fe77992","productnumid":"376763","itemnumid":"376763","quantity":1,"customdata":[{"attribute":"labels","value":"SIN_IVA_CANARIAS 2020,JARDIN_15,SIN_IVA_ES_19,SIN_IVA_PT_19,SIN_IVA_PORTUGAL 2020"},{"attribute":"navigation","value":"NAV06543,NAV06596,NAV06545,NAV5231882"}],"vatcode":"02","category":"2415","family":"generico","subfamily":"12","productgroup":"1","shippingrate":"9","segment1":"229","segment2":"2412"}]}],"basketdetails":{"status":"OK"}}
                telecom :
                  description: |
                    Pricing for a VODSeries subscription offer, annual subscription with monthly payment. If WALLET payment mode, get 10% Off on the basket.
                  value : {"identifier":{"structure":{"blcode":"BL1","countrycode":"TH","marketcode":"TH"}},"ordertracking":{"emitterid":"GUI","vendorcode":"ELE","orderchannel":"CALLCENTER"},"promotionenddate":[{"attribute":"EndDateBasketLine","value":"2022-11-06T21:44:00.000Z"}],"basketrules":[{"linenum":0,"rulename":"BasketDiscountPercent","discountamount":49.9,"priorityrule":{"promotionid":"41b1b0ef0c04412d9ac8f42dcfb66b8c","promotiontype":"PROMO_BASKET_LEVEL","enddate":"2022-11-06T21:44:00.000Z","combinablepromo":true,"combinablecop":false,"haspromocode":false,"commissiondiscountprice":false,"promotionname":"Promotion on payment mode","isrevertedprice":false}}],"amount":{"currency":"EUR","grossamount":499.0,"netamount":449.1,"totaltopay":449.1,"discountamount":49.9,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"hashamount":"2d1e6ce89999e2f08eebc159a9fbf08694ccd26b1fece7cb56402a8629c9a502"},"paymentmodes":[{"paymentmode":"TRUEMONEY","paymentcode":"WALLET","useincancellationfees":true}],"lines":[{"linenum":1,"referencecode":"SeriesVOD","offerid":"eceac9012c49404ca67da9c1300bb430","offerbookingdate":"2020-05-31T22:00:00.000Z","quantity":1,"amount":{"currency":"EUR","grossamount":499.0,"netamount":499.0,"totaltopay":499.0,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"hashamount":"9c25551d9974059bfb471ba671efd06997c4de9f347a8e9cac27146311bb5534"},"sellingprice":499.0,"productitems":[{"productcode":"SeriesVOD","quantity":1}],"pricing":[{"mdobject":"YEAR","mdtype":"VALUE","code":"MONTHPERYEAR","value":"1","quantity":1,"label":"499.0","price":499.0}],"preferences":{"paymentstartdate":"2020-07-31T22:00:00.000Z","customparam1":"CC","customparam2":"MONTH","customparam3":"YEARPERYEAR"}}],"basketdetails":{"status":"OK"}}
              schema:
                $ref: '#/components/schemas/BasketResponse'
        401:
          description: The resource requires authentication, which was not supplied
            with the request
          content: {}
      x-codegen-request-body-name: request

  /valorization/cancellation:
    post:
      tags:
        - Pricing Service
      summary: /valorization/cancellation
      description: |
        To cancel an order, some cancellation fees could be calculated in order to refund the customer the amount minus the calculated fees.

        The cancellation service is used to calculate all fees. This process is based on the terms of sales. We use notification object to manage terms of sales.

      operationId: ValorizationCancellation
      requestBody:
        description: Cancellation Request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancellationRequest'
        required: true

      responses:
        200:
          description: Cancellation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancellationValorizationResponse'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /booking/availabilities:
    post:
      tags:
        - Booking Service
      summary: /booking/availabilities
      description: |
        This service is used to refresh the theoretical stocks of the suppier for a given period

      operationId: BookingAvailabilities
      requestBody:
        description:
          The period is defined by a stardate and an endate parameters. You an refine the request for a given list of offercode.
        content:
          application/json:
            examples:
              tourism :
                value : {"startdate":"2020-04-01T22:00:00.000Z","enddate":"2020-04-03T21:59:59.000Z"}
              retail :
                value: {}

            schema:
              $ref: '#/components/schemas/AvailabilitiesRequest'
        required: true

      responses:
        200:
          description: Availabilities response
          content:
            application/json:
              examples:
                tourism :
                  value : {"startdate":"2020-04-01T22:00:00.000Z","enddate":"2020-04-03T21:59:59.000Z","availabilitylines":[{"offerid":"1f3d07b1647144ce999d5b0ab31ee385","offercode":"TDS1","date":"2020-04-02T00:00:00.000+02:00","hour":"09:00","totalquantity":10},{"offerid":"71825be3a4d74cfe8d679d26c98980a8","offercode":"VTP8","date":"2020-04-02T00:00:00.000+02:00","hour":"08:00","lang":"en","totalquantity":10},{"offerid":"71825be3a4d74cfe8d679d26c98980a8","offercode":"VTP8","date":"2020-04-02T00:00:00.000+02:00","hour":"08:00","lang":"fr","totalquantity":10}]}
                retail :
                  value: {"availabilitylines":[{"offerid":"1f3d07b1647144ce999d5b0ab31ee385","offercode":"369854","resupplyingdelay":14, "totalquantity":10},{"offerid":"71825be3a4d74cfe8d679d26c98980a8","offercode":"569874","totalquantity":10,"resupplyingdelay":5},{"offerid":"71825be3a4d74cfe8d679d26c98980a8","offercode":"3695236","totalquantity":10,"resupplyingdelay":0}]}
              schema:
                $ref: '#/components/schemas/AvailabilitiesResponse'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /booking/availability:
    post:
      tags:
        - Booking Service
      summary: /booking/availability
      description: |
        This method is used to know the actual quantity of a given offer with refined detail in the call such as the travel date.

      operationId: BookingAvailability
      requestBody:
        content:
          application/json:
            examples :
              retail :
                value : {"availability":{"origine":"WEB_B2C","availabilityline":[{"quantity":5,"product":{"code":"351135"}},{"quantity":3,"product":{"code":"965863"}}]},"availabilitycontext":{"shop":{"structure":{"shopcode":"649"},"typology":"SHOP"}}}
              tourism :
                value : {"availability":{"availabilityline":[{"lang":"en","date":"2020-06-14T22:00:00.000Z","quantity":1,"quantitydetails":[{"code":"ADULT","quantity":1,"value":"1","mdobject":"INDIVIDUAL"}],"totalquantity":1,"vendorcode":"412703","offercode":"C","hour":"10:00","offerid":"4a89e05d36874d19b6cedf8a190f9d52"}],"identifier":{"structure":{"countrycode":"FR","blcode":"B2T","marketcode":"FR"}}},"availabilitycontext":{"status":"OK","useexternalsuppliers":false}}
            schema:
              $ref: '#/components/schemas/AvailabilityRequest'
        required: true

      responses:
        200:
          description: Availability response
          content:
            application/json:
              examples:
                tourism :
                  value : {"availability":{"availabilityline":[{"offerid":"1f3d07b1647144ce999d5b0ab31ee385","date":"2020-04-02T00:00:00.000Z","hour":"09:00","quantity":7,"lang":"en","quantitydetails":[{"mdobject":"INDIVIDUAL","code":"ADULT","value":"4"},{"mdobject":"INDIVIDUAL","code":"CHILD","value":"3"},{"mdobject":"INDIVIDUAL","code":"INFANT","value":"0"}]}]}}
                retail :
                  value: {"availability":{"origine":"F","site":"649","isactual":true,"availabilityline":[{"quantity":1,"product":{"code":"351135","unitpricesell":79.9900,"currency":"EUR","canbeordered":false},"totalquantity":15,"exposedquantity":0}],"createdate":"2020-05-11T14:38:41.292Z"},"availabilitycontext":{"shop":{"structure":{"shopcode":"649"},"typology":"SHOP"}}}

              schema:
                $ref: '#/components/schemas/AvailabilityResponse'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /booking/request:
    post:
      tags:
        - Booking Service
      summary: /booking/request
      description: |
        This method is used to reserve some offers. This action will block the stock of the requested quantity for each offer.
        Most of the time, this request is done to guaranty to the client the reservation is blocked for a duration (configuration parameter).

        During this duration, the merchant application will have time to process the payment of the reservation.

        All amount information comes from a [pricing service](#operation/ValorizationValorize).
        If you use the Gridbees price valorization service, the list of data coming for this valorization service are:
        -  All Amount nodes
        -  Marketing information such as promotion code,
        -  List of all rules applied to the orders
        - Hash control data to guaranty the quality of the data

        Once the payment has been made, the reservation must be confirmed, otherwise the system will un the reservation after the duration and unblock the stoks.

        The service applies some operations such as:
        -  If a vendor is filled, some controls on the vendor conditions
        -  All mandatory fields are present including passenger’s information
        -  Calculation on hash amounts to guaranty the non-alteration

        The service returns :
        - in case of success (ordercontext.status = OK),  the order reference (ordertracking.transactionnumber) of the reservation
        - otherwise (ordercontext.status = KO), the business error code (ordercontext.code)

        <table id="t01">
        <caption>Booking Error Codes</caption>
        <tr>
        <th>Error Code</th>
        <th>Description</th>
        </tr>
        <tr>
        <td>HASH_CONTROL_ERROR</td>
        <td>Hash control failed. Check the fields coming from Pricing service to fill in your request</td>
        </tr>
        <tr>
        <td>VENDORNOTEXISTORBLOCKED</td>
        <td>Merchant code not found or blocked</td>
        </tr>
        <tr>
        <td>ORDERNOTFOUND</td>
        <td>Order not found</td>
        </tr>
        <tr>
        <td>MAX_PAID_NOT_ALLOWED</td>
        <td>Total paid is not allowed for this payment mode</td>
        </tr>
        <tr>
        <td>NOTIFICATIONNOTFOUND</td>
        <td>The terms of sales in the request have not been found</td>
        </tr>
        <tr>
        <td>OFFERNOTEXIST</td>
        <td>Offer not exists</td>
        </tr>
        <tr>
        <td>BOOKINGALREADYCONFIRMED</td>
        <td>this booking is already confirmed</td>
        </tr>
        <tr>
        <td>BOOKINGNOTFOUND</td>
        <td>Booking not found</td>
        </tr>
        <tr>
        <td>BOOKINGCANCELFAILED</td>
        <td>Failed to release the stock for this booking</td>
        </tr>
        <tr>
        <td>ERROR_CANCELLED</td>
        <td>Order not paid or already cancelled</td>
        </tr>
        <tr>
        <td>NOTIFICATIONRETENTIONDELAYEXPIRED</td>
        <td>For cancellation request, if the delay to cancel is expired, this error code is sent</td>
        </tr>
        </table>

        <table id="t01">
        <caption>Order status</caption>
        <tr>
        <th>Status Type</th>
        <th>Status Code</th>
        <th>Description</th>
        </tr>
        <tr>
        <td>Operational</td>
        <td>PENDING</td>
        <td>The order is not confirmed and is waiting for the confirmation. The stock isn’t blocked for a pending order.</td>
        </tr>
        <tr>
        <td>Operational</td>
         <td>PROCESSED</td>
         <td>The order is confirmed. The stocks are reserved.</td>
        </tr>
        <tr>
        <td>Operational</td>
         <td>CANCELLED</td>
         <td>The order is cancelledand the stocks are released</td>
        </tr>
        <tr>
        <td>Payment</td>
         <td>PENDING</td>
         <td>The payment of this order isn’t completed</td>
        </tr>
        <tr>
        <td>Payment</td>
         <td>PAID</td>
         <td>The payment of the order is completed</td>
        </tr>
        <tr>
        <tr>
        <td>Payment</td>
         <td>CANCELLED</td>
         <td>The payment is cancelled</td>
        </tr>
        <tr>
        <td>Refund</td>
         <td>PENDING</td>
         <td>Refund is pending</td>
        </tr>
        <tr>
        <td>Refund</td>
         <td>REFUSED</td>
         <td>Reund is efused</td>
        </tr>
        <tr>
        <td>Refund</td>
         <td>CANCELLED</td>
         <td>The payment is cancelled</td>
        </tr>
        <tr>
        <td>Refund</td>
         <td>PAID</td>
         <td>Refuns is paid</td>
        </tr>
        <tr>
        <td>FILTERING</td>
         <td>TOREPROCESS</td>
         <td>Technical error. The order must be reprocessed</td>
        </tr>
        </table>


      operationId: BookingRequest
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequest'
            examples:
              telecom :
                value : {"order":{"identifier":{"contactid":"bd6e2121b2e047a3b73d1149011119c1","structure":{"blcode":"BL1","countrycode":"TH","marketcode":"TH"}},"ordertracking":{"emitterid":"WEBSITE","vendorcode":"0945692","orderchannel":"B2B","user":"demotelecom"},"comtracking":{"isgift":false,"isquotation":false},"amount":{"currency":"EUR","grossamount":360,"netamount":360,"totaltopay":360,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"commissionamount":0,"hashamount":"edc9898e2d6c2561b5fe513a49e75cfaa2a2b301a165b190b5624d5c40293c97"},"billingaddress":{"usage":"BIL","isnormalized":false,"isactive":true},"payment":{"paymentdate":"2020-05-07T13:33:58.312Z"},"lines":[{"linenum":1,"referencecode":"SeriesLive","offerid":"e5b1d862aa6c4c03896bd29bfdfb9f91","quantity":1,"amount":{"currency":"EUR","grossamount":180,"netamount":180,"totaltopay":180,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"hashamount":"ca718d540cabc36618ed34a9d8ee6b17c0ba90fe0404ef5ac759821690208423"},"sellingprice":180,"productitems":[{"productcode":"SeriesLive","quantity":1,"itemnumid":"SeriesLive"}],"preferences":{"customparam1":"CC","customparam2":"MONTH","customparam3":"YEARPERYEAR"}}]},"ordercontext":{"externalbookingid":"5ef15563-9653-45da-bae8-267ac465b6d9"}}
              tourism :
                value : {"order":{"amount":{"totaltopay":101.15,"netamount":101.15,"currency":"EUR","hashamount":"3a7067978472cafa4f4919fc23918c906bc55ca9baf3676b199b9d9ee3c54508","grossamount":119},"lines":[{"referencecode":"VGAM","offerid":"94464cd590654300ad1b132be594b4a6","amount":{"totaltopay":101.15,"netamount":101.15,"commissiondiscountrate":0.15,"currency":"EUR","hashamount":"89b8c17f1628c93e29881b24cc8c6f29d384cff2603cc9c65aae6afab631b1df","commissionamount":17.85,"grossamount":119},"pricing":[{"quantity":1,"code":"ADULT","label":"119.0","value":"1","mdobject":"INDIVIDUAL","price":119}],"quantity":1,"bookinglang":"en","bookingdate":"2020-03-27T23:00:00.000Z","linenum":1,"sellingprice":119}],"ordertracking":{"vendorcode":"009327","emitterid":"API_B2B","orderchannel":"API","user":"apixml","externaltransactionnumber":"105WS2344443"},"identifier":{"structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"},"contactid":"735893e056574fa4ac912c7b608d9de8"},"billingaddress":{"countrycode":"FR","usage":"BIL","name":{"persontype":"ADULT","languagecode":"en","lastname":"BROSKTES","civility":"M","firstname":"Leon"}},"deliverydetail":{"email":{"isprincipal":true,"emailvalue":"s.lavenant@pariscityvision.com","usage":"BIL"},"customdata":[{"attribute":"pickuphour","value":"2020-03-27T23:00:00.000Z"},{"attribute":"dropoffhour","value":"2020-03-28T03:00:00.000Z"}],"passengers":[{"languagecode":"en","lastname":"BROSKTES","civility":"M","firstname":"Leon","persontype":"ADULT"}],"instruction":[{"attribute":"CLIENT","value":"vegetarian foods"}]}},"ordercontext":{"externalbookingid":"068b126cb4df4ba589c500bea6d6f73c"}}
              retail :
                value : {"order":{"identifier":{"contactid":"b6e8fb8c6cc6430f854eaa64e17305dc","legalentityid":"LegalEntity1","structure":{"blcode":"B2T","countrycode":"ES","languagecode":"es","marketcode":"CANARIES"}},"ordertracking":{"emitterid":"00001","orderchannel":"W","site":"007","bookingid":"f31UW9KGekcJ"},"orderrules":[{"linenum":0,"rulename":"GlobalFeesAmount","discountamount":19.0},{"linenum":1,"rulename":"LineFeesAmount","discountamount":19.0}],"amount":{"currency":"EUR","grossamount":329.0,"netamount":329.0,"discountamount":0.0,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"feesdiscountamount":0.0,"fees":0.0},"billingaddress":{"usage":"BIL","actioncode":0,"isnormalized":false,"isactive":true,"streetnumber":"","streetname":"Calle 56, piso 8","city":"Poligon","postalcode":"36918","province":"Palmas De Gran Canaria, Las","countrycode":"ES","name":{"civility":"MRS","lastname":"B2T","firstname":"Gridbees","identitydocuments":[{"usage":"NIF","numid":"00000999"}]}},"deliverydetail":{"deliverymode":"PICKUP","deliverynetwork":"SHOP","pickupshop":"007","deliveryshop":"563","email":{"usage":"BIL","isprincipal":true,"emailvalue":"gridbees@gmail.com"}},"businesscreationdate":"2020-05-11T15:24:08.148Z","lines":[{"linenum":1,"referencecode":"ESESCAN000000396791PUB00690","deliverycode":"0","processingmode":"SYNCH","offerid":"e7743586ff8d480bbc5f003003c875d5","quantity":1,"amount":{"currency":"EUR","grossamount":329.0,"netamount":329.0,"discountamount":750.0,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"feesdiscountamount":0.0,"fees":0.0,"vatrates":[]},"crossedoutprice":1079.0,"sellingprice":329.0,"additionalservices":[],"productitems":[{"productid":"a350b63dc6c84a66a1ca0fa98aedcf39","itemnumid":"396791","quantity":1,"promisedavailability":"2020-06-02","vatcode":"02","vatrate":0.0,"category":"42","family":"medias","subfamily":"7","productgroup":"1","shippingrate":"1"}]}]},"bookingcontext":{"shop":{"structure":{"shopcode":"007"},"typology":"Warehouse"},"bookid":"f31UW9KGekcJ","contactid":"b6e8fb8c6cc6430f854eaa64e17385dc"}}
        required: true
      responses:
        200:
          description: Reservation response
          content:
            application/json:
              examples :
                retail :
                  value : {"order":{"order":{"orderid":"c33c2fb801234f21bdc8df28636ed43d","identifier":{"contactid":"b6e8fb8c6cc6430f854eaa64e17305dc","legalentityid":"LegalEntity1","structure":{"blcode":"B2T","countrycode":"ES","languagecode":"es","marketcode":"CANARIES"}},"ordertracking":{"emitterid":"00001","orderchannel":"W","site":"007","bookingid":"f31UW9KGekcJ"},"orderrules":[{"linenum":0,"rulename":"GlobalFeesAmount","discountamount":19},{"linenum":1,"rulename":"LineFeesAmount","discountamount":19}],"amount":{"currency":"EUR","grossamount":329,"netamount":329,"discountamount":0,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"feesdiscountamount":0,"fees":0},"billingaddress":{"usage":"BIL","actioncode":0,"isnormalized":false,"isactive":true,"streetnumber":"","streetname":"Calle 56, piso 8","city":"Poligon","postalcode":"36918","province":"Palmas De Gran Canaria, Las","countrycode":"ES","name":{"civility":"MRS","lastname":"B2T","firstname":"Gridbees","identitydocuments":[{"usage":"NIF","numid":"00000999"}]}},"deliverydetail":{"deliverymode":"PICKUP","deliverynetwork":"SHOP","pickupshop":"007","deliveryshop":"563","email":{"usage":"BIL","isprincipal":true,"emailvalue":"gridbees@gmail.com"}},"businesscreationdate":"2020-05-11T15:24:08.148Z","statusdetail":{"order":[{"statustype":"Operational","code":"PENDING","date":"2020-05-11T15:24:08.511Z"},{"statustype":"PAYMENT","code":"PENDING","date":"2020-05-11T15:24:08.511Z"}],"latest":[{"statustype":"Operational","code":"PENDING","date":"2020-05-11T15:24:08.511Z"},{"statustype":"PAYMENT","code":"PENDING","date":"2020-05-11T15:24:08.511Z"}]},"lines":[{"linenum":1,"referencecode":"ESESCAN000000396791PUB00690","deliverycode":"0","processingmode":"SYNCH","offerid":"e7743586ff8d480bbc5f003003c875d5","quantity":1,"amount":{"currency":"EUR","grossamount":329,"netamount":329,"discountamount":750,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"feesdiscountamount":0,"fees":0,"vatrates":[]},"crossedoutprice":1079,"sellingprice":329,"additionalservices":[],"productitems":[{"productid":"a350b63dc6c84a66a1ca0fa98aedcf39","itemnumid":"396791","quantity":1,"promisedavailability":"2020-06-02","vatcode":"02","vatrate":0,"category":"42","family":"medias","subfamily":"7","productgroup":"1","shippingrate":"1"}]}]},"ordercontext":{"status":"OK", "shop":{"structure":{"shopcode":"007"},"typology":"Warehouse"},"bookid":"f31UW9KGekcJ","contactid":"b6e8fb8c6cc6430f854eaa64e17385dc"}}}
                tourism :
                  value : {"order":{"orderid":"17f3e8007a4340f5bc428a3654e6aa35","amount":{"totaltopay":101.15,"netamount":101.15,"currency":"EUR","hashamount":"3a7067978472cafa4f4919fc23918c906bc55ca9baf3676b199b9d9ee3c54508","grossamount":119},"lines":[{"referencecode":"VGAM","offerid":"94464cd590654300ad1b132be594b4a6","amount":{"totaltopay":101.15,"netamount":101.15,"commissiondiscountrate":0.15,"currency":"EUR","hashamount":"89b8c17f1628c93e29881b24cc8c6f29d384cff2603cc9c65aae6afab631b1df","commissionamount":17.85,"grossamount":119},"pricing":[{"quantity":1,"code":"ADULT","label":"119.0","value":"1","mdobject":"INDIVIDUAL","price":119}],"quantity":1,"bookinglang":"en","bookingdate":"2020-03-27T23:00:00.000Z","linenum":1,"sellingprice":119}],"ordertracking":{"vendorcode":"009327","emitterid":"API_B2B","orderchannel":"API","user":"apixml","transactionnumber":"ATEIE000000611","externaltransactionnumber":"105WS2344443"},"identifier":{"structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"},"contactid":"735893e056574fa4ac912c7b608d9de8"},"billingaddress":{"countrycode":"FR","usage":"BIL","name":{"persontype":"ADULT","languagecode":"en","lastname":"BROSKTES","civility":"M","firstname":"Leon"}},"deliverydetail":{"email":{"isprincipal":true,"emailvalue":"s.lavenant@pariscityvision.com","usage":"BIL"},"customdata":[{"attribute":"pickuphour","value":"2020-03-27T23:00:00.000Z"},{"attribute":"dropoffhour","value":"2020-03-28T03:00:00.000Z"}],"passengers":[{"languagecode":"en","lastname":"BROSKTES","civility":"M","firstname":"Leon","persontype":"ADULT"}],"instruction":[{"attribute":"CLIENT","value":"vegetarian foods"}]}},"ordercontext":{"externalbookingid":"068b126cb4df4ba589c500bea6d6f73c","status":"OK"}}
                telecom :
                  value : {"order":{"orderid":"47574c93a4c342f9803717a09f757cc2","identifier":{"contactid":"bd6e2121b2e047a3b73d1149011119c1","structure":{"blcode":"BL1","countrycode":"TH","marketcode":"TH"}},"ordertracking":{"emitterid":"WEBSITE","vendorcode":"0945692","orderchannel":"B2B","user":"demotelecom","transactionnumber":"SANLC000000571"},"comtracking":{"isgift":false,"isquotation":false},"amount":{"currency":"EUR","grossamount":360,"netamount":360,"totaltopay":360,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"commissionamount":0,"hashamount":"edc9898e2d6c2561b5fe513a49e75cfaa2a2b301a165b190b5624d5c40293c97"},"billingaddress":{"usage":"BIL","isnormalized":false,"isactive":true},"payment":{"isprepaid":false,"totalpaid":85,"details":[{"paymentmode":"BILLING","isprepaid":false,"totalpaid":85}]},"statusdetail":{"order":[{"statustype":"Operational","code":"CANCELLED","date":"2018-07-13T09:48:01.815+0000"},{"statustype":"Operational","code":"PROCESSED","date":"2018-07-11T11:38:15.173+0000"},{"statustype":"PAYMENT","code":"PAID","date":"2018-07-11T11:38:15.173+0000"}],"latest":[{"statustype":"Operational","code":"CANCELLED","date":"2018-07-13T09:48:01.815+0000"},{"statustype":"PAYMENT","code":"PAID","date":"2018-07-11T11:38:15.173+0000"}]},"lines":[{"linenum":1,"referencecode":"SeriesLive","offerid":"e5b1d862aa6c4c03896bd29bfdfb9f91","quantity":1,"amount":{"currency":"EUR","grossamount":180,"netamount":180,"totaltopay":180,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"hashamount":"ca718d540cabc36618ed34a9d8ee6b17c0ba90fe0404ef5ac759821690208423"},"sellingprice":180,"productitems":[{"productcode":"SeriesLive","quantity":1,"itemnumid":"SeriesLive"}],"preferences":{"customparam1":"CC","customparam2":"MONTH","customparam3":"YEARPERYEAR"}}]},"ordercontext":{"externalbookingid":"5ef15563-9653-45da-bae8-267ac465b6d9","status":"OK"}}
              schema:
                $ref: '#/components/schemas/OrderResponse'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /booking/confirm:
    post:
      tags:
        - Booking Service
      summary: /booking/confirm
      description: |
        This method is used to confirm the reservation done by a call to the booking/request service. This action will permanently block the stock of the requested quantity for each tour.
        The request is the same than the booking request call, but complete by payment information.
        The ticketing system generated the tickets per passenger or for the global booking.
        The service applies some operations such as:
        -  The existence of the reservation in Gridbees database (search based on the ordered field) and make some coherence controls.
        -  Overdue payment or not balanced payment
        -  Burns “one shot used” promotional vouchers if set
        -  Sends email to the customer in some conditions (deferred promotion detected, email template detected, ...)
        -  Creates the tickets for the tours
        -  Stores and controls the different payment modes having served to pay the order


      operationId: BookingConfirm
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderConfirm'
        required: true

      responses:
        200:
          description: Booking Confirmation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /booking/cancellation:
    post:
      tags:
        - Booking Service
      summary: /booking/cancellation
      description: |
        This service is used to cancel an order and to release the stock.
        An order can be cancelled if it has been already paid or not already cancelled.
        The service searches for the order and calculates the cancellation fees according to the terms of sales.

      operationId: BookingCancellation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancellationRequest'
        required: true
      responses:
        200:
          description: Booking Cancellation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancellationBookingResponse'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /booking/update:
    post:
      tags:
        - Booking Service
      summary: /booking/update
      description: |
        This method is used to updat an existing pending or confirmed order. Depending of the configuration, some changes are considered major and others minor. The list of major fields must be set during the configuration of a new client.
        For an input request, if there are major changes :
        - The order is reavaluated by the pricing service to check the new balance
        - The stock availability of the original order is released if the availability of the new order is confirmed.
        - The original order is replaced by the new order

        This service doesn't merge data from the original order with the new order. So you need to fill all necessary fields in the new order.

        If the original oder was already confirmed and paid, the requested changes may generate some cancellation fees depending of the cancellation terms.

      operationId: BookingUpdate
      requestBody:
        content:
          application/json:
            examples:
              telecom :
                value : {"order":{ "orderid": "6a768ded47334925a9f67a4721273884", "identifier":{"contactid":"bd6e2121b2e047a3b73d1149011119c1","structure":{"blcode":"BL1","countrycode":"TH","marketcode":"TH"}},"ordertracking":{"emitterid":"WEBSITE","vendorcode":"0945692","orderchannel":"B2B","user":"demotelecom"},"comtracking":{"isgift":false,"isquotation":false},"amount":{"currency":"EUR","grossamount":360,"netamount":360,"totaltopay":360,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"commissionamount":0,"hashamount":"edc9898e2d6c2561b5fe513a49e75cfaa2a2b301a165b190b5624d5c40293c97"},"billingaddress":{"usage":"BIL","isnormalized":false,"isactive":true},"payment":{"paymentdate":"2020-05-07T13:33:58.312Z"},"lines":[{"linenum":1,"referencecode":"SeriesLive","offerid":"e5b1d862aa6c4c03896bd29bfdfb9f91","quantity":1,"amount":{"currency":"EUR","grossamount":180,"netamount":180,"totaltopay":180,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"hashamount":"ca718d540cabc36618ed34a9d8ee6b17c0ba90fe0404ef5ac759821690208423"},"sellingprice":180,"productitems":[{"productcode":"SeriesLive","quantity":1,"itemnumid":"SeriesLive"}],"preferences":{"customparam1":"CC","customparam2":"MONTH","customparam3":"YEARPERYEAR"}}]},"ordercontext":{"externalbookingid":"5ef15563-9653-45da-bae8-267ac465b6d9"}}
              tourism :
                value : {"order":{ "orderid" : "6a768ded47334925a9f67a4721273884", "amount":{"totaltopay":101.15,"netamount":101.15,"currency":"EUR","hashamount":"3a7067978472cafa4f4919fc23918c906bc55ca9baf3676b199b9d9ee3c54508","grossamount":119},"lines":[{"referencecode":"VGAM","offerid":"94464cd590654300ad1b132be594b4a6","amount":{"totaltopay":101.15,"netamount":101.15,"commissiondiscountrate":0.15,"currency":"EUR","hashamount":"89b8c17f1628c93e29881b24cc8c6f29d384cff2603cc9c65aae6afab631b1df","commissionamount":17.85,"grossamount":119},"pricing":[{"quantity":1,"code":"ADULT","label":"119.0","value":"1","mdobject":"INDIVIDUAL","price":119}],"quantity":1,"bookinglang":"en","bookingdate":"2020-03-27T23:00:00.000Z","linenum":1,"sellingprice":119}],"ordertracking":{"vendorcode":"009327","emitterid":"API_B2B","orderchannel":"API","user":"apixml","externaltransactionnumber":"105WS2344443"},"identifier":{"structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"},"contactid":"735893e056574fa4ac912c7b608d9de8"},"billingaddress":{"countrycode":"FR","usage":"BIL","name":{"persontype":"ADULT","languagecode":"en","lastname":"BROSKTES","civility":"M","firstname":"Leon"}},"deliverydetail":{"email":{"isprincipal":true,"emailvalue":"s.lavenant@pariscityvision.com","usage":"BIL"},"customdata":[{"attribute":"pickuphour","value":"2020-03-27T23:00:00.000Z"},{"attribute":"dropoffhour","value":"2020-03-28T03:00:00.000Z"}],"passengers":[{"languagecode":"en","lastname":"BROSKTES","civility":"M","firstname":"Leon","persontype":"ADULT"}],"instruction":[{"attribute":"CLIENT","value":"vegetarian foods"}]}},"ordercontext":{"externalbookingid":"068b126cb4df4ba589c500bea6d6f73c"}}
              retail :
                value : {"order":{ "orderid" : "6a768ded47334925a9f67a4721273884", "identifier":{"contactid":"b6e8fb8c6cc6430f854eaa64e17305dc","legalentityid":"LegalEntity1","structure":{"blcode":"B2T","countrycode":"ES","languagecode":"es","marketcode":"CANARIES"}},"ordertracking":{"emitterid":"00001","orderchannel":"W","site":"007","bookingid":"f31UW9KGekcJ"},"orderrules":[{"linenum":0,"rulename":"GlobalFeesAmount","discountamount":19.0},{"linenum":1,"rulename":"LineFeesAmount","discountamount":19.0}],"amount":{"currency":"EUR","grossamount":329.0,"netamount":329.0,"discountamount":0.0,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"feesdiscountamount":0.0,"fees":0.0},"billingaddress":{"usage":"BIL","actioncode":0,"isnormalized":false,"isactive":true,"streetnumber":"","streetname":"Calle 56, piso 8","city":"Poligon","postalcode":"36918","province":"Palmas De Gran Canaria, Las","countrycode":"ES","name":{"civility":"MRS","lastname":"B2T","firstname":"Gridbees","identitydocuments":[{"usage":"NIF","numid":"00000999"}]}},"deliverydetail":{"deliverymode":"PICKUP","deliverynetwork":"SHOP","pickupshop":"007","deliveryshop":"563","email":{"usage":"BIL","isprincipal":true,"emailvalue":"gridbees@gmail.com"}},"businesscreationdate":"2020-05-11T15:24:08.148Z","lines":[{"linenum":1,"referencecode":"ESESCAN000000396791PUB00690","deliverycode":"0","processingmode":"SYNCH","offerid":"e7743586ff8d480bbc5f003003c875d5","quantity":1,"amount":{"currency":"EUR","grossamount":329.0,"netamount":329.0,"discountamount":750.0,"additionalserviceamount":0.0,"additionalassemblyamount":0.0,"additionalrecoveryamount":0.0,"feesdiscountamount":0.0,"fees":0.0,"vatrates":[]},"crossedoutprice":1079.0,"sellingprice":329.0,"additionalservices":[],"productitems":[{"productid":"a350b63dc6c84a66a1ca0fa98aedcf39","itemnumid":"396791","quantity":1,"promisedavailability":"2020-06-02","vatcode":"02","vatrate":0.0,"category":"42","family":"medias","subfamily":"7","productgroup":"1","shippingrate":"1"}]}]},"ordercontext":{"shop":{"structure":{"shopcode":"007"},"typology":"Warehouse"},"bookid":"f31UW9KGekcJ","contactid":"b6e8fb8c6cc6430f854eaa64e17385dc"}}
            schema:
              $ref: '#/components/schemas/OrderUpdateRequest'
        required: true

      responses:
        200:
          description: Booking Confirmation response
          content:
            application/json:
              examples :
                retail :
                  value : {"order":{"order":{"orderid":"c33c2fb801234f21bdc8df28636ed43d","identifier":{"contactid":"b6e8fb8c6cc6430f854eaa64e17305dc","legalentityid":"LegalEntity1","structure":{"blcode":"B2T","countrycode":"ES","languagecode":"es","marketcode":"CANARIES"}},"ordertracking":{"emitterid":"00001","orderchannel":"W","site":"007","bookingid":"f31UW9KGekcJ"},"orderrules":[{"linenum":0,"rulename":"GlobalFeesAmount","discountamount":19},{"linenum":1,"rulename":"LineFeesAmount","discountamount":19}],"amount":{"currency":"EUR","grossamount":329,"netamount":329,"discountamount":0,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"feesdiscountamount":0,"fees":0},"billingaddress":{"usage":"BIL","actioncode":0,"isnormalized":false,"isactive":true,"streetnumber":"","streetname":"Calle 56, piso 8","city":"Poligon","postalcode":"36918","province":"Palmas De Gran Canaria, Las","countrycode":"ES","name":{"civility":"MRS","lastname":"B2T","firstname":"Gridbees","identitydocuments":[{"usage":"NIF","numid":"00000999"}]}},"deliverydetail":{"deliverymode":"PICKUP","deliverynetwork":"SHOP","pickupshop":"007","deliveryshop":"563","email":{"usage":"BIL","isprincipal":true,"emailvalue":"gridbees@gmail.com"}},"businesscreationdate":"2020-05-11T15:24:08.148Z","statusdetail":{"order":[{"statustype":"Operational","code":"PENDING","date":"2020-05-11T15:24:08.511Z"},{"statustype":"PAYMENT","code":"PENDING","date":"2020-05-11T15:24:08.511Z"}],"latest":[{"statustype":"Operational","code":"PENDING","date":"2020-05-11T15:24:08.511Z"},{"statustype":"PAYMENT","code":"PENDING","date":"2020-05-11T15:24:08.511Z"}]},"lines":[{"linenum":1,"referencecode":"ESESCAN000000396791PUB00690","deliverycode":"0","processingmode":"SYNCH","offerid":"e7743586ff8d480bbc5f003003c875d5","quantity":1,"amount":{"currency":"EUR","grossamount":329,"netamount":329,"discountamount":750,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"feesdiscountamount":0,"fees":0,"vatrates":[]},"crossedoutprice":1079,"sellingprice":329,"additionalservices":[],"productitems":[{"productid":"a350b63dc6c84a66a1ca0fa98aedcf39","itemnumid":"396791","quantity":1,"promisedavailability":"2020-06-02","vatcode":"02","vatrate":0,"category":"42","family":"medias","subfamily":"7","productgroup":"1","shippingrate":"1"}]}]},"ordercontext":{"status": "OK", "shop":{"structure":{"shopcode":"007"},"typology":"Warehouse"},"bookid":"f31UW9KGekcJ","contactid":"b6e8fb8c6cc6430f854eaa64e17385dc"}}}
                tourism :
                  value : {"order":{"orderid":"17f3e8007a4340f5bc428a3654e6aa35","amount":{"totaltopay":101.15,"netamount":101.15,"currency":"EUR","hashamount":"3a7067978472cafa4f4919fc23918c906bc55ca9baf3676b199b9d9ee3c54508","grossamount":119},"lines":[{"referencecode":"VGAM","offerid":"94464cd590654300ad1b132be594b4a6","amount":{"totaltopay":101.15,"netamount":101.15,"commissiondiscountrate":0.15,"currency":"EUR","hashamount":"89b8c17f1628c93e29881b24cc8c6f29d384cff2603cc9c65aae6afab631b1df","commissionamount":17.85,"grossamount":119},"pricing":[{"quantity":1,"code":"ADULT","label":"119.0","value":"1","mdobject":"INDIVIDUAL","price":119}],"quantity":1,"bookinglang":"en","bookingdate":"2020-03-27T23:00:00.000Z","linenum":1,"sellingprice":119}],"ordertracking":{"vendorcode":"009327","emitterid":"API_B2B","orderchannel":"API","user":"apixml","transactionnumber":"ATEIE000000611","externaltransactionnumber":"105WS2344443"},"identifier":{"structure":{"blcode":"PCV","countrycode":"FR","marketcode":"FR"},"contactid":"735893e056574fa4ac912c7b608d9de8"},"billingaddress":{"countrycode":"FR","usage":"BIL","name":{"persontype":"ADULT","languagecode":"en","lastname":"BROSKTES","civility":"M","firstname":"Leon"}},"deliverydetail":{"email":{"isprincipal":true,"emailvalue":"s.lavenant@pariscityvision.com","usage":"BIL"},"customdata":[{"attribute":"pickuphour","value":"2020-03-27T23:00:00.000Z"},{"attribute":"dropoffhour","value":"2020-03-28T03:00:00.000Z"}],"passengers":[{"languagecode":"en","lastname":"BROSKTES","civility":"M","firstname":"Leon","persontype":"ADULT"}],"instruction":[{"attribute":"CLIENT","value":"vegetarian foods"}]}},"ordercontext":{"externalbookingid":"068b126cb4df4ba589c500bea6d6f73c","status":"OK"}}
                telecom :
                  value : {"order":{"orderid":"47574c93a4c342f9803717a09f757cc2","identifier":{"contactid":"bd6e2121b2e047a3b73d1149011119c1","structure":{"blcode":"BL1","countrycode":"TH","marketcode":"TH"}},"ordertracking":{"emitterid":"WEBSITE","vendorcode":"0945692","orderchannel":"B2B","user":"demotelecom","transactionnumber":"SANLC000000571"},"comtracking":{"isgift":false,"isquotation":false},"amount":{"currency":"EUR","grossamount":360,"netamount":360,"totaltopay":360,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"commissionamount":0,"hashamount":"edc9898e2d6c2561b5fe513a49e75cfaa2a2b301a165b190b5624d5c40293c97"},"billingaddress":{"usage":"BIL","isnormalized":false,"isactive":true},"payment":{"isprepaid":false,"totalpaid":85,"details":[{"paymentmode":"BILLING","isprepaid":false,"totalpaid":85}]},"statusdetail":{"order":[{"statustype":"Operational","code":"CANCELLED","date":"2018-07-13T09:48:01.815+0000"},{"statustype":"Operational","code":"PROCESSED","date":"2018-07-11T11:38:15.173+0000"},{"statustype":"PAYMENT","code":"PAID","date":"2018-07-11T11:38:15.173+0000"}],"latest":[{"statustype":"Operational","code":"CANCELLED","date":"2018-07-13T09:48:01.815+0000"},{"statustype":"PAYMENT","code":"PAID","date":"2018-07-11T11:38:15.173+0000"}]},"lines":[{"linenum":1,"referencecode":"SeriesLive","offerid":"e5b1d862aa6c4c03896bd29bfdfb9f91","quantity":1,"amount":{"currency":"EUR","grossamount":180,"netamount":180,"totaltopay":180,"additionalserviceamount":0,"additionalassemblyamount":0,"additionalrecoveryamount":0,"hashamount":"ca718d540cabc36618ed34a9d8ee6b17c0ba90fe0404ef5ac759821690208423"},"sellingprice":180,"productitems":[{"productcode":"SeriesLive","quantity":1,"itemnumid":"SeriesLive"}],"preferences":{"customparam1":"CC","customparam2":"MONTH","customparam3":"YEARPERYEAR"}}]},"ordercontext":{"status": "OK", "externalbookingid":"5ef15563-9653-45da-bae8-267ac465b6d9"}}

              schema:
                $ref: '#/components/schemas/OrderResponse'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /order/purchase :
    post:
      tags:
        - Booking Service
      summary: /order/purchase
      description: |
        This method is used to directly confirm a purchase without having to call booking/request.
        This means that inventory management is unnecessary with this method since no stock will be blocked.
        The input request is supposed to be reliable, and the order will be stored as-is.
        If the order reference isn't filled (ordertracking.transactionnumber), the service will set this field with a unique inernal reference.
      operationId: OrderPurchase
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequest'
        required: true

      responses:
        200:
          description: Order purchase response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /order/search:
    post:
      tags:
        - Booking Service
      summary: /order/search
      description: |
        This method is used to search bookings. The total results of bookings in the response is limited by a parameter (default 100 results).

        You must refine your search criteria if you didn't find your order.

      operationId: OrderSearch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
        required: true

      responses:
        200:
          description: Order Search response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request

  /order/tickets:
    post:
      tags:
        - Booking Service
      summary: /order/tickets
      description: |
        This method is used to retrieve order tickets.

      operationId: OrderTickets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketRequest'
        required: true

      responses:
        200:
          description: Tickets response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Ticket'
        401:
          description: The resource requires authentication, which was not supplied with the request
          content: {}
      x-codegen-request-body-name: request


x-google-endpoints:
  - name: valorization.endpoints.b2t-gridbees.cloud.goog
    target: 35.240.12.189
