components:
  schemas:
    ActivationLink:
      description: Activation link
      properties:
        enabled:
          type: boolean
        providerId:
          type: string
      type: object
    AdditionalFieldAttribute:
      properties:
        availableValues:
          items:
            type: object
          type: array
          uniqueItems: true
        errorMessage:
          type: string
        jsonPath:
          type: string
        level:
          enum:
            - WARNING
            - ERROR
          type: string
        mandatoryFor:
          enum:
            - B2B
            - B2C
            - B2B_B2C
          type: string
        name:
          type: string
        role:
          enum:
            - TAX_EXEMPTION
          type: string
        type:
          enum:
            - B2B
            - B2C
            - B2B_B2C
          type: string
        validators:
          items:
            $ref: '#/components/schemas/Validator'
          type: array
          uniqueItems: true
      required:
        - name
      type: object
    AdditionalFieldsAndRequirementsByCountry:
      properties:
        additionalFieldAttributes:
          items:
            $ref: '#/components/schemas/AdditionalFieldAttribute'
          type: array
        endUserFieldRequirements:
          items:
            $ref: '#/components/schemas/EndUserFieldRequirement'
          type: array
        endUserFieldsRequiredForPaymentMethod:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
      type: object
    ArrayNode:
      type: object
    BuyerBehavior:
      description: Buyer behavior
      properties:
        abandonedCart:
          type: boolean
        renewal:
          type: boolean
        retainBuyer:
          type: boolean
      type: object
    Cart:
      properties:
        availableCurrencies:
          description: Set of available currencies
          example: '[EUR,USD]'
          items:
            description: Set of available currencies
            example: '[EUR,USD]'
            type: string
          type: array
          uniqueItems: true
        billingPlanId:
          description: Billing plan ID
          type: string
        billingPlanPeriod:
          description: Billing plan period
          type: string
        blockDiscounts:
          description: Apply discounts on this cart
          type: boolean
        buyerBehavior:
          $ref: '#/components/schemas/BuyerBehavior'
        cancelPeriod:
          description: Cancel period in days
          format: int32
          type: integer
        cartIp:
          description: Cart IP
          type: string
        catalogId:
          description: Catalog ID
          type: string
        checkoutUrl:
          description: Full URL used by cart
          type: string
        consentFlags:
          $ref: '#/components/schemas/ConsentFlags'
        country:
          description: Country code of cart in ISO 3166-2 format
          example: FR
          type: string
        createDate:
          deprecated: true
          format: date-time
          type: string
        currency:
          description: Currency of cart
          properties:
            currencyCode:
              type: string
            defaultFractionDigits:
              format: int32
              type: integer
            displayName:
              type: string
            numericCode:
              format: int32
              type: integer
            numericCodeAsString:
              type: string
            symbol:
              type: string
          type: object
        customerId:
          type: string
        dbVersion:
          format: int64
          type: integer
        discount:
          type: string
          writeOnly: true
        discounts:
          description: List of discounts (signed or promo code)
          items:
            description: List of discounts (signed or promo code)
            type: string
          type: array
        discountsStatus:
          description: List of discount statuses
          items:
            $ref: '#/components/schemas/DiscountStatus'
          type: array
        ecommerceToken:
          description: Ecommerce token for cert capture
          type: string
        eligibleFeatures:
          $ref: '#/components/schemas/EligibleFeatures'
        endUser:
          $ref: '#/components/schemas/EndUser'
        endUserDiscountAmountByCurrency:
          additionalProperties:
            description: discounts amount available for a en user by currency
            format: double
            type: number
          description: discounts amount available for a en user by currency
          type: object
        endUserDiscounts:
          description: List of available discounts for a end user
          items:
            $ref: '#/components/schemas/EndUserDiscount'
          type: array
        enduserId:
          type: string
        externalContext:
          description: External context
          type: string
        flags:
          $ref: '#/components/schemas/Flags'
        forcedCurrency:
          description: Currency forced by end user
          example: EUR
          type: string
        hideCrossSell:
          default: false
          description: Define if we display cross sell recommendation
          type: boolean
        hideUpSell:
          default: false
          description: Define if we display upsell recommendation
          type: boolean
        id:
          deprecated: true
          type: string
        installments:
          description: Installment options
          items:
            description: Installment options
            format: int32
            type: integer
          type: array
          uniqueItems: true
        keepNonRecurringPaymentMethods:
          description: All payment methods are needed for the subscription shopping cart
          type: boolean
        lastUpdateReason:
          type: string
        layout:
          description: layout used in cart
          example: subscription | trial
          type: string
        locale:
          description: Locale of cart
          example: fr-FR
          readOnly: true
          type: string
        manualUpdateDate:
          description: Date of last manual modification, timestamp in milliseconds
          format: date-time
          readOnly: true
          type: string
        manualUpdatingDate:
          type: string
          writeOnly: true
        marketingCampaignNames:
          description: >-
            list of marketing campaign apply on the cart: value can be
            marketingCampaignId or marketingCampaignId
          items:
            description: >-
              list of marketing campaign apply on the cart: value can be
              marketingCampaignId or marketingCampaignId
            type: string
          type: array
        maxPartialPaymentAmount:
          format: double
          type: number
        maxPaymentsParts:
          format: int32
          type: integer
        minPartialPaymentAmount:
          format: double
          type: number
        modelVersion:
          deprecated: true
          type: string
        notReadyForOrderCauseMessage:
          type: string
        offerSubSource:
          description: >-
            It defines which offer sub source that should be used if OFFER is
            the source. It is mandatory to use it, if OFFER is the discount
            source
          enum:
            - SUSPEND
            - RESUME
          example: RESUME | SUSPEND
          type: string
        onPaymentClickRedirectUrl:
          description: Redirection url to shopper
          type: string
        orderId:
          description: OrderId
          type: string
        originalId:
          type: string
          writeOnly: true
        paymentMethod:
          description: Cart payment method
          example: credit_card
          type: string
        paymentTypes:
          description: Available payment types to pay this cart
          items:
            $ref: '#/components/schemas/PaymentType'
          type: array
        price:
          $ref: '#/components/schemas/Price'
        productRecoId:
          description: Product recommendation  id
          type: string
        products:
          description: List of products in cart
          items:
            $ref: '#/components/schemas/Product'
          readOnly: true
          type: array
          uniqueItems: true
        promoteOneClickPayment:
          type: boolean
        remitteds:
          description: List of remitteds
          items:
            $ref: '#/components/schemas/Remitted'
          type: array
        renewalSource:
          type: boolean
        salesFlag:
          type: string
          writeOnly: true
        salesFlags:
          description: List of sales flags
          items:
            description: List of sales flags
            type: string
          type: array
        scenario:
          description: To be able to display different elements in the order workflow
          example: acquisition
          type: string
        scheduledSuppressionDate:
          format: date-time
          type: string
        sentEmails:
          description: List of sent emails
          items:
            $ref: '#/components/schemas/SentEmail'
          type: array
          uniqueItems: true
        source:
          description: It defines the source of the cart
          enum:
            - PURCHASE
            - SUBSCRIPTION
            - MANUAL_RENEWAL
            - BILLING_PLAN
            - OFFER
            - MID_TERM_UPGRADE
          example: PURCHASE | SUBSCRIPTION | MANUAL_RENEWAL | BILLING_PLAN | OFFER
          type: string
        storeHostname:
          description: Hostname of store
          type: string
        storeId:
          description: External id from Store resource
          example: df8ad22a-5038-11eb-ae93-0242ac130002
          readOnly: true
          type: string
        subscriptionGeneration:
          description: Subscription generation
          format: int32
          type: integer
        subscriptionId:
          description: SubscriptionId
          type: string
        subscriptionSubSource:
          description: Purchase's sub source
          enum:
            - TRIAL_CONVERSION
            - RENEWAL
          example: TRIAL_CONVERSION,RENEWAL
          type: string
        taxAuthority:
          description: Tax authority
          enum:
            - AVALARA
            - NX_VATENGINE
          type: string
        taxTransactionId:
          description: Avalara tax transaction id
          type: string
        taxTypes:
          description: Tax type
          items:
            $ref: '#/components/schemas/TaxType'
          type: array
        totalAmount:
          description: Total amount of order
          format: double
          type: number
        updateDate:
          deprecated: true
          format: date-time
          type: string
        userAgent:
          description: User-Agent
          type: string
        vatNumber:
          type: string
        vouchers:
          description: Vouchers list selected on cart by end-user (Reseller approach)
          items:
            $ref: '#/components/schemas/Discount'
          type: array
          uniqueItems: true
        vouchersTotalAmount:
          description: Vouchers total amount
          format: double
          type: number
        warnings:
          description: List of fields in warning after validation
          items:
            $ref: '#/components/schemas/Warning'
          type: array
      required:
        - country
        - currency
        - endUser
        - price
        - products
        - storeId
        - totalAmount
      type: object
    CartInput:
      properties:
        Subscription Id:
          type: string
        blockDiscounts:
          description: Block discounts on this cart
          type: boolean
        buyerBehavior:
          $ref: '#/components/schemas/BuyerBehavior'
        catalogId:
          description: Catalog ID
          example: 21c6e727-3df5-45c1-9872-66c6af3c5e61
          type: string
        checkoutUrl:
          description: Full URL of cart
          example: https://storename.mydomain.fr
          type: string
        consentFlags:
          $ref: '#/components/schemas/ConsentFlags'
        country:
          description: Country of cart
          example: FR
          type: string
        discounts:
          description: List of signed discounts
          items:
            description: List of signed discounts
            type: string
          type: array
        endUser:
          $ref: '#/components/schemas/EndUserPut'
        externalContext:
          description: External context
          example: my external context
          type: string
        flags:
          $ref: '#/components/schemas/Flags'
        forcedCurrency:
          description: Currency forced by end user
          example: EUR
          type: string
        hideCrossSell:
          default: false
          description: Define if we display cross sell recommendation
          type: boolean
        hideUpSell:
          default: false
          description: Define if we display upsell recommendation
          type: boolean
        initialOrderId:
          deprecated: true
          type: string
        ip:
          description: Cart IP
          example: 127.0.0.1
          type: string
        keepNonRecurringPaymentMethods:
          description: All payment methods are needed for the subscription shopping cart
          example: true
          type: boolean
        locale:
          description: Locale of cart
          example: fr-FR
          type: string
        marketingCampaignNames:
          description: List of marketing campaign name
          example:
            - 21c6e727-3df5-45c1-9872-66c6af3c5e61
          items:
            description: List of marketing campaign name
            example: '["21c6e727-3df5-45c1-9872-66c6af3c5e61"]'
            type: string
          type: array
        onPaymentClickRedirectUrl:
          description: redirection url once payment page is closed
          example: https://www.myredirecturl.com
          type: string
        partialPaymentAmount:
          format: double
          type: number
        paymentExternalContext:
          type: string
        paymentMethod:
          description: Selected payment method
          example: payPal
          type: string
        productRecoId:
          description: Product recommendation  id
          example: 21c6e727-3df5-45c1-9872-66c6af3c5e61
          type: string
        products:
          additionalProperties:
            $ref: '#/components/schemas/ProductInput'
          type: object
          writeOnly: true
        remitteds:
          description: List of remitteds
          items:
            $ref: '#/components/schemas/Remitted'
          type: array
        salesFlags:
          description: List of sales flags
          items:
            description: List of sales flags
            type: string
          type: array
        scenario:
          description: To be able to display different elements in the order workflow
          example: acquisition
          type: string
        source:
          description: Source
          enum:
            - PURCHASE
            - SUBSCRIPTION
            - MANUAL_RENEWAL
            - BILLING_PLAN
            - OFFER
            - MID_TERM_UPGRADE
          example: SUBSCRIPTION
          type: string
        storeHostname:
          description: Hostname of store
          example: storename.mydomain.fr
          type: string
        storeId:
          description: Reference ID of the store service
          type: string
        subscriptionSubSource:
          description: Purchase's sub source
          enum:
            - TRIAL_CONVERSION
            - RENEWAL
          example: TRIAL_CONVERSION,RENEWAL
          type: string
        userAgent:
          description: User-Agent
          example: >-
            Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like
            Gecko) Chrome/13.0.782.112 Safari/535.1
          type: string
        wantedProducts:
          description: >-
            list of products or signed product in the cart with its quantity and
            price function parameters
          items:
            $ref: '#/components/schemas/ProductInput'
          type: array
          uniqueItems: true
      required:
        - country
        - locale
        - storeId
        - wantedProducts
      type: object
    CartPut:
      properties:
        buyerBehavior:
          $ref: '#/components/schemas/BuyerBehavior'
        checkoutUrl:
          description: Full URL of cart
          example: https://storename.mydomain.fr
          type: string
        consentFlags:
          $ref: '#/components/schemas/ConsentFlags'
        country:
          description: Country of cart
          example: FR
          type: string
        discounts:
          description: List of signed discounts
          items:
            description: List of signed discounts
            type: string
          type: array
        endUser:
          $ref: '#/components/schemas/EndUserPut'
        externalContext:
          description: External context
          example: my external context
          type: string
        forcedCurrency:
          description: Currency forced by end user
          example: EUR
          type: string
        hideCrossSell:
          default: false
          description: Define if we display cross sell recommendation
          type: boolean
        hideUpSell:
          default: false
          description: Define if we display upsell recommendation
          type: boolean
        ip:
          description: Cart IP
          example: 127.0.0.1
          type: string
        keepNonRecurringPaymentMethods:
          description: All payment methods are needed for the subscription shopping cart
          example: true
          type: boolean
        locale:
          description: Locale of cart
          example: fr-FR
          type: string
        marketingCampaignNames:
          description: List of marketing campaign name
          example:
            - 21c6e727-3df5-45c1-9872-66c6af3c5e61
          items:
            description: List of marketing campaign name
            example: '["21c6e727-3df5-45c1-9872-66c6af3c5e61"]'
            type: string
          type: array
        paymentMethod:
          description: Selected payment method
          example: payPal
          type: string
        productRecoId:
          description: Product recommendation  id
          example: 21c6e727-3df5-45c1-9872-66c6af3c5e61
          type: string
        products:
          additionalProperties:
            $ref: '#/components/schemas/ProductInput'
          type: object
          writeOnly: true
        salesFlags:
          description: List of sales flags
          items:
            description: List of sales flags
            type: string
          type: array
        scenario:
          description: To be able to display different elements in the order workflow
          example: acquisition
          type: string
        storeHostname:
          description: Hostname of store
          example: storename.mydomain.fr
          type: string
        userAgent:
          description: User-Agent
          example: >-
            Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like
            Gecko) Chrome/13.0.782.112 Safari/535.1
          type: string
        wantedProducts:
          description: >-
            list of products or signed product in the cart with its quantity and
            price function parameters
          items:
            $ref: '#/components/schemas/ProductInput'
          type: array
          uniqueItems: true
      required:
        - country
        - locale
        - wantedProducts
      type: object
    Catalog:
      properties:
        customerId:
          type: string
        endDate:
          format: date-time
          type: string
        singleUse:
          type: boolean
        status:
          type: string
      type: object
    Checkout:
      properties:
        cart:
          $ref: '#/components/schemas/PrivateCartInput'
        fullCatalog:
          $ref: '#/components/schemas/FullCatalog'
      required:
        - cart
        - fullCatalog
      type: object
    Company:
      description: End-user company
      properties:
        apeCode:
          description: APE/NAF code
          example: 4791B
          pattern: ^\d{4}[A-Za-z]$
          type: string
        cnpj:
          description: CNPJ
          example: 00.000.000 / 0001-00
          type: string
        companyName:
          description: End-user company name
          example: My company name
          maxLength: 255
          minLength: 1
          type: string
        fullRegistrationNumber:
          description: Siret Number
          example: 362 521 879 00034
          pattern: ^\d{14}$
          type: string
        registrationNumber:
          description: Siren Number
          example: 362 521 879
          pattern: ^\d{9}$
          type: string
        validVatNumber:
          type: boolean
        vatNumber:
          description: Company VAT number
          example: FR12345678901
          maxLength: 32
          minLength: 0
          type: string
      required:
        - companyName
        - vatNumber
      type: object
    ConsentFlags:
      description: Consent flags
      properties:
        newsletterOptin:
          description: Newsletter opt-in consent
          example: true
          type: boolean
      type: object
    CreditCard:
      description: List of credit cards
      properties:
        bin:
          description: Bank Identification Number
          example: '411111'
          type: string
        expirationDate:
          description: Expiration date credit card
          example: 07/2025
          type: string
        id:
          type: string
        paymentMethodType:
          type: string
        type:
          type: string
      readOnly: true
      type: object
    Discount:
      description: Vouchers list selected on cart by end-user (Reseller approach)
      properties:
        amount:
          description: Voucher amount
          example: 5
          format: double
          readOnly: true
          type: number
        code:
          description: Voucher code
          example: MYVOUCHERCODE
          readOnly: true
          type: string
        discountExternalContext:
          type: string
        id:
          description: External id from Discount resource
          example: 9a08c138-510c-11eb-ae93-0242ac130002
          readOnly: true
          type: string
        localizedLabel:
          description: Voucher label localized
          example: my localized voucher label
          readOnly: true
          type: string
        status:
          description: Voucher amount
          example: APPLIED
          readOnly: true
          type: string
      required:
        - amount
        - code
        - id
        - localizedLabel
        - status
      type: object
    DiscountStatus:
      description: List of discount statuses
      properties:
        discount:
          type: string
        discountLabel:
          type: string
        status:
          type: string
      type: object
    DiscountUsage:
      properties:
        discountCode:
          type: string
      type: object
    DiscountedPrice:
      description: Discounted price
      properties:
        discountCode:
          description: Discount code
          example: MYDISCOUNTCODE
          readOnly: true
          type: string
        discountExternalContext:
          description: Discount external context
          example: external context
          type: string
        discountId:
          description: External id from Discount resource
          example: 85a2cfd6-510c-11eb-ae93-0242ac130002
          readOnly: true
          type: string
        discountLabel:
          description: Discount label
          example: Label example
          readOnly: true
          type: string
        discountRate:
          description: Discount rate
          example: 0.35
          format: double
          readOnly: true
          type: number
        discountedGrossPrice:
          description: Discounted cost of product with taxes included
          example: 28.44
          format: double
          readOnly: true
          type: number
        discountedGrossPriceWithoutVoucher:
          description: >-
            Discounted gross price without voucher, only when a voucher is
            applied
          example: 85.32
          format: double
          readOnly: true
          type: number
        discountedNetPrice:
          description: Discounted cost of product without taxes included
          example: 26.4
          format: double
          readOnly: true
          type: number
        discountedNetPriceWithoutVoucher:
          description: Discounted net price without voucher, only when a voucher is applied
          example: 79.2
          format: double
          readOnly: true
          type: number
        grossPriceDiscountAmount:
          description: Gross price discount amount
          example: 15.31
          format: double
          readOnly: true
          type: number
        netPriceDiscountAmount:
          description: Net price discount amount
          example: 14.22
          format: double
          readOnly: true
          type: number
        vatDiscountAmount:
          description: VAT discount amount
          example: 2.04
          format: double
          readOnly: true
          type: number
        voucher:
          $ref: '#/components/schemas/Voucher'
      readOnly: true
      required:
        - discountId
        - discountLabel
        - discountRate
        - discountedGrossPrice
        - discountedNetPrice
        - grossPriceDiscountAmount
        - netPriceDiscountAmount
        - vatDiscountAmount
      type: object
    Document:
      additionalProperties:
        type: object
      properties:
        empty:
          type: boolean
      type: object
    EligibleFeatures:
      description: List of features which define eligibility for corresponding action
      properties:
        abandoned:
          type: boolean
      type: object
    EndUser:
      description: End-user who owns this cart
      properties:
        addressError:
          description: Invalid address flag
          example: true
          type: boolean
        birthDate:
          description: Birth date
          format: date-time
          type: string
        city:
          description: Address book city
          example: city name
          maxLength: 255
          minLength: 0
          type: string
        company:
          $ref: '#/components/schemas/Company'
        consumerType:
          description: End-user consumer type, company or personal
          example: company
          type: string
        country:
          description: End-user country
          example: FR
          type: string
        cpf:
          type: string
        customerId:
          type: string
        email:
          description: End-user email
          example: email@domain.com
          maxLength: 150
          minLength: 0
          type: string
        firstName:
          description: End-user first name
          example: first name
          maxLength: 50
          minLength: 0
          type: string
        id:
          description: External ID from EndUser resource
          example: aa727f80-510e-11eb-ae93-0242ac130002
          type: string
        lastName:
          description: End-user last name
          example: last name
          maxLength: 50
          minLength: 0
          type: string
        locale:
          description: End-user locale
          example: fr-FR
          type: string
        maskedEmail:
          description: Boolean to flag if the email needs to be masked in the public view
          example: false
          type: boolean
        phone:
          description: Phone
          example: '0123456789'
          maxLength: 50
          minLength: 0
          type: string
        recipientCode:
          description: Recipient Code, specially for Italy, San Marino and Vatican
          example: '0000000000'
          type: string
        region:
          description: End-user region
          example: FR-YT
          type: string
        resellerTaxExemptionEligible:
          description: Flag to indicate tax exemption eligibility for reseller
          example: true
          type: boolean
        storeId:
          type: string
        storeRoute:
          $ref: '#/components/schemas/Route'
        streetAddress:
          description: Address book street address
          example: Street name
          maxLength: 255
          minLength: 0
          type: string
        taxExemptionChecked:
          description: Check box for exemption rules
          type: boolean
        taxExemptionEligible:
          description: Tax exemption eligibility flag
          example: false
          type: boolean
        title:
          description: Title
          enum:
            - MR
            - MRS
          example: MR
          type: string
        type:
          description: End-user type
          example: RESELLER
          readOnly: true
          type: string
        validVatNumber:
          type: boolean
          writeOnly: true
        wallet:
          $ref: '#/components/schemas/Wallet'
        zipCode:
          description: Address book zip/postal code
          example: '12345'
          maxLength: 32
          minLength: 0
          type: string
      required:
        - country
        - email
        - firstName
        - lastName
        - locale
        - wallet
        - zipCode
      type: object
    EndUserDiscount:
      description: List of available discounts for a end user
      properties:
        amountByCurrency:
          additionalProperties:
            format: double
            type: number
          type: object
        codes:
          items:
            $ref: '#/components/schemas/DiscountUsage'
          type: array
        endDate:
          format: date-time
          type: string
        id:
          type: string
        localizedLabels:
          additionalProperties:
            type: string
          type: object
        startDate:
          format: date-time
          type: string
      type: object
    EndUserFieldRequirement:
      properties:
        i18nErrorToken:
          type: string
        minSize:
          format: int32
          type: integer
        name:
          type: string
      type: object
    EndUserPut:
      description: End-user who owns this cart
      properties:
        birthDate:
          description: Birth date
          format: date-time
          type: string
        city:
          description: Address book city
          example: city name
          maxLength: 255
          minLength: 0
          type: string
        company:
          $ref: '#/components/schemas/Company'
        consumerType:
          description: End-user consumer type, company or personal
          example: company
          type: string
        country:
          description: End-user country
          example: FR
          type: string
        cpf:
          type: string
        email:
          description: End-user email
          example: email@domain.com
          maxLength: 150
          minLength: 0
          type: string
        firstName:
          description: End-user first name
          example: first name
          maxLength: 50
          minLength: 0
          type: string
        lastName:
          description: End-user last name
          example: last name
          maxLength: 50
          minLength: 0
          type: string
        locale:
          description: End-user locale
          example: fr-FR
          type: string
        maskedEmail:
          description: Boolean to flag if the email needs to be masked in the public view
          example: false
          type: boolean
        phone:
          description: Phone
          example: '0123456789'
          maxLength: 50
          minLength: 0
          type: string
        recipientCode:
          description: Recipient Code, specially for Italy, San Marino and Vatican
          example: '0000000000'
          type: string
        region:
          description: End-user region
          example: FR-YT
          type: string
        resellerTaxExemptionEligible:
          description: Flag to indicate tax exemption eligibility for reseller
          example: true
          type: boolean
        streetAddress:
          description: Address book street address
          example: Street name
          maxLength: 255
          minLength: 0
          type: string
        taxExemptionChecked:
          description: Check box for exemption rules
          type: boolean
        taxExemptionEligible:
          description: Tax exemption eligibility flag
          example: false
          type: boolean
        title:
          description: Title
          enum:
            - MR
            - MRS
          example: MR
          type: string
        validVatNumber:
          type: boolean
          writeOnly: true
        zipCode:
          description: Address book zip/postal code
          example: '12345'
          maxLength: 32
          minLength: 0
          type: string
      required:
        - country
        - email
        - firstName
        - lastName
        - locale
        - zipCode
      type: object
    ExceptionDetail:
      properties:
        errorType:
          type: string
        resourceDisplayName:
          type: string
        resourceId:
          type: string
        resourceType:
          type: string
        specific:
          type: object
      type: object
    Flags:
      description: Set of customer specific flags
      properties:
        productSubstituted:
          description: Flags to show if product was replaced by a new one or not
          type: boolean
      type: object
    FullCatalog:
      properties:
        catalog:
          $ref: '#/components/schemas/Catalog'
        locale:
          type: string
        storeId:
          type: string
      required:
        - catalog
      type: object
    MidTermUpgradeRequest:
      properties:
        externalContext:
          description: External context
          type: string
        subscriptionId:
          type: string
        wantedProduct:
          $ref: '#/components/schemas/ProductInput'
      required:
        - subscriptionId
        - wantedProduct
      type: object
    NormalizeException:
      properties:
        details:
          items:
            $ref: '#/components/schemas/ExceptionDetail'
          type: array
        error:
          type: string
        message:
          type: string
        status:
          format: int32
          type: integer
        timestamp:
          format: int64
          type: integer
      type: object
    Pageable:
      properties:
        page:
          format: int32
          minimum: 0
          type: integer
        size:
          format: int32
          minimum: 1
          type: integer
        sort:
          items:
            type: string
          type: array
      type: object
    PaymentType:
      description: Available payment types to pay this cart
      properties:
        category:
          type: string
        id:
          type: string
        registrable:
          type: boolean
        replayable:
          type: boolean
          writeOnly: true
        role:
          deprecated: true
          type: string
      type: object
    Paypal:
      description: List of PayPal accounts
      properties:
        id:
          type: string
        paymentMethodType:
          type: string
        paypalPayerEmail:
          description: Paypal email account
          example: example@paypal.com
          type: string
        type:
          type: string
      readOnly: true
      type: object
    Price:
      description: All information related to prices
      properties:
        currency:
          description: Currency code in ISO-4217 format
          example: EUR
          properties:
            currencyCode:
              type: string
            defaultFractionDigits:
              format: int32
              type: integer
            displayName:
              type: string
            numericCode:
              format: int32
              type: integer
            numericCodeAsString:
              type: string
            symbol:
              type: string
          readOnly: true
          type: object
        discountedPrice:
          $ref: '#/components/schemas/DiscountedPrice'
        grossMsrp:
          description: Gross MSRP (Manufacturer Suggested Retail Price)
          example: 15.42
          format: double
          readOnly: true
          type: number
        grossPrice:
          description: Gross price
          example: 9.99
          format: double
          readOnly: true
          type: number
        initialGrossPrice:
          description: Initial Gross Price
          example: 12.42
          format: double
          readOnly: true
          type: number
        initialNetPrice:
          description: Initial Net Price
          example: 10.39
          format: double
          readOnly: true
          type: number
        initialVatAmount:
          description: Initial Tax amount
          example: 1.72
          format: double
          readOnly: true
          type: number
        mandateValue:
          description: >-
            Mandate value is a maximum price we can set for a single transaction
            to charge off end user for subscription renew
          example: 10.55
          format: double
          readOnly: true
          type: number
        marketingCampaignId:
          description: marketing campaign id
          readOnly: true
          type: string
        netMsrp:
          description: Net MSRP (Manufacturer Suggested Retail Price)
          example: 9.4
          format: double
          readOnly: true
          type: number
        netPrice:
          description: Net price
          example: 8.4
          format: double
          readOnly: true
          type: number
        remotePrice:
          $ref: '#/components/schemas/RemotePrice'
        source:
          description: Source of price
          enum:
            - INTERNAL
            - EXTERNAL
            - INTERNAL_CONVERTED
          readOnly: true
          type: string
        vatAmount:
          description: Tax amount
          example: 1.59
          format: double
          readOnly: true
          type: number
        vatAmountMsrp:
          description: Tax amount for MSRP (Manufacturer Suggested Retail Price)
          example: 1.8
          format: double
          readOnly: true
          type: number
        vatIncluded:
          description: Tax included / not included
          example: true
          readOnly: true
          type: boolean
        vatRate:
          description: Tax rate
          example: 0.19
          format: double
          readOnly: true
          type: number
      required:
        - currency
        - grossPrice
        - netPrice
        - vatAmount
        - vatIncluded
        - vatRate
      type: object
    PrivateCartInput:
      properties:
        Subscription Id:
          type: string
        billingPlanId:
          type: string
        billingPlanPeriod:
          type: string
        blockDiscounts:
          description: Block discounts on this cart
          type: boolean
        buyerBehavior:
          $ref: '#/components/schemas/BuyerBehavior'
        catalogId:
          description: Catalog ID
          example: 21c6e727-3df5-45c1-9872-66c6af3c5e61
          type: string
        checkoutUrl:
          description: Full URL of cart
          example: https://storename.mydomain.fr
          type: string
        consentFlags:
          $ref: '#/components/schemas/ConsentFlags'
        country:
          description: Country of cart
          example: FR
          type: string
        discounts:
          description: List of signed discounts
          items:
            description: List of signed discounts
            type: string
          type: array
        endUser:
          $ref: '#/components/schemas/EndUserPut'
        enduserId:
          type: string
        externalContext:
          description: External context
          example: my external context
          type: string
        flags:
          $ref: '#/components/schemas/Flags'
        forcedCurrency:
          description: Currency forced by end user
          example: EUR
          type: string
        hideCrossSell:
          default: false
          description: Define if we display cross sell recommendation
          type: boolean
        hideUpSell:
          default: false
          description: Define if we display upsell recommendation
          type: boolean
        initialOrderId:
          deprecated: true
          type: string
        ip:
          description: Cart IP
          example: 127.0.0.1
          type: string
        keepNonRecurringPaymentMethods:
          description: All payment methods are needed for the subscription shopping cart
          example: true
          type: boolean
        locale:
          description: Locale of cart
          example: fr-FR
          type: string
        marketingCampaignNames:
          description: List of marketing campaign name
          example:
            - 21c6e727-3df5-45c1-9872-66c6af3c5e61
          items:
            description: List of marketing campaign name
            example: '["21c6e727-3df5-45c1-9872-66c6af3c5e61"]'
            type: string
          type: array
        onPaymentClickRedirectUrl:
          description: redirection url once payment page is closed
          example: https://www.myredirecturl.com
          type: string
        partialPaymentAmount:
          format: double
          type: number
        paymentExternalContext:
          type: string
        paymentMethod:
          description: Selected payment method
          example: payPal
          type: string
        productRecoId:
          description: Product recommendation  id
          example: 21c6e727-3df5-45c1-9872-66c6af3c5e61
          type: string
        products:
          additionalProperties:
            $ref: '#/components/schemas/ProductInput'
          type: object
          writeOnly: true
        remitteds:
          description: List of remitteds
          items:
            $ref: '#/components/schemas/Remitted'
          type: array
        salesFlags:
          description: List of sales flags
          items:
            description: List of sales flags
            type: string
          type: array
        scenario:
          description: To be able to display different elements in the order workflow
          example: acquisition
          type: string
        source:
          description: Source
          enum:
            - PURCHASE
            - SUBSCRIPTION
            - MANUAL_RENEWAL
            - BILLING_PLAN
            - OFFER
            - MID_TERM_UPGRADE
          example: SUBSCRIPTION
          type: string
        storeHostname:
          description: Hostname of store
          example: storename.mydomain.fr
          type: string
        storeId:
          description: Reference ID of the store service
          type: string
        subscriptionGeneration:
          description: subscription generation to use to get the public product.
          format: int32
          type: integer
        subscriptionSubSource:
          description: Purchase's sub source
          enum:
            - TRIAL_CONVERSION
            - RENEWAL
          example: TRIAL_CONVERSION,RENEWAL
          type: string
        userAgent:
          description: User-Agent
          example: >-
            Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like
            Gecko) Chrome/13.0.782.112 Safari/535.1
          type: string
        wantedProducts:
          description: >-
            list of products or signed product in the cart with its quantity and
            price function parameters
          items:
            $ref: '#/components/schemas/ProductInput'
          type: array
          uniqueItems: true
      required:
        - country
        - locale
        - storeId
        - wantedProducts
      type: object
    Product:
      description: List of products in cart
      properties:
        activationLink:
          $ref: '#/components/schemas/ActivationLink'
        blackListedCountries:
          description: List of countries not authorized for this product
          items:
            description: List of countries not authorized for this product
            type: string
          type: array
          uniqueItems: true
        businessSegment:
          description: Product business segment
          example: my business segment
          type: string
        codeName:
          description: Customer internal product name
          example: my code name
          readOnly: true
          type: string
        crossSellBy:
          description: Cross-sell via another product
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        customerId:
          description: External ID from Customer resource
          example: 65fc962c-5039-11eb-ae93-0242ac130002
          readOnly: true
          type: string
        defaultCurrency:
          description: Currency code in ISO-4217 format
          example: EUR
          properties:
            currencyCode:
              type: string
            defaultFractionDigits:
              format: int32
              type: integer
            displayName:
              type: string
            numericCode:
              format: int32
              type: integer
            numericCodeAsString:
              type: string
            symbol:
              type: string
          readOnly: true
          type: object
        durationUntilTrialEnd:
          description: Number of days before the end of trial reminder
          example: 7
          format: int32
          maximum: 3
          minimum: 0
          type: integer
        existingLicenseId:
          description: >-
            Existing license Id can be used to provide license id in scenario of
            existing license upgrade
          type: string
        externalContext:
          description: External context
          example: external context
          type: string
        forcedBy:
          description: Force via another product
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        forcedCrossSaleProductIds:
          description: List of IDs of forced cross-sell products
          items:
            description: List of IDs of forced cross-sell products
            type: string
          type: array
        fulfillmentTemplate:
          description: Fulfillment template name
          example: fulfillment template name
          type: string
        fullPrice:
          $ref: '#/components/schemas/Price'
        id:
          description: External ID from Product resource
          example: 2f06e154-5039-11eb-ae93-0242ac130002
          readOnly: true
          type: string
        licenseNextExpirationDate:
          description: licenseNextExpirationDate
          type: string
        lifeTime:
          description: Lifetime
          example: 1 YEAR
          type: string
        lifeTimeUnit:
          description: Lifetime unit
          example: year
          type: string
        lifeTimeValue:
          description: Lifetime value
          example: '1'
          type: string
        marketingCampaignId:
          description: marketing campaign id applied on the product
          type: string
        name:
          description: Product name
          example: product name
          type: string
        parentId:
          description: Product parent ID
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          readOnly: true
          type: string
        previousLineItemId:
          description: Previous line item ID
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        price:
          $ref: '#/components/schemas/Price'
        priceFunctionParameters:
          description: Parameters of the product
          items:
            $ref: '#/components/schemas/PublicParameter'
          type: array
        priceFunctionParametersValues:
          additionalProperties:
            description: Value parameters of the product
            type: string
          description: Value parameters of the product
          type: object
        priceSource:
          enum:
            - INTERNAL
            - EXTERNAL
            - INTERNAL_CONVERTED
          type: string
        publisherRefId:
          description: Product publisher reference ID
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        quantity:
          description: Product quantity
          example: 1
          format: int32
          type: integer
        quantityMaxReached:
          description: >-
            Indicator if a product quantity can not be increased (uses for the
            gift products in the marketing campaigns)
          example: false
          type: boolean
        relatedContents:
          description: Links for downloading related content files of product
          items:
            $ref: '#/components/schemas/RelatedContent'
          type: array
        renewingPrice:
          $ref: '#/components/schemas/Price'
        signedProduct:
          description: Signed product
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        subProducts:
          description: Sub-products
          items:
            $ref: '#/components/schemas/Product'
          type: array
        subscriptionTemplate:
          description: Subscription template name
          example: subscription template name
          type: string
        taxCode:
          description: Avatax tax code
          example: tax code
          type: string
        taxExempt:
          description: true if the product is tax exempted, false instead
          type: boolean
        trial:
          description: Indicator if the trial period is requested for the product
          example: false
          type: boolean
        type:
          description: Product type
          type: string
        unitPrice:
          $ref: '#/components/schemas/Price'
        upSellBy:
          description: Upsell via another product
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        variableValues:
          additionalProperties:
            description: Product variables
            type: object
          description: Product variables
          type: object
        variablesDetails:
          additionalProperties:
            $ref: '#/components/schemas/VariableDetails'
          description: Product variables details
          type: object
      readOnly: true
      required:
        - customerId
        - defaultCurrency
        - fullPrice
        - id
        - lifeTime
        - publisherRefId
        - quantity
        - renewingPrice
        - unitPrice
      type: object
    ProductInput:
      properties:
        crossSellBy:
          description: Product to cross-sell by another product
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        currentExpirationDate:
          description: Current expiration date
          example: '1712906328000'
          type: string
        durationUntilTrialEnd:
          description: Number of days before the end of trial reminder
          example: 7
          format: int32
          maximum: 3
          minimum: 0
          type: integer
        forcedBy:
          description: Product to force by another product
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        id:
          description: Product ID
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        licenseId:
          description: License id
          example: b7df28f3-99cb-4ffe-b74e-972dca528f5a
          type: string
        marketingCampaignId:
          description: marketing campaign id use on the product
          type: string
        nextExpirationDate:
          description: Next expiration date
          example: '1712906328000'
          type: string
        parentId:
          description: Product parent ID
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        previousLineItemId:
          description: Previous line item ID
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        priceFunctionParameters:
          additionalProperties:
            description: Product parameters
            type: string
          description: Product parameters
          type: object
        quantity:
          description: Product quantity
          example: 2
          format: int32
          type: integer
        quantityMaxReached:
          description: >-
            Indicator if a product quantity can not be increased (uses for the
            gift products in the marketing campaigns)
          example: false
          type: boolean
        remotePrice:
          type: boolean
        subscriptionTemplate:
          type: string
        trial:
          description: Indicator if it is a product trial
          example: false
          type: boolean
        upSellBy:
          description: Product to upsell by another product
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
      type: object
    PublicParameter:
      description: Parameters of the product
      properties:
        defaultValue:
          description: Parameter default name
          type: object
        field:
          description: Parameter name
          type: string
        internalDesc:
          description: Internal description of the parameter
          example: internal description
          type: string
        label:
          description: Parameter label
          example: label
          type: string
        max:
          description: Maximum value
          example: 10
          format: int32
          type: integer
        min:
          description: Minimum value
          example: 1
          format: int32
          type: integer
        pattern:
          description: Pattern value
          type: string
        type:
          description: Parameter type
          example: type
          type: string
      required:
        - defaultValue
        - field
        - label
        - max
        - min
        - pattern
        - type
      type: object
    RecapEntry:
      properties:
        count:
          format: int32
          type: integer
        targetValue:
          type: string
      type: object
    RelatedContent:
      description: Links for downloading related content files of product
      properties:
        file:
          description: URL or file name with extension for downloading
          example: https://ww.domain.com/file.exe
          type: string
        label:
          description: Text that explains what this binary is
          example: file name
          type: string
      type: object
    Remitted:
      description: List of remitteds
      properties:
        id:
          type: string
        remittanceAmount:
          format: double
          type: number
        remittanceRate:
          exclusiveMaximum: false
          exclusiveMinimum: true
          format: double
          maximum: 1
          minimum: 0
          type: number
      required:
        - id
        - remittanceAmount
      type: object
    RemotePrice:
      description: Remote price information
      properties:
        response:
          description: The response of the remote price
          type: string
        url:
          description: URL use to get the remote price
          type: string
      readOnly: true
      type: object
    Route:
      properties:
        builtHostname:
          type: string
        fullUrl:
          type: string
        hostname:
          type: string
        pathPrefix:
          type: string
      type: object
    SearchResultCart:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Cart'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultDocument:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Document'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultObject:
      properties:
        items:
          items:
            type: object
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultRecapEntry:
      properties:
        items:
          items:
            $ref: '#/components/schemas/RecapEntry'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SentEmail:
      description: List of sent emails
      properties:
        abandonedCartEmail:
          type: boolean
        dest:
          description: Email dest
          example: email@domain.com
          type: string
        emailId:
          description: Email reference in email storage service
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        emailTemplate:
          description: template to use for the email
          example: email template
          type: string
        error:
          description: Email error message
          example: error message
          type: string
        id:
          description: Internal reference ID
          example: 2a196c8f-089d-4196-a8f9-16ad61e70b25
          type: string
        type:
          description: Type of email
          example: email type
          type: string
      required:
        - dest
        - emailId
        - error
        - id
      type: object
    SubscriptionOfferRequest:
      properties:
        subscriptionId:
          type: string
      required:
        - subscriptionId
      type: object
    SubscriptionOfferResponse:
      properties:
        cartId:
          type: string
        customerId:
          type: string
        offerSubSource:
          type: string
        product:
          $ref: '#/components/schemas/Product'
        source:
          type: string
        storeId:
          type: string
        subscriptionId:
          type: string
        totalAmount:
          format: double
          type: number
      type: object
    TaxType:
      description: Tax type
      properties:
        amount:
          format: double
          type: number
        rate:
          format: double
          type: number
        taxName:
          type: string
      type: object
    Validator:
      properties:
        regex:
          type: string
        type:
          enum:
            - CUSTOM
            - REGEX
          type: string
      type: object
    VariableDetails:
      description: Product variables details
      properties:
        desc:
          type: string
        label:
          type: string
        value:
          type: object
      type: object
    Voucher:
      description: Voucher details
      properties:
        discounts:
          description: Discount voucher details
          items:
            $ref: '#/components/schemas/Discount'
          readOnly: true
          type: array
          uniqueItems: true
        totalAmount:
          description: Total amount of vouchers
          example: 60
          format: double
          readOnly: true
          type: number
      readOnly: true
      required:
        - discounts
        - totalAmount
      type: object
    Wallet:
      description: End-user's wallet
      properties:
        creditCards:
          description: List of credit cards
          items:
            $ref: '#/components/schemas/CreditCard'
          readOnly: true
          type: array
        paypals:
          description: List of PayPal accounts
          items:
            $ref: '#/components/schemas/Paypal'
          readOnly: true
          type: array
      type: object
    Warning:
      description: List of fields in warning after validation
      properties:
        field:
          type: string
        message:
          type: string
      type: object
  securitySchemes:
    Bearer:
      bearerFormat: JWT
      description: Enter Bearer token
      scheme: bearer
      type: http
