components:
  schemas:
    AccountAmount:
      properties:
        amount:
          format: double
          type: number
        currency:
          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
      required:
        - currency
      type: object
    ActivationLink:
      properties:
        enabled:
          type: boolean
        providerId:
          type: string
        qrCodeBase64:
          items:
            format: byte
            type: string
          type: array
        url:
          type: string
      type: object
    CancellationReason:
      properties:
        cancellationReasonId:
          format: int32
          type: integer
        comment:
          type: string
        createDate:
          deprecated: true
          format: date-time
          type: string
        dbVersion:
          format: int64
          type: integer
        id:
          deprecated: true
          type: string
        label:
          type: string
        lastUpdateReason:
          type: string
        modelVersion:
          deprecated: true
          type: string
        originalId:
          type: string
          writeOnly: true
        trigram:
          maxLength: 3
          minLength: 3
          type: string
        updateDate:
          deprecated: true
          format: date-time
          type: string
      required:
        - label
        - trigram
      type: object
    Company:
      description: EndUser company
      properties:
        apeCode:
          type: string
        cnpj:
          type: string
        companyName:
          type: string
        fullRegistrationNumber:
          type: string
        registrationNumber:
          type: string
        vatNumber:
          type: string
      type: object
    ConsentFlags:
      description: Consent flags
      properties:
        newsletterOptin:
          description: Newsletter opt-in consent
          type: boolean
      type: object
    CreditNote:
      description: List of credit notes
      properties:
        cancellationReason:
          description: Cancellation reason reference ID
          type: string
        date:
          description: Invoice creation date
          format: date-time
          type: string
        id:
          description: Internal reference ID
          type: string
        type:
          description: Indicates if full or partial cancellation ( PARTIAL/TOTAL)
          enum:
            - PARTIAL
            - TOTAL
          type: string
      required:
        - cancellationReason
        - date
        - id
        - type
      type: object
    Customer:
      description: Customer information
      properties:
        features:
          $ref: '#/components/schemas/Features'
        id:
          description: Customer service reference ID
          readOnly: true
          type: string
        multiplePaymentsValidityDuration:
          format: int64
          type: integer
          writeOnly: true
        name:
          type: string
        quoteSubscriptionValidityDuration:
          format: int64
          type: integer
          writeOnly: true
        quoteValidityDuration:
          format: int64
          type: integer
          writeOnly: true
        retryPaymentValidityDuration:
          format: int64
          type: integer
          writeOnly: true
        status:
          description: Customer status TRIAL/RUNNING
          readOnly: true
          type: string
      required:
        - id
      type: object
    Discount:
      properties:
        amount:
          format: double
          type: number
        code:
          type: string
        discountExternalContext:
          type: string
        id:
          type: string
        label:
          type: string
      type: object
    DiscountedPrice:
      description: Discounted price
      properties:
        discountCode:
          description: Discount promo code
          readOnly: true
          type: string
        discountExternalContext:
          description: Discount external context
          readOnly: true
          type: string
        discountId:
          description: Discount ID
          readOnly: true
          type: string
        discountLabel:
          description: Discount label
          readOnly: true
          type: string
        discountRate:
          description: Discount rate
          format: double
          readOnly: true
          type: number
        discountTestOrder:
          default: false
          description: Show if order is test
          readOnly: true
          type: boolean
        discountedGrossPrice:
          description: Discounted cost of product with taxes included
          format: double
          readOnly: true
          type: number
        discountedGrossPriceWithoutVoucher:
          description: >-
            Discounted gross price without voucher, only when a voucher is
            applied
          format: double
          readOnly: true
          type: number
        discountedNetPrice:
          description: Discounted cost of product without taxes included
          format: double
          readOnly: true
          type: number
        discountedNetPriceWithoutVoucher:
          description: Discounted net price without voucher, only when a voucher is applied
          format: double
          readOnly: true
          type: number
        grossPriceDiscountAmount:
          description: Gross price discount amount
          format: double
          readOnly: true
          type: number
        netPriceDiscountAmount:
          description: Net price discount amount
          format: double
          readOnly: true
          type: number
        signedDiscount:
          description: Signed discount
          readOnly: true
          type: string
        vatDiscountAmount:
          description: VAT discount amount
          format: double
          readOnly: true
          type: number
        voucher:
          $ref: '#/components/schemas/Voucher'
      readOnly: true
      type: object
    Document:
      additionalProperties:
        type: object
      properties:
        empty:
          type: boolean
      type: object
    Email:
      description: List of emails sent
      properties:
        createDate:
          description: Email creation date timestamp in milliseconds
          format: int64
          type: integer
        emailId:
          description: Email reference in email storage service
          type: string
        message:
          description: Message
          type: string
        paymentId:
          description: Payment ID
          type: string
        preorderProductId:
          description: Product if the email is about specific product (preorder case)
          type: string
        recipient:
          description: Recipient
          type: string
        templateDefinitionName:
          description: template definition name used in email builder
          type: string
        templateName:
          description: Email template name
          type: string
      required:
        - emailId
      type: object
    EndUser:
      description: End-user information
      properties:
        accountCreated:
          description: 'If account is created : TRUE'
          example: true
          type: boolean
        accountExists:
          type: boolean
        birthDate:
          description: Birth date
          format: date-time
          type: string
        city:
          description: EndUser city
          example: Nîmes
          maxLength: 200
          minLength: 0
          type: string
        company:
          $ref: '#/components/schemas/Company'
        consumerType:
          description: End-user consumer type, company or personal
          example: company
          pattern: ^(company|personal)$
          type: string
        country:
          description: EndUser country
          example: FR
          type: string
        cpf:
          description: Brazilian individual taxpayer registry number (cpf)
          pattern: ^(\d{3}.\d{3}.\d{3}-\d{2})$
          type: string
        email:
          description: EndUser email
          example: john.doe@nexway.com
          type: string
        firstName:
          description: EndUser first name
          example: John
          maxLength: 160
          minLength: 1
          type: string
        id:
          description: EndUser id
          example: 0da71031-d6e5-48b4-bd28-7094f3c71a0b
          type: string
        lastName:
          description: EndUser last name
          example: Doe
          maxLength: 160
          minLength: 1
          type: string
        locale:
          description: EndUser locale
          example: fr-FR
          type: string
        phone:
          description: EndUser phone number
          example: 07 00 00 00 00
          type: string
        recipientCode:
          description: Recipient code
          type: string
        region:
          description: EndUser region
          example: Occitanie
          maxLength: 50
          minLength: 0
          type: string
        storeId:
          description: EndUser storeId
          example: 9762480d-4c3d-4aea-9a75-236eb5f482c3
          type: string
        streetAddress:
          description: EndUser street address
          example: 19 Avenue Feuchères
          maxLength: 255
          minLength: 0
          type: string
        taxExemptionEligible:
          description: 'Tax exemption eligible : TRUE/FALSE'
          type: boolean
        title:
          description: EndUser title
          example: M
          type: string
        token:
          type: string
        type:
          description: EndUser type BUYER/RESELLER/RESELLER_NOT_APPROVED/RESELLER_DECLINED
          type: string
        zipCode:
          description: EndUser zip Code
          example: '30000'
          maxLength: 50
          minLength: 0
          type: string
      required:
        - country
        - email
        - firstName
        - id
        - lastName
        - locale
        - storeId
        - type
      type: object
    Event:
      properties:
        createDate:
          format: date-time
          type: string
        message:
          type: string
        metadata:
          additionalProperties:
            type: object
          type: object
        name:
          type: string
        source:
          type: string
        status:
          type: string
      type: object
    ExceptionDetail:
      properties:
        errorType:
          type: string
        resourceDisplayName:
          type: string
        resourceId:
          type: string
        resourceType:
          type: string
        specific:
          type: object
      type: object
    Features:
      properties:
        createInvoice:
          type: boolean
        sendOrderConfirmationEmail:
          type: boolean
        usingFulfillmentV1:
          type: boolean
        usingSubscriptionV1:
          type: boolean
      type: object
    FullPrice:
      description: All information related to amount
      properties:
        currency:
          description: Purchase currency (ISO-4217 format)
          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
        discountedPrice:
          $ref: '#/components/schemas/DiscountedPrice'
        grossPrice:
          description: Cost of product with taxes included
          format: double
          type: number
        initialGrossPrice:
          description: Initial cost of product with taxes included
          format: double
          type: number
        initialNetPrice:
          description: Initial net price
          format: double
          type: number
        initialVatAmount:
          description: Initial VAT amount (initial grossPrice - initial netPrice)
          format: double
          type: number
        mandateValue:
          description: mandateValue
          format: double
          type: number
        marketingCampaignId:
          description: marketing campaign id
          readOnly: true
          type: string
        netPrice:
          description: Net price
          format: double
          type: number
        remotePrice:
          $ref: '#/components/schemas/RemotePrice'
        source:
          description: Source of price
          enum:
            - INTERNAL
            - EXTERNAL
            - INTERNAL_CONVERTED
          readOnly: true
          type: string
        vatAmount:
          description: 'VAT amount (grossPrice - netPrice) '
          format: double
          type: number
        vatIncluded:
          description: Tax included / not included
          example: true
          readOnly: true
          type: boolean
        vatRate:
          description: Sales tax rate
          format: double
          type: number
      required:
        - currency
        - discountedPrice
        - grossPrice
        - initialGrossPrice
        - initialNetPrice
        - initialVatAmount
        - netPrice
        - vatAmount
        - vatIncluded
        - vatRate
      type: object
    FullPriceView:
      description: All information related to renewing price
      properties:
        currency:
          description: Purchase currency (ISO-4217 format)
          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
        grossPrice:
          description: Cost of product with taxes included
          format: double
          type: number
        mandateValue:
          description: mandate value
          format: double
          type: number
        netPrice:
          description: Net price
          format: double
          type: number
        vatAmount:
          description: 'VAT amount (grossPrice - netPrice) '
          format: double
          type: number
        vatIncluded:
          description: Tax included / not included
          type: boolean
        vatRate:
          description: Sales tax rate
          format: double
          type: number
      required:
        - currency
        - grossPrice
        - netPrice
        - vatAmount
        - vatRate
      type: object
    History:
      properties:
        createDate:
          deprecated: true
          format: date-time
          type: string
        dbVersion:
          format: int64
          type: integer
        event:
          $ref: '#/components/schemas/Event'
        id:
          deprecated: true
          type: string
        lastUpdateReason:
          type: string
        modelVersion:
          deprecated: true
          type: string
        orderId:
          type: string
        originalId:
          type: string
          writeOnly: true
        updateDate:
          deprecated: true
          format: date-time
          type: string
      type: object
    Invoice:
      description: Invoice information
      properties:
        date:
          description: Creation date
          format: date-time
          type: string
        id:
          description: Internal reference ID
          type: string
        type:
          description: Type
          type: string
      required:
        - id
      type: object
    Lifecycle:
      properties:
        paymentDeadline:
          format: int64
          type: integer
        sgSubId:
          type: string
      type: object
    LineItem:
      description: List of products
      properties:
        activationLink:
          $ref: '#/components/schemas/ActivationLink'
        amount:
          description: Cost of product
          format: double
          type: number
        businessSegment:
          type: string
        currency:
          description: Currency of product
          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
        customFieldsId:
          type: string
        discountAmount:
          description: Cost of product after discount
          format: double
          type: number
        discountRate:
          description: Discount rate
          format: double
          type: number
        emailDesc:
          description: Email description
          type: string
        existingLicenseId:
          type: string
        expirationDate:
          format: date-time
          type: string
        externalContext:
          description: External context
          type: string
        fraudPoints:
          format: int32
          type: integer
        fulfillmentTemplate:
          description: Fulfillment template name or id depending on the fulfillment version
          type: string
        fulfillmentTemplateName:
          description: Fulfillment template name
          type: string
        id:
          description: Internal reference ID
          type: string
        initialAmount:
          description: Initial cost of product with taxes included
          format: double
          type: number
        initialNetAmount:
          description: Initial net price
          format: double
          type: number
        initialVatAmount:
          description: Initial VAT amount (initial grossPrice - initial netPrice)
          format: double
          type: number
        licenseId:
          type: string
        licenseNextExpirationDate:
          description: licenseNextExpirationDate
          type: string
        lifeTime:
          description: Lifetime
          type: string
        longDesc:
          description: Long description
          type: string
        multipleLicensesFulfillment:
          description: True if you want to handle a multiple fulfillment
          type: boolean
        name:
          description: Product name
          type: string
        netAmount:
          description: Cost of product with no taxes included
          format: double
          type: number
        numberOfDaysBeforeRenewalRemote:
          format: int64
          type: integer
        physical:
          type: boolean
        price:
          $ref: '#/components/schemas/FullPrice'
        priceFunctionParameters:
          additionalProperties:
            type: string
          type: object
        productFamily:
          type: string
        productId:
          description: Internal reference ID of product service
          type: string
        productType:
          type: string
        publisherRefId:
          description: Publisher product ID
          type: string
        quantity:
          format: int32
          type: integer
        relatedContents:
          description: Links for downloading product-related content file
          items:
            $ref: '#/components/schemas/RelatedContent'
          type: array
        releaseDate:
          description: Product release date
          format: date-time
          type: string
        remoteLicenseExpirationDate:
          format: date-time
          type: string
        renewingPrice:
          $ref: '#/components/schemas/FullPrice'
        shortDesc:
          description: Short description
          type: string
        signedProduct:
          type: string
        subscriptionTemplate:
          description: Subscription template name
          type: string
        taxCode:
          description: Avatax tax code
          type: string
        taxExempt:
          description: Indicator if the product is tax exempt
          type: boolean
        thankYouDesc:
          description: Thank-you description
          type: string
        trial:
          description: Indicator if this is a subscription trial period
          type: boolean
        trialDuration:
          description: Duration of the subscription trial period (days)
          format: int32
          type: integer
        unitPrice:
          $ref: '#/components/schemas/FullPrice'
        variablesDetails:
          additionalProperties:
            $ref: '#/components/schemas/VariableDetails'
          description: Product variables
          type: object
        vatAmount:
          description: VAT amount (grossPrice - netPrice)
          format: double
          type: number
        vatRate:
          description: VAT rate for product
          format: double
          type: number
      required:
        - fulfillmentTemplate
        - fulfillmentTemplateName
        - id
        - initialAmount
        - initialNetAmount
        - initialVatAmount
        - lifeTime
        - netAmount
        - productId
        - vatAmount
        - vatRate
      type: object
    LineItemData:
      properties:
        activationCode:
          type: string
        activationFileFulfillment:
          description: True if the license to provide to the end user is a content file
          type: boolean
        activationLink:
          type: string
        compatId:
          description: LineItem Compatibility ID
          type: string
        createDate:
          deprecated: true
          format: date-time
          type: string
        creditNoteProcessingStatus:
          description: Line item credit note processing status
          enum:
            - NONE
            - INITIALIZED
            - CREATION_PENDING
            - CREATION_FAILURE
            - CREATION_SCHEDULED
            - CREATION_ACCEPTED
            - CANCEL_PENDING
            - CANCEL_FAILURE
            - CANCEL_ACCEPTED
          type: string
        customerId:
          type: string
        dbVersion:
          format: int64
          type: integer
        enduserId:
          type: string
        fulfillmentOperationId:
          type: string
        fulfillmentProcessingStatus:
          description: Line item fulfillment processing status
          enum:
            - NONE
            - INITIALIZED
            - CREATION_PENDING
            - CREATION_FAILURE
            - CREATION_SCHEDULED
            - CREATION_ACCEPTED
            - CANCEL_PENDING
            - CANCEL_FAILURE
            - CANCEL_ACCEPTED
          type: string
        id:
          deprecated: true
          type: string
        lastUpdateReason:
          type: string
        lineItemId:
          description: LineItem reference ID
          type: string
        modelVersion:
          deprecated: true
          type: string
        nexwayFulfillmentId:
          description: Nexway fulfillment ID
          type: string
        orderId:
          description: Order reference ID
          type: string
        originalId:
          type: string
          writeOnly: true
        preorderReleaseNotificationNeeded:
          description: >-
            Indicates if preorder on this line item has been released and is
            awaiting enduser notification
          type: boolean
        previousLineItemDataId:
          description: >-
            Internal reference ID to the previous lineItemData order for this
            product (renew usecase)
          type: string
        processingEvent:
          description: Line item history of processing events
          items:
            $ref: '#/components/schemas/ProcessingEvent'
          properties:
            empty:
              type: boolean
            first:
              $ref: '#/components/schemas/ProcessingEvent'
            last:
              $ref: '#/components/schemas/ProcessingEvent'
          type: array
        processingStatus:
          description: Line item processing status
          enum:
            - CANCELED
            - PARTIALLY_CANCELED
            - FAILURE
            - PENDING
            - COMPLETED
            - INITIALIZED
          type: string
        productId:
          description: Internal reference ID of product service
          type: string
        publisherFulfillmentId:
          description: Publisher fulfillment ID
          type: string
        qrCodeBase64:
          type: string
        reminderDays:
          description: Number of days before the end of trial reminder
          example: 7
          format: int32
          type: integer
        subscriptionId:
          description: Subscription ID
          type: string
        subscriptionProcessingStatus:
          description: Line item subscription processing status
          enum:
            - NONE
            - INITIALIZED
            - CREATION_PENDING
            - CREATION_FAILURE
            - CREATION_SCHEDULED
            - CREATION_ACCEPTED
            - CANCEL_PENDING
            - CANCEL_FAILURE
            - CANCEL_ACCEPTED
          type: string
        updateDate:
          deprecated: true
          format: date-time
          type: string
      required:
        - compatId
        - lineItemId
        - orderId
        - previousLineItemDataId
        - productId
      type: object
    LineItemView:
      properties:
        businessSegment:
          type: string
        id:
          type: string
        name:
          type: string
        price:
          $ref: '#/components/schemas/PriceView'
        quantity:
          format: int32
          type: integer
      type: object
    MailRequest:
      properties:
        cancellationReason:
          description: Cancellation reason
          type: string
        paymentId:
          description: Payment id
          type: string
        preorderProductId:
          description: Product if the email is about specific product (preorder case)
          type: string
        template:
          description: Email template
          example: ORDERCONFIRMATION
          readOnly: true
          type: string
        to:
          description: Email send to
          example: nexway@nexway.com
          maxLength: 150
          minLength: 6
          readOnly: true
          type: string
      required:
        - template
        - to
      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
    Order:
      properties:
        allowPaymentMethodRegistration:
          description: Payment method registration authorized
          example: false
          type: boolean
        avaTaxStatus:
          description: Global status for tax workflow
          enum:
            - NONE
            - INITIALIZED
            - CREATION_PENDING
            - CREATION_FAILURE
            - CREATION_SCHEDULED
            - CREATION_ACCEPTED
            - CANCEL_PENDING
            - CANCEL_FAILURE
            - CANCEL_ACCEPTED
          type: string
        billingPlanId:
          description: External ID from Billing plan resource
          example: 25aaceea-5a34-11eb-ae93-0242ac130002
          type: string
        billingPlanPeriod:
          description: Billing plan period
          example: 2023-12
          type: string
        cancelPeriod:
          description: Cancel period in days
          example: 14
          format: int32
          type: integer
        cartId:
          description: External ID from Cart resource
          example: f3fb782e-5969-11eb-ae93-0242ac130002
          type: string
        cartIp:
          description: Cart IP
          example: 127.0.0.1
          type: string
        catalogId:
          description: External ID from Catalog resource
          example: 88960ca8-5af8-11eb-ae93-0242ac130002
          type: string
        consentFlags:
          $ref: '#/components/schemas/ConsentFlags'
        consentId:
          description: External ID from Consent resource
          example: 64f2d71c-5af9-11eb-ae93-0242ac130002
          type: string
        createDate:
          deprecated: true
          format: date-time
          type: string
        creditNoteDate:
          type: string
          writeOnly: true
        creditNotes:
          description: List of credit notes
          items:
            $ref: '#/components/schemas/CreditNote'
          type: array
          uniqueItems: true
        currency:
          description: Currency
          example: EUR, USD, GBP ...
          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
        customer:
          $ref: '#/components/schemas/Customer'
        customerName:
          type: string
        dbVersion:
          format: int64
          type: integer
        electronicInvoiceStatus:
          description: Global status for electronic invoice generation
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        emailCancellationStatus:
          description: Global status for email cancellation workflow
          enum:
            - NONE
            - INITIALIZED
            - CREATION_PENDING
            - CREATION_FAILURE
            - CREATION_SCHEDULED
            - CREATION_ACCEPTED
            - CANCEL_PENDING
            - CANCEL_FAILURE
            - CANCEL_ACCEPTED
          type: string
        emailConfirmationStatus:
          description: Global status for email purchase workflow
          enum:
            - NONE
            - INITIALIZED
            - CREATION_PENDING
            - CREATION_FAILURE
            - CREATION_SCHEDULED
            - CREATION_ACCEPTED
            - CANCEL_PENDING
            - CANCEL_FAILURE
            - CANCEL_ACCEPTED
          type: string
        emails:
          description: List of emails sent
          items:
            $ref: '#/components/schemas/Email'
          type: array
          uniqueItems: true
        endUser:
          $ref: '#/components/schemas/EndUser'
        endUserCreationStatus:
          description: Global status for endUser workflow
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        endUserIp:
          description: End-user IP used during purchase
          example: 127.0.0.1
          type: string
        externalContext:
          description: External context
          example: myExternalContext
          type: string
        fulfillmentStatus:
          description: Global status for fulfillment workflow
          enum:
            - NONE
            - INITIALIZED
            - CREATION_PENDING
            - CREATION_FAILURE
            - CREATION_SCHEDULED
            - CREATION_ACCEPTED
            - CANCEL_PENDING
            - CANCEL_FAILURE
            - CANCEL_ACCEPTED
          type: string
        fullCreditNoteStatus:
          description: Global status for credit note workflow
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        fullTotalAmount:
          $ref: '#/components/schemas/FullPrice'
        generationId:
          description: Subscription number generation
          example: '1'
          type: string
        geoZones:
          description: Set of geoZones label
          example: Africa
          items:
            description: Set of geoZones label
            example: Africa
            type: string
          type: array
          uniqueItems: true
        id:
          deprecated: true
          type: string
        invoice:
          $ref: '#/components/schemas/Invoice'
        invoiceStatus:
          description: Global status for invoice workflow
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        lastUpdateReason:
          type: string
        layout:
          description: Define if we used a subscription layout on cart
          type: string
        lifeCycleStatus:
          enum:
            - PREBILLING_PENDING
            - PREBILLING_FAILED
            - WAITING_FOR_PAYMENT
            - PAYMENT_PENDING
            - INVOICE_PENDING
            - ELECTRONIC_INVOICE_PENDING
            - ENDUSER_PENDING
            - SUBSCRIPTION_PENDING
            - FULFILLMENT_PENDING
            - EMAILCONFIRMATION_PENDING
            - COMPLETED_WITH_ERROR
            - COMPLETED
            - CANCEL_PENDING
            - CANCELED_WITH_ERROR
            - CANCELED
            - FORCE_COMPLETED
            - FORCE_CANCELED
            - FORCE_ABORTED
          type: string
        lineItems:
          description: List of products
          items:
            $ref: '#/components/schemas/LineItem'
          type: array
        marketingCampaignNames:
          description: marketing campaign names
          example:
            - mktop1
          items:
            description: marketing campaign names
            example: '["mktop1"]'
            type: string
          type: array
        maxPaymentsParts:
          description: Maximum payments parts
          example: 1
          format: int32
          type: integer
        minPartialPaymentAmount:
          description: Minimum payment amount
          example: 5
          format: double
          type: number
        modelVersion:
          deprecated: true
          type: string
        numberOfInstallments:
          description: Number of installments
          example: 1
          format: int32
          type: integer
        offerSubSource:
          description: >-
            Sub source that should be used for OFFER 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 used after a purchase
          example: https://my.website.com/confirmation
          type: string
        originalId:
          type: string
          writeOnly: true
        parentOrderId:
          description: Parent order reference ID
          example: 2G4NAYY4K23
          type: string
        payment:
          $ref: '#/components/schemas/Payment'
        paymentDeadline:
          description: Deadline timestamp to pay this order
          example: 1616143889109
          format: int64
          type: integer
        paymentDeadlineReached:
          type: boolean
        paymentOfflineReminderSent:
          description: boolean to lock the send payment offline email
          type: boolean
        paymentStatus:
          description: Global status for payment workflow
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        payments:
          description: List of payment attempts
          items:
            $ref: '#/components/schemas/Payment'
          type: array
          uniqueItems: true
        prebillingStatus:
          description: Global status for pre-billing processing workflow
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        price:
          type: string
          writeOnly: true
        promoteOneClickPayment:
          description: Payment method registration authorized
          example: false
          type: boolean
        registerPaymentMethodStatus:
          description: Global status for payment method registration workflow
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        remainingTotalAmount:
          format: double
          type: number
        remitteds:
          description: List of remitteds
          items:
            $ref: '#/components/schemas/Remitted'
          type: array
        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 workflow
          example: acquisition
          type: string
        source:
          description: Purchase type used for the order
          enum:
            - BILLING_PLAN
            - MANUAL_RENEWAL
            - MID_TERM_UPGRADE
            - OFFER
            - PURCHASE
            - SUBSCRIPTION
          example: PURCHASE | SUBSCRIPTION | MANUAL_RENEWAL | BILLING_PLAN | OFFER
          type: string
        status:
          description: General Status
          enum:
            - CANCELED_WITH_ERROR
            - CANCEL_PENDING
            - CANCELED
            - PARTIAL_CANCELED
            - PARTIAL_COMPLETED
            - COMPLETED
            - ABORTED
            - PENDING_WITH_ERROR
            - PENDING
            - FRAUD_PENDING
            - PAYMENT_PENDING
            - PAYMENT_REFUSED
            - CREATED
            - FORCE_COMPLETED
            - FORCE_CANCELED
          type: string
        store:
          $ref: '#/components/schemas/Store'
        storeHostname:
          description: Store hostname
          example: mystore.nexway.com
          type: string
        subscriptionId:
          description: External ID from Subscription resource
          example: 119e3e2a-596a-11eb-ae93-0242ac130002
          type: string
        subscriptionLayout:
          description: Only used for subscription receipt confirmation if true
          type: boolean
        subscriptionStatus:
          description: Global status for subscription workflow
          enum:
            - NONE
            - INITIALIZED
            - CREATION_PENDING
            - CREATION_FAILURE
            - CREATION_SCHEDULED
            - CREATION_ACCEPTED
            - CANCEL_PENDING
            - CANCEL_FAILURE
            - CANCEL_ACCEPTED
          type: string
        subscriptionSubSource:
          description: Sub source of the subscription used to apply discount
          enum:
            - TRIAL_CONVERSION
            - RENEWAL
          example: TRIAL_CONVERSION | RENEWAL
          type: string
        subsidiaryId:
          description: External ID from Subsidiary resource
          example: d4beee32-5969-11eb-ae93-0242ac130002
          type: string
        taxDeclaration:
          $ref: '#/components/schemas/TaxDeclaration'
        taxTransactionId:
          description: Avalara transaction code
          example: 288d5056-d9c5-46c7-b7d8-954f45f399a4
          type: string
        taxTypes:
          description: Tax type
          items:
            $ref: '#/components/schemas/TaxType'
          type: array
        testOrder:
          default: false
          description: To show if the order is test
          type: boolean
        totalAmount:
          description: Total amount
          example: 102.5
          format: double
          type: number
        updateDate:
          deprecated: true
          format: date-time
          type: string
        vatRate:
          description: VAT rate
          example: 0.2
          format: double
          type: number
        warnings:
          description: List of additional fields with a wrong format
          items:
            $ref: '#/components/schemas/Warning'
          type: array
      required:
        - currency
        - fullTotalAmount
        - totalAmount
        - vatRate
      type: object
    OrderCreationRequest:
      properties:
        allowPaymentMethodRegistration:
          description: Payment method registration authorized
          type: boolean
        cartId:
          description: Reference ID of cart service
          type: string
        cartVersion:
          description: Cart version
          format: int64
          type: integer
        endUserId:
          description: Reference ID of the end-user
          type: string
        endUserIp:
          description: End-user IP used during purchase
          type: string
        generationId:
          description: Declarative reference ID of the generation of the subscription
          type: string
        layout:
          description: Define if we used a subscription layout on cart
          type: string
        paymentDeadline:
          description: Payment deadline (timestamp)
          format: int64
          type: integer
        paymentMethodId:
          description: >-
            Payment method reference ID of end-user wallet payment method to use
            to process payment
          type: string
        previousOrderId:
          description: >-
            Previous order reference ID to re-use payment method to process
            payment
          type: string
        subscriptionId:
          description: Reference ID of subscription service
          type: string
        subscriptionLayout:
          description: Only used for receipt confirmation if true
          type: boolean
        subscriptionSubSource:
          description: Purchase's sub source
          enum:
            - TRIAL_CONVERSION
            - RENEWAL
          example: TRIAL_CONVERSION,RENEWAL
          type: string
        withPrebilling:
          description: Request pre-billing step execution
          type: boolean
      type: object
    OrderCriteria:
      properties:
        id:
          type: string
        subscriptionId:
          type: string
      type: object
    OrderSummary:
      properties:
        billingPlanId:
          type: string
        billingPlanPeriod:
          type: string
        consentId:
          type: string
        currency:
          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
        enduserId:
          type: string
        fullCreditNodeId:
          type: string
        fullTotalAmount:
          $ref: '#/components/schemas/FullPrice'
        id:
          type: string
        invoiceId:
          type: string
        lifeCycleStatus:
          enum:
            - PREBILLING_PENDING
            - PREBILLING_FAILED
            - WAITING_FOR_PAYMENT
            - PAYMENT_PENDING
            - INVOICE_PENDING
            - ELECTRONIC_INVOICE_PENDING
            - ENDUSER_PENDING
            - SUBSCRIPTION_PENDING
            - FULFILLMENT_PENDING
            - EMAILCONFIRMATION_PENDING
            - COMPLETED_WITH_ERROR
            - COMPLETED
            - CANCEL_PENDING
            - CANCELED_WITH_ERROR
            - CANCELED
            - FORCE_COMPLETED
            - FORCE_CANCELED
            - FORCE_ABORTED
          type: string
        products:
          items:
            $ref: '#/components/schemas/ProductSummary'
          type: array
        status:
          enum:
            - CANCELED_WITH_ERROR
            - CANCEL_PENDING
            - CANCELED
            - PARTIAL_CANCELED
            - PARTIAL_COMPLETED
            - COMPLETED
            - ABORTED
            - PENDING_WITH_ERROR
            - PENDING
            - FRAUD_PENDING
            - PAYMENT_PENDING
            - PAYMENT_REFUSED
            - CREATED
            - FORCE_COMPLETED
            - FORCE_CANCELED
          type: string
        storeId:
          type: string
        subscriptionId:
          type: string
      type: object
    OrderView:
      properties:
        Order currency:
          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
        Order id:
          type: string
        Order products:
          items:
            $ref: '#/components/schemas/ProductView'
          type: array
        Order status:
          enum:
            - CANCELED_WITH_ERROR
            - CANCEL_PENDING
            - CANCELED
            - PARTIAL_CANCELED
            - PARTIAL_COMPLETED
            - COMPLETED
            - ABORTED
            - PENDING_WITH_ERROR
            - PENDING
            - FRAUD_PENDING
            - PAYMENT_PENDING
            - PAYMENT_REFUSED
            - CREATED
            - FORCE_COMPLETED
            - FORCE_CANCELED
          type: string
        Order total amount:
          format: double
          type: number
        fullTotalAmount:
          $ref: '#/components/schemas/FullPriceView'
      type: object
    OrderWrapper:
      properties:
        lineItemDataList:
          items:
            $ref: '#/components/schemas/LineItemData'
          type: array
        order:
          $ref: '#/components/schemas/Order'
      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
    Payment:
      properties:
        actionRequired:
          description: end user action is required for this payment
          type: boolean
        amount:
          description: Amount of the processed payment
          format: double
          type: number
        asyncContext:
          type: string
        captured:
          description: Is payment captured
          type: boolean
        delayToNotify:
          description: delay to notify enduser if an action is required
          format: int32
          type: integer
        externalContext:
          description: External context
          type: string
        informativeDPStatus:
          description: Estimated payment status in DP
          type: string
        informativeFraudCheck:
          description: Has Fraud step
          type: boolean
        magicalCardDetected:
          description: Is magical card
          type: boolean
        mailPaymentConfirmationStatus:
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        mailPaymentFailureStatus:
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        methodId:
          description: >-
            Reference ID of the payment method in end-user wallet used to
            process payment
          type: string
        methodType:
          deprecated: true
          description: Payment type used (Visa, PayPal, etc.)
          type: string
        onPaymentClickRedirectUrl:
          description: redirection url once payment page is closed
          type: string
        paymentId:
          description: Reference ID of the payment attempt
          type: string
        paymentTypeId:
          description: Payment type used (Visa, PayPal, etc.)
          type: string
        previousOrderId:
          description: ID of previous order used to process payment
          type: string
        processingEvent:
          description: List of payment processing events
          items:
            $ref: '#/components/schemas/ProcessingEvent'
          type: array
          uniqueItems: true
        proformaError:
          type: string
        proformaId:
          type: string
        refundStatus:
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        remitteds:
          description: Details for sharing for this payment
          items:
            $ref: '#/components/schemas/Remitted'
          type: array
        replayedTransactionId:
          description: Reference ID of the replayed payment
          type: string
        status:
          description: >-
            Payment status
            NONE/INITIALIZED/PENDING/PARTIAL_COMPLETED/FAILED/COMPLETED/ABORTED
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          type: string
        transactionId:
          description: Reference ID of payment service
          type: string
        transitionPaymentDate:
          format: date-time
          type: string
      type: object
    PrebillingParameters:
      properties:
        generation:
          type: string
        subscription:
          $ref: '#/components/schemas/Subscription'
      type: object
    PrepareForRepairRequest:
      properties:
        endUser:
          $ref: '#/components/schemas/EndUser'
        resetFulfillmentCancellationRequest:
          $ref: '#/components/schemas/ResetFulfillmentCancellationRequest'
        resetInvoice:
          type: boolean
        resyncCustomer:
          type: boolean
        resyncEndUser:
          type: boolean
        resyncProducts:
          type: boolean
        resyncStore:
          type: boolean
        subsidiaryId:
          pattern: ^[0-9]{1,3}$
          type: string
        updateEndUser:
          type: boolean
        updatePaymentDeadlineRequest:
          $ref: '#/components/schemas/UpdatePaymentDeadlineRequest'
      type: object
    PriceView:
      properties:
        currency:
          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
        grossPrice:
          format: double
          type: number
        mandateValue:
          format: double
          type: number
        netPrice:
          format: double
          type: number
        vatAmount:
          format: double
          type: number
        vatRate:
          format: double
          type: number
      type: object
    ProcessingEvent:
      description: List of payment processing events
      properties:
        createDate:
          description: Date of creation
          format: int64
          readOnly: true
          type: integer
        message:
          description: Message
          readOnly: true
          type: string
        metadata:
          additionalProperties:
            type: object
          type: object
        name:
          description: Name
          readOnly: true
          type: string
        source:
          description: Source
          readOnly: true
          type: string
        status:
          description: Status
          readOnly: true
          type: string
      required:
        - name
      type: object
    ProcessingEvents:
      items:
        $ref: '#/components/schemas/ProcessingEvent'
      properties:
        empty:
          type: boolean
        first:
          $ref: '#/components/schemas/ProcessingEvent'
        last:
          $ref: '#/components/schemas/ProcessingEvent'
      type: array
    ProductCustomFields:
      properties:
        createDate:
          deprecated: true
          format: date-time
          type: string
        customFields:
          additionalProperties:
            type: object
          type: object
        customFieldsId:
          type: string
        dbVersion:
          format: int64
          type: integer
        id:
          deprecated: true
          type: string
        lastUpdateReason:
          type: string
        modelVersion:
          deprecated: true
          type: string
        orderId:
          type: string
        originalId:
          type: string
          writeOnly: true
        updateDate:
          deprecated: true
          format: date-time
          type: string
      type: object
    ProductSummary:
      properties:
        fullPrice:
          $ref: '#/components/schemas/FullPrice'
        id:
          type: string
        priceFunctionParameters:
          additionalProperties:
            type: string
          type: object
        quantity:
          format: int32
          type: integer
        trial:
          type: boolean
        trialDuration:
          format: int32
          type: integer
        unitPrice:
          $ref: '#/components/schemas/FullPrice'
      type: object
    ProductView:
      properties:
        Business segment:
          type: string
        Discount amount:
          format: double
          type: number
        Discount rate:
          format: double
          type: number
        Long desc:
          type: string
        Product family:
          type: string
        Product id:
          type: string
        Product licenseNextExpirationDate:
          type: string
        Product lifetime:
          type: string
        Product name:
          type: string
        Quantity:
          format: int32
          type: integer
        Short desc:
          type: string
        Subscription expiration date:
          format: date-time
          type: string
        Subscription template:
          type: string
        Variable details:
          additionalProperties:
            $ref: '#/components/schemas/VariableDetails'
          type: object
        price:
          $ref: '#/components/schemas/FullPriceView'
        renewingPrice:
          $ref: '#/components/schemas/FullPriceView'
        resources:
          items:
            $ref: '#/components/schemas/Resource'
          type: array
          uniqueItems: true
      type: object
    RecapEntry:
      properties:
        count:
          format: int32
          type: integer
        targetValue:
          type: string
      type: object
    RelatedContent:
      description: Links for downloading product-related content file
      properties:
        file:
          description: URL or file name with extension for downloading
          type: string
        label:
          description: Text that explains what this binary is
          type: string
      type: object
    Remitted:
      description: List of remitteds
      properties:
        id:
          type: string
        name:
          type: string
        remittanceAmount:
          format: double
          type: number
        remittanceRate:
          format: double
          type: number
        round:
          format: int64
          type: integer
      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
    ResetFulfillmentCancellationRequest:
      properties:
        lineItemDataIdToReset:
          type: string
        resetFulfillmentCancellation:
          type: boolean
        subLineItemDataIdToReset:
          type: string
      type: object
    Resource:
      properties:
        url:
          type: string
      type: object
    Route:
      description: routes list
      properties:
        hostname:
          type: string
        pathPrefix:
          type: string
      type: object
    SearchOrderView:
      properties:
        createdDate:
          format: date-time
          type: string
        currency:
          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
        id:
          type: string
        lifeCycleStatus:
          enum:
            - PREBILLING_PENDING
            - PREBILLING_FAILED
            - WAITING_FOR_PAYMENT
            - PAYMENT_PENDING
            - INVOICE_PENDING
            - ELECTRONIC_INVOICE_PENDING
            - ENDUSER_PENDING
            - SUBSCRIPTION_PENDING
            - FULFILLMENT_PENDING
            - EMAILCONFIRMATION_PENDING
            - COMPLETED_WITH_ERROR
            - COMPLETED
            - CANCEL_PENDING
            - CANCELED_WITH_ERROR
            - CANCELED
            - FORCE_COMPLETED
            - FORCE_CANCELED
            - FORCE_ABORTED
          type: string
        lineItems:
          items:
            $ref: '#/components/schemas/LineItemView'
          type: array
        status:
          enum:
            - CANCELED_WITH_ERROR
            - CANCEL_PENDING
            - CANCELED
            - PARTIAL_CANCELED
            - PARTIAL_COMPLETED
            - COMPLETED
            - ABORTED
            - PENDING_WITH_ERROR
            - PENDING
            - FRAUD_PENDING
            - PAYMENT_PENDING
            - PAYMENT_REFUSED
            - CREATED
            - FORCE_COMPLETED
            - FORCE_CANCELED
          type: string
        totalAmount:
          format: double
          type: number
      type: object
    SearchResultCancellationReason:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CancellationReason'
          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
    SearchResultHistory:
      properties:
        items:
          items:
            $ref: '#/components/schemas/History'
          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
    SearchResultLineItemData:
      properties:
        items:
          items:
            $ref: '#/components/schemas/LineItemData'
          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
    SearchResultOrder:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Order'
          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
    SearchResultSearchOrderView:
      properties:
        items:
          items:
            $ref: '#/components/schemas/SearchOrderView'
          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
    Store:
      description: Store information
      properties:
        allowOrderDetailsOnCheckoutConfirmation:
          description: Allow order Details on checkout confirmation (TRUE/FALSE)
          type: boolean
        allowQuotes:
          description: Allow quotes (TRUE/FALSE)
          type: boolean
          writeOnly: true
        bannerInvoice:
          description: Invoice banner
          type: string
        bannerOrderConfEmail:
          description: Order confirmation banner
          type: string
        id:
          description: Reference ID of store service
          type: string
        multiplePaymentsValidityDuration:
          description: Multiple payments validity duration ( days )
          format: int64
          type: integer
          writeOnly: true
        name:
          description: Name
          type: string
        quoteSubscriptionValidityDuration:
          description: Quote subscription validity duration ( days )
          format: int64
          type: integer
          writeOnly: true
        quoteValidityDuration:
          description: Quote validity duration ( days )
          format: int64
          type: integer
          writeOnly: true
        retryPaymentValidityDuration:
          description: Retry payment validity duration ( days )
          format: int64
          type: integer
          writeOnly: true
        routes:
          description: routes list
          items:
            $ref: '#/components/schemas/Route'
          type: array
          writeOnly: true
      required:
        - id
      type: object
    Subscription:
      properties:
        amount:
          format: double
          type: number
        billingPlanId:
          type: string
        billingPlanPeriod:
          type: string
        cancelPeriod:
          format: int32
          type: integer
        cartIp:
          type: string
        catalogId:
          type: string
        consentFlags:
          $ref: '#/components/schemas/ConsentFlags'
        country:
          type: string
        currency:
          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
        endUser:
          $ref: '#/components/schemas/EndUser'
        endUserId:
          type: string
        enduserId:
          type: string
          writeOnly: true
        expirationDate:
          format: date-time
          type: string
        externalContext:
          type: string
        generationId:
          type: string
        id:
          type: string
        lifecycle:
          $ref: '#/components/schemas/Lifecycle'
        locale:
          type: string
        maxPaymentsParts:
          format: int32
          type: integer
        minPartialPaymentAmount:
          format: double
          type: number
        nextProducts:
          items:
            $ref: '#/components/schemas/WantedProduct'
          type: array
        notReadyForOrderCauseMessage:
          type: string
        numberOfInstallments:
          format: int32
          type: integer
        offerSubSource:
          enum:
            - SUSPEND
            - RESUME
          type: string
        onPaymentClickRedirectUrl:
          type: string
        paymentDeadline:
          format: int64
          type: integer
        price:
          $ref: '#/components/schemas/FullPrice'
        products:
          items:
            $ref: '#/components/schemas/WantedProduct'
          type: array
        promoteOneClickPayment:
          type: boolean
        remitteds:
          items:
            $ref: '#/components/schemas/Remitted'
          type: array
        salesFlags:
          items:
            type: string
          type: array
        scenario:
          type: string
        source:
          enum:
            - BILLING_PLAN
            - MANUAL_RENEWAL
            - MID_TERM_UPGRADE
            - OFFER
            - PURCHASE
            - SUBSCRIPTION
          type: string
        storeHostname:
          type: string
        storeId:
          type: string
        subscriptionId:
          type: string
        subsidiaryId:
          type: string
        taxTypes:
          items:
            $ref: '#/components/schemas/TaxType'
          type: array
        totalAmount:
          format: double
          type: number
      type: object
    TaxDeclaration:
      description: Tax declaration details
      properties:
        additionalProperties:
          additionalProperties:
            description: Map of broker-specific information
            type: string
          description: Map of broker-specific information
          type: object
        broker:
          description: Tax declaration broker
          example: AVALARA
          type: string
        refundStatus:
          description: Credit note / refund declaration status
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          example: FAILED
          type: string
        refundTransactionId:
          description: Credit note / refund declaration transaction id
          example: FR-20-001261481
          type: string
        status:
          description: Invoice / purchase declaration status
          enum:
            - NONE
            - INITIALIZED
            - PENDING
            - PARTIAL_COMPLETED
            - FAILED
            - COMPLETED
            - ABORTED
            - COMMITTED
            - NOT_COMMITTED
            - COMMITMENT_FAILED
            - REFUNDED
            - REFUND_FAILED
          example: COMPLETED
          type: string
        transactionId:
          description: Invoice / purchase declaration transaction id
          example: FR-21-001514102
          type: string
      type: object
    TaxType:
      description: Tax type
      properties:
        amount:
          format: double
          type: number
        rate:
          format: double
          type: number
        taxName:
          type: string
      type: object
    UpdatePaymentDeadlineRequest:
      properties:
        paymentDeadline:
          format: int64
          type: integer
        updatePaymentDeadline:
          type: boolean
      type: object
    VariableDetails:
      description: Product variables
      properties:
        desc:
          type: string
        label:
          type: string
        value:
          type: object
      type: object
    Voucher:
      description: Discount list and voucher total amount
      properties:
        discounts:
          items:
            $ref: '#/components/schemas/Discount'
          type: array
          uniqueItems: true
        totalAmount:
          format: double
          type: number
      readOnly: true
      type: object
    WantedProduct:
      properties:
        id:
          type: string
        licenseId:
          type: string
          writeOnly: true
        lineItemId:
          type: string
          writeOnly: true
        previousLineItemId:
          type: string
          writeOnly: true
        priceFunctionParameters:
          additionalProperties:
            type: string
          type: object
        quantity:
          format: int32
          type: integer
      type: object
    Warning:
      description: List of additional fields with a wrong format
      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 monetize orders
  license:
    name: Nexway License Version 1.0
  title: Order
  version: '1.0'
openapi: 3.0.1
paths:
  /ordersv2:
    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
        - description: Filter orders by endUser email
          in: query
          name: endUser.email
        - description: Filter orders by endUser country
          in: query
          name: endUser.country
        - description: Filter orders by endUser accountCreated
          in: query
          name: endUser.accountCreated
        - description: Filter orders by customer id
          in: query
          name: customer.id
        - description: Filter orders by lineItem id
          in: query
          name: lineItem.id
        - description: Filter orders by lineItem previousLineItemId
          in: query
          name: lineItem.previousLineItemId
        - description: Filter orders by lineItem subscriptionTemplate
          in: query
          name: lineItem.subscriptionTemplate
        - description: Filter orders by lineItem subscriptionId
          in: query
          name: lineItem.subscriptionId
        - description: Filter orders by lineItem publisherRefId
          in: query
          name: lineItem.publisherRefId
        - description: Filter orders by lineItem nexwayFulfillmentId
          in: query
          name: lineItem.nexwayFulfillmentId
        - description: Filter orders by lineItem publisherFulfillmentId
          in: query
          name: lineItem.publisherFulfillmentId
        - description: Filter orders by lineItem fulfillmentTemplate
          in: query
          name: lineItem.fulfillmentTemplate
        - description: Filter orders by lineItem activationCode
          in: query
          name: lineItem.activationCode
        - description: Filter orders by emailId
          in: query
          name: email.emailId
        - description: Filter orders by invoice id
          in: query
          name: invoice.id
        - description: Filter orders by creditNote id
          in: query
          name: creditNote.id
        - description: Filter orders  creditNote cancellationReason
          in: query
          name: creditNote.cancellationReason
        - description: Filter orders  creditNote date
          in: query
          name: creditNote.date
        - description: Filter orders by currency
          in: query
          name: currency
        - description: Filter orders by cartId
          in: query
          name: cartId
        - description: Filter orders by subscriptionId
          in: query
          name: subscriptionId
        - description: 'Filter orders by generationId '
          in: query
          name: generationId
        - description: >-
            Filter orders by status
            (CANCELED_WITH_ERROR/CANCEL_PENDING/CANCELED/PARTIAL_CANCELED/PARTIAL_COMPLETED/COMPLETED/ABORTED/PENDING_WITH_ERROR/PENDING/FRAUD_PENDING/PAYMENT_PENDING/PAYMENT_REFUSED/CREATED/FORCE_COMPLETED/FORCE_CANCELED)
          in: query
          name: status
        - description: >-
            Filter orders by source
            (PURCHASE/SUBSCRIPTION/MANUAL_RENEWAL/BILLING_PLAN)
          in: query
          name: source
        - description: Filter orders by catalogId
          in: query
          name: catalogId
        - description: Filter orders by consentId
          in: query
          name: consentId
        - description: Filter orders by billingPlanId
          in: query
          name: billingPlanId
        - description: >-
            Filter orders by billingPlanPeriod You can use date ranges by using
            < or << operator, examples: billingPlanPeriod=XXXX< will return
            orders starting after XXXX, billingPlanPeriod=<XXXX will return
            orders starting before XXXX, billingPlanPeriod=XXXX<<YYYYY will
            return orders starting between XXXX and YYYY
          in: query
          name: billingPlanPeriod
        - description: >-
            Filter orders by status
            (PREBILLING_PENDING/PREBILLING_FAILED/PREBILLING_FAILED/WAITING_FOR_PAYMENT/PARTIAL_COMPLETED/PAYMENT_PENDING/INVOICE_PENDING/ENDUSER_PENDING/SUBSCRIPTION_PENDING/FULFILLMENT_PENDING/EMAILCONFIRMATION_PENDING/COMPLETED_WITH_ERROR/COMPLETED/CANCEL_PENDING/CANCELED_WITH_ERROR/CANCELED/FORCE_COMPLETED/FORCE_CANCELED/FORCE_ABORTED)
          in: query
          name: lifeCycleStatus
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultOrder'
          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:
        - Order
      x-operationWeight: '300'
    post:
      operationId: createItem
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderCreationRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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:
        - Order
      x-operationWeight: '300'
  /ordersv2/cancellationReason:
    post:
      operationId: createItem_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancellationReason'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancellationReason'
          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:
        - CancellationReason
      x-operationWeight: '300'
  /ordersv2/cancellationReason/distinct:
    get:
      operationId: distinct_3
      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:
        - CancellationReason
      x-operationWeight: '100'
  /ordersv2/cancellationReason/public:
    get:
      operationId: getItems_3
      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/SearchResultCancellationReason'
          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:
        - CancellationReason
      x-operationWeight: '300'
  /ordersv2/cancellationReason/public/{cancellationReasonId}:
    get:
      description: >-
        Get a cancellation reason with public access, by id or
        cancellationReasonId
      operationId: getPublicCancellationReason
      parameters:
        - description: id or cancellationReasonId
          example: 7d180bdd-3d82-41f5-8159-f0ab22ffb266 or an integer
          in: path
          name: cancellationReasonId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancellationReason'
          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
      summary: Get a cancellation reason
      tags:
        - CancellationReason
      x-operationWeight: '210'
  /ordersv2/cancellationReason/recap:
    get:
      operationId: recap_3
      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:
        - CancellationReason
      x-operationWeight: '150'
  /ordersv2/cancellationReason/unwind:
    get:
      operationId: unwind_3
      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:
        - CancellationReason
      x-operationWeight: '150'
  /ordersv2/cancellationReason/{id}:
    delete:
      operationId: deleteItem_2
      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:
        - CancellationReason
      x-operationWeight: '500'
    get:
      operationId: getItem_3
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancellationReason'
          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:
        - CancellationReason
      x-operationWeight: '200'
    put:
      operationId: updateItem_2
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancellationReason'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancellationReason'
          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: Update item
      tags:
        - CancellationReason
      x-operationWeight: '400'
  /ordersv2/distinct:
    get:
      operationId: distinct_2
      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:
        - Order
      x-operationWeight: '100'
  /ordersv2/events-history:
    get:
      operationId: getItems_2
      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/SearchResultHistory'
          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:
        - ProcessingEventHistory
      x-operationWeight: '300'
  /ordersv2/events-history/distinct:
    get:
      operationId: distinct_1
      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:
        - ProcessingEventHistory
      x-operationWeight: '100'
  /ordersv2/events-history/recap:
    get:
      operationId: recap_2
      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:
        - ProcessingEventHistory
      x-operationWeight: '150'
  /ordersv2/events-history/unwind:
    get:
      operationId: unwind_2
      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:
        - ProcessingEventHistory
      x-operationWeight: '150'
  /ordersv2/events-history/{id}:
    get:
      operationId: getItem_2
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/History'
          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:
        - ProcessingEventHistory
      x-operationWeight: '200'
  /ordersv2/lineItemData/{lineItemDataId}/addevents:
    put:
      operationId: addEventsOnLineItemData
      parameters:
        - in: path
          name: lineItemDataId
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: resource update thru REST Api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessingEvents'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemData'
          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: Update one line item data
      tags:
        - Order
      x-operationWeight: '700'
      x-privateApi: 'true'
  /ordersv2/lineItemData/{lineItemDataId}/subLineItemData/{subLineItemDataId}/addevents:
    put:
      operationId: addEventsOnSubLineItemData
      parameters:
        - in: path
          name: lineItemDataId
          required: true
          schema:
            type: string
        - in: path
          name: subLineItemDataId
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: resource update thru REST Api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessingEvents'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemData'
          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: Update one sub line item data
      tags:
        - Order
      x-operationWeight: '900'
      x-privateApi: 'true'
  /ordersv2/lineitemdata:
    get:
      operationId: getItems_1
      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
        - description: Filter lineItems by endUser email
          in: query
          name: endUser.email
        - description: Filter lineItems by endUser country
          in: query
          name: endUser.country
        - description: Filter lineItems by endUser accountCreated
          in: query
          name: endUser.accountCreated
        - description: Filter lineItems by customer id
          in: query
          name: customer.id
        - description: Filter lineItem id
          in: query
          name: id
        - description: Filter lineItem by lineItemId
          in: query
          name: lineItemId
        - description: Filter lineItem by orderId
          in: query
          name: orderId
        - description: Filter lineItemData by subLineItemData flag
          in: query
          name: subLineItemsData
        - description: Filter lineItem subscriptionId
          in: query
          name: subscriptionId
        - description: Filter by lineItem nexwayFulfillmentId
          in: query
          name: nexwayFulfillmentId
        - description: Filter lineItem publisherFulfillmentId
          in: query
          name: publisherFulfillmentId
        - description: Filter lineItem activationCode
          in: query
          name: activationCode
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultLineItemData'
          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:
        - LineItemData
      x-operationWeight: '300'
  /ordersv2/lineitemdata/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:
        - LineItemData
      x-operationWeight: '100'
  /ordersv2/lineitemdata/order/{orderId}:
    get:
      operationId: getItemsByOrderId
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/LineItemData'
                type: array
          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 line items data by orderId
      tags:
        - LineItemData
      x-operationWeight: '300'
  /ordersv2/lineitemdata/order/{orderId}/compat/{compatId}:
    get:
      operationId: getItemByOrderIdAndCompatId
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - in: path
          name: compatId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemData'
          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 line item data by orderId and compatId or id
      tags:
        - LineItemData
      x-operationWeight: '300'
  /ordersv2/lineitemdata/order/{orderId}/compat/{compatId}/subline:
    get:
      operationId: getItemOrSubItemByOrderIdAndCompatId
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - in: path
          name: compatId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemData'
          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 line item data by orderId and compatId or id includes sub line item
        data
      tags:
        - LineItemData
      x-operationWeight: '300'
  /ordersv2/lineitemdata/order/{orderId}/count:
    get:
      operationId: countItemsWithPredicate
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - 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: Count line item data by orderId and predicate
      tags:
        - LineItemData
      x-operationWeight: '300'
  /ordersv2/lineitemdata/recap:
    get:
      operationId: recap_1
      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:
        - LineItemData
      x-operationWeight: '150'
  /ordersv2/lineitemdata/unwind:
    get:
      operationId: unwind_1
      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:
        - LineItemData
      x-operationWeight: '150'
  /ordersv2/lineitemdata/{id}:
    delete:
      operationId: deleteItem_1
      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:
        - LineItemData
      x-operationWeight: '500'
    get:
      operationId: getItem_1
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemData'
          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:
        - LineItemData
      x-operationWeight: '200'
    put:
      operationId: updateItem_1
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItemData'
          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: Update item
      tags:
        - LineItemData
      x-operationWeight: '400'
  /ordersv2/migrate:
    get:
      operationId: migrateOrders
      parameters:
        - in: query
          name: reason
          required: false
          schema:
            default: migration thru REST Api
            type: string
      responses:
        '200':
          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: Start order migration
      tags:
        - Order
      x-operationWeight: '200'
  /ordersv2/migrate/from/{startDate}/to/{endDate}:
    get:
      operationId: migrateOrders_2
      parameters:
        - in: path
          name: startDate
          required: true
          schema:
            type: string
        - in: path
          name: endDate
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: migration thru REST Api
            type: string
      responses:
        '200':
          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: Start order migration by timeframe
      tags:
        - Order
      x-operationWeight: '200'
  /ordersv2/migrate/to/{endDate}:
    get:
      operationId: migrateOrders_1
      parameters:
        - in: path
          name: endDate
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: migration thru REST Api
            type: string
      responses:
        '200':
          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: Start order migration by timeframe
      tags:
        - Order
      x-operationWeight: '200'
  /ordersv2/migrate/{orderId}:
    get:
      operationId: migrateOrder
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: migration thru REST Api
            type: string
      responses:
        '200':
          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: Start order migration by timeframe
      tags:
        - Order
      x-operationWeight: '200'
  /ordersv2/public/{id}:
    get:
      operationId: getOrderInfo
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderView'
          description: Success
        '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 order public details by order ID
      tags:
        - ApiPublicCommand
  /ordersv2/public/{orderId}/custom-fields:
    get:
      description: Get custom fields by order ID
      operationId: getCustomFieldsByOrderId
      parameters:
        - description: filter by order ID
          in: path
          name: orderId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductCustomFields'
          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
        '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
      summary: Get custom fields
      tags:
        - ApiPublicCommand
  /ordersv2/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:
        - Order
      x-operationWeight: '150'
  /ordersv2/releaselock:
    get:
      operationId: releaseMigrationLock
      responses:
        '200':
          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: Release lock on migration procedure
      tags:
        - Order
      x-operationWeight: '200'
  /ordersv2/resync/{orderId}:
    get:
      operationId: resync
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: sync thru REST Api
            type: string
      responses:
        '200':
          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: Resync order v2 to v1
      tags:
        - Order
      x-operationWeight: '200'
  /ordersv2/subscription:
    post:
      deprecated: true
      operationId: createSubscriptionOrder
      parameters:
        - in: query
          name: reason
          required: false
          schema:
            default: resource creation thru REST Api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderWrapper'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          description: Success
          headers:
            Location:
              description: link to the new Order ref
              style: simple
        '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 order
      tags:
        - Order
      x-operationWeight: '700'
      x-privateApi: 'true'
  /ordersv2/subscriptions/price:
    post:
      operationId: getSubscriptionRenewalPrice
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrebillingParameters'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FullPrice'
          description: Success
          headers:
            Location:
              description: link to the new Order ref
              style: simple
        '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 subscription renewal price (applicable before the prebilling )
      tags:
        - Order
      x-operationWeight: '700'
      x-privateApi: 'true'
  /ordersv2/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:
        - Order
      x-operationWeight: '150'
  /ordersv2/views/orders:
    get:
      operationId: getOrders
      parameters:
        - in: query
          name: orderCriteria
          required: true
          schema:
            $ref: '#/components/schemas/OrderCriteria'
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultSearchOrderView'
          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
      tags:
        - Order
  /ordersv2/views/remittable/{id}/unpayoutableBalance:
    get:
      operationId: viewRemittableUnpayoutableBalance
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AccountAmount'
                type: array
                uniqueItems: true
          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
      tags:
        - Order
  /ordersv2/views/subscription/{subscriptionId}/oldest:
    get:
      operationId: getOldestOrderBySubscriptionId
      parameters:
        - in: path
          name: subscriptionId
          required: true
          schema:
            type: string
        - in: query
          name: lifeCycleStatus
          required: true
          schema:
            enum:
              - PREBILLING_PENDING
              - PREBILLING_FAILED
              - WAITING_FOR_PAYMENT
              - PAYMENT_PENDING
              - INVOICE_PENDING
              - ELECTRONIC_INVOICE_PENDING
              - ENDUSER_PENDING
              - SUBSCRIPTION_PENDING
              - FULFILLMENT_PENDING
              - EMAILCONFIRMATION_PENDING
              - COMPLETED_WITH_ERROR
              - COMPLETED
              - CANCEL_PENDING
              - CANCELED_WITH_ERROR
              - CANCELED
              - FORCE_COMPLETED
              - FORCE_CANCELED
              - FORCE_ABORTED
            type: string
        - in: query
          name: generationId
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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
      tags:
        - Order
  /ordersv2/views/{id}/summary:
    get:
      operationId: getOrderSummary
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderSummary'
          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
      tags:
        - Order
  /ordersv2/views/{orderId}/previous-lineitem-generation/subscription/{subscriptionId}:
    get:
      operationId: findPreviousGenerationLineItemByOrderAndSubscription
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - in: path
          name: subscriptionId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LineItem'
          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
      tags:
        - Order
  /ordersv2/{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:
        - Order
      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/Order'
          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:
        - Order
      x-operationWeight: '200'
    put:
      operationId: updateItem
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Update item
      tags:
        - Order
      x-operationWeight: '400'
  /ordersv2/{id}/addevent:
    post:
      operationId: addOrderEvent
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: dbVersion
          required: false
          schema:
            format: int64
            type: integer
        - in: query
          name: reason
          required: false
          schema:
            default: additional event thru REST Api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessingEvent'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Add event to order
      tags:
        - Order
      x-operationWeight: '500'
      x-privateApi: 'true'
  /ordersv2/{id}/email/send:
    post:
      operationId: resendEmail
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: send email thru REST Api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MailRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          description: Success
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          description: Accepted
        '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: Resend email of the order
      tags:
        - Order
      x-operationWeight: '350'
      x-privateApi: 'true'
  /ordersv2/{id}/fullcancel:
    post:
      operationId: fullCancelOrder
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: dbVersion
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: cancellationReason
          required: false
          schema:
            default: OCL
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: full cancel thru REST Api
            type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          description: Accepted
        '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: Cancel completely an order
      tags:
        - Order
      x-operationWeight: '300'
      x-privateApi: 'true'
  /ordersv2/{id}/prepareforrepair:
    post:
      operationId: prepareForRepair
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: preparation for repair thru REST Api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareForRepairRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Prepare an order for repair
      tags:
        - Order
      x-operationWeight: '300'
      x-privateApi: 'true'
  /ordersv2/{id}/repair:
    post:
      operationId: repairOrder
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
        - in: query
          name: dbVersion
          required: true
          schema:
            format: int64
            type: integer
        - in: query
          name: forceRepair
          required: false
          schema:
            default: false
            type: boolean
        - in: query
          name: reason
          required: false
          schema:
            default: repair thru REST Api
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Repair an order
      tags:
        - Order
      x-operationWeight: '340'
      x-privateApi: 'true'
  /ordersv2/{orderId}/lineItem/{lineItemId}/addevents:
    put:
      operationId: addEventsOnLineItem
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - in: path
          name: lineItemId
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: resource update thru REST Api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessingEvents'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Update one line item in order
      tags:
        - Order
      x-operationWeight: '700'
      x-privateApi: 'true'
  /ordersv2/{orderId}/lineItem/{lineItemId}/subLineItem/{subLineItemId}/addevents:
    put:
      operationId: addEventsOnSubLineItem
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - in: path
          name: lineItemId
          required: true
          schema:
            type: string
        - in: path
          name: subLineItemId
          required: true
          schema:
            type: string
        - in: query
          name: reason
          required: false
          schema:
            default: resource update thru REST Api
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessingEvents'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Update one sub line item in order
      tags:
        - Order
      x-operationWeight: '900'
      x-privateApi: 'true'
  /ordersv2/{orderId}/previous-order-generation/subscription/{subscriptionId}:
    get:
      operationId: findPreviousGenerationOrderByOrderAndSubscription
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
        - in: path
          name: subscriptionId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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
      tags:
        - Order
  /ordersv2/{orderId}/update-processing-events:
    post:
      operationId: updateProcessingEvents
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProcessingEvents'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
          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: Update processing events list
      tags:
        - Order
      x-operationWeight: '200'
security:
  - Bearer:
      - read
      - write
servers:
  - description: Generated server url
    url: https://api.nexway.store