info:
  description: API to manage carts
  license:
    name: Nexway License Version 1.0
  title: Cart
  version: '1.0'
openapi: 3.0.1
paths:
  /carts:
    get:
      operationId: getItems
      parameters:
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
        - in: query
          name: target
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultCart'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get items
      tags:
        - Cart
      x-operationWeight: '300'
    post:
      description: Create a cart with PrivateCartInput content in the request body
      operationId: createItem
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrivateCartInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Create an item
      tags:
        - Cart
  /carts/createCheckout:
    post:
      description: >-
        Create cart with products which are not in the actual catalog, will
        create new catalog and set the id of these products with created catalog
        as prefix
      operationId: createCheckout
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Checkout'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '201':
          content:
            application/json:
              schema:
                type: object
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Create checkout
      tags:
        - Cart
      x-operationWeight: '100'
  /carts/distinct:
    get:
      operationId: distinct
      parameters:
        - in: query
          name: target
          required: false
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultObject'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get distinct values for a given field
      tags:
        - Cart
      x-operationWeight: '100'
  /carts/mid-term-upgrade:
    post:
      description: Create a Cart with a mid term upgrade for a subscription
      operationId: createMidTermUpgradeCart
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MidTermUpgradeRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Create a mid term upgrade
      tags:
        - Cart
  /carts/public:
    post:
      description: Create a cart with CartInput content in the request body
      operationId: publicCreateCart
      parameters:
        - description: >-
            Determine if the operation will take effect in the database, if
            dryRun is true, cart will not be created
          in: query
          name: dryRun
          required: false
          schema:
            type: boolean
        - description: reason of request
          in: query
          name: reason
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CartInput'
        required: true
      responses:
        '200':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '201':
          content:
            '*/*':
              schema:
                type: object
          description: Created
        '400':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Create a cart
      tags:
        - Public
      x-operationWeight: '100'
  /carts/public/products/{productId}/variants/matrix:
    get:
      description: >-
        Get matrix of all available product variants of given product id, such
        as seats, subscription information
      operationId: getProductVariantMatrix
      parameters:
        - description: Product id
          in: path
          name: productId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayNode'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Get product variant matrix
      tags:
        - Public
      x-operationWeight: '300'
  /carts/public/{country}/expected-fields:
    get:
      description: Get the additional expected fields with a valid ISO 3166-1 alpha-2 code
      operationId: getFieldsConfigByCountry
      parameters:
        - description: ISO 3166-1 alpha-2 code
          in: path
          name: country
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdditionalFieldsAndRequirementsByCountry'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '408':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Request Timeout
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Service Unavailable
      security:
        - none: []
      summary: Get the additional expected fields for a country
      tags:
        - Public
      x-operationWeight: '300'
  /carts/public/{id}:
    get:
      description: >-
        Get a cart by ID, can customize response whether we want the full fields
        of response data or not with 'format' parameter
      operationId: getOne
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: >-
            According the format, the data returned will be filtered, full means
            all available data are returned.
          example: full, short
          in: query
          name: format
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Get a cart by ID
      tags:
        - Public
      x-operationWeight: '100'
    put:
      description: Update a given cart with CartPut information in the request body
      operationId: put
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: version
          in: query
          name: version
          required: false
          schema:
            format: int64
            type: integer
        - description: >-
            Determine if the operation will take effect in the database, if
            dryRun is true, cart will not be updated
          in: query
          name: dryRun
          required: false
          schema:
            type: boolean
        - description: >-
            According the format, the data returned will be filtered, full means
            all available data are returned.
          example: full, short
          in: query
          name: format
          required: false
          schema:
            type: string
        - description: reason of request
          in: query
          name: reason
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CartPut'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Update a cart
      tags:
        - Public
      x-operationWeight: '200'
  /carts/public/{id}/custom-fields:
    get:
      description: Get product custom fields fora cart by ID, to store it in order.
      operationId: getCustomFields
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties:
                  type: object
                type: object
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Get product custom fields for a cart by ID
      tags:
        - Public
      x-operationWeight: '100'
  /carts/public/{id}/expectedFields:
    get:
      deprecated: true
      description: >-
        Get the additional expected fields by the end user country in the given
        cart id
      operationId: getFieldsConfigByCartId
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdditionalFieldsAndRequirementsByCountry'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Get the additional expected fields for a country
      tags:
        - Public
      x-operationWeight: '300'
  /carts/public/{id}/payment-method/{paymentMethod}:
    put:
      description: >-
        Update the payment method and calculate subsidiary of cart with the
        updated payment method
      operationId: updatePaymentMethod
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: Payment method name
          example: credit_card
          in: path
          name: paymentMethod
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Update the payment method
      tags:
        - Public
      x-operationWeight: '200'
  /carts/public/{id}/product-recommendations/request:
    get:
      description: Get the product recommendations for the given cart id
      operationId: getProductRecommendations
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayNode'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Get cart product recommendations
      tags:
        - Public
      x-operationWeight: '200'
  /carts/public/{id}/sendByMail:
    post:
      description: Send cart to the mail of end user in the given cart id
      operationId: sendByEmail
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Send cart by mail
      tags:
        - Public
      x-operationWeight: '100'
  /carts/public/{id}/wantedProducts:
    put:
      description: Update products for the given cart id
      operationId: updateProduct_1
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: Product recommendation rule id
          in: query
          name: productRecommendationId
          required: false
          schema:
            type: string
        - description: version
          in: query
          name: version
          required: false
          schema:
            format: int64
            type: integer
        - description: >-
            Determine if the operation will take effect in the database, if
            dryRun is true, product in the cart will not be updated
          in: query
          name: dryRun
          required: false
          schema:
            type: boolean
        - description: >-
            According the format, the data returned will be filtered, full means
            all available data are returned.
          example: full, short
          in: query
          name: format
          required: false
          schema:
            type: string
        - description: reason of request
          in: query
          name: reason
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/ProductInput'
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      security:
        - none: []
      summary: Update products in cart
      tags:
        - Public
      x-operationWeight: '300'
  /carts/recap:
    get:
      operationId: recap
      parameters:
        - in: query
          name: target
          required: true
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultRecapEntry'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get recap quantities for a given field
      tags:
        - Cart
      x-operationWeight: '150'
  /carts/subscription-offers:
    post:
      description: Create a Cart with a discounted offer for a subscription
      operationId: createSubscriptionOfferCart
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionOfferRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionOfferResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Create a Subscription Offer
      tags:
        - Cart
  /carts/unwind:
    get:
      operationId: unwind
      parameters:
        - in: query
          name: target
          required: true
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultDocument'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Search unwind for a given field
      tags:
        - Cart
      x-operationWeight: '150'
  /carts/{id}:
    delete:
      operationId: deleteItem
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Delete item
      tags:
        - Cart
      x-operationWeight: '500'
    get:
      operationId: getItem
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get item
      tags:
        - Cart
      x-operationWeight: '200'
  /carts/{id}/wantedProducts:
    put:
      description: Update products for the given cart id
      operationId: updateProduct
      parameters:
        - description: Cart id
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: Product recommendation rule id
          in: query
          name: productRecommendationId
          required: false
          schema:
            type: string
        - description: version
          in: query
          name: version
          required: false
          schema:
            format: int64
            type: integer
        - description: >-
            Determine if the operation will take effect in the database, if
            dryRun is true, cart will not be updated
          in: query
          name: dryRun
          required: false
          schema:
            type: boolean
        - description: reason of request
          in: query
          name: reason
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductInput'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Update products in cart
      tags:
        - Cart
      x-operationWeight: '200'
security:
  - Bearer:
      - read
      - write
servers:
  - description: Generated server url
    url: https://api.nexway.store
