openapi: 3.0.1
info:
  title: Nexway Connect
  description: Nexway Connect API
  license:
    name: Nexway License Version 1.0
  version: '1.0'
servers:
  - url: https://api.nexway.store
    description: Generated server url
security:
  - Bearer:
      - read
      - write
paths:
  /connect/catalog/categories/{language}:
    get:
      tags:
        - Catalog
      summary: Get all categories and subcategories of Nexway products
      description: Get all categories and subcategories of Nexway products
      operationId: getCategories
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
        - name: language
          in: path
          description: Categories description language
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCategoriesResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCategoriesResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCategoriesResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCategoriesResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCategoriesResponse'
  /connect/catalog/oslist:
    get:
      tags:
        - Catalog
      summary: Get all operating systems of Nexway products
      description: Get all operating systems of Nexway products
      operationId: getOperatingSystems
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOperatingSystemsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOperatingSystemsResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOperatingSystemsResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOperatingSystemsResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOperatingSystemsResponse'
  /connect/order/new:
    post:
      tags:
        - Order
      summary: Create a new order
      description: Create a new order entry
      operationId: createOrder
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      requestBody:
        description: CreateOrderRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
        '500':
          description: Failure
          content:
            application/json:
              schema:
                type: object
  /connect/order/cancel:
    put:
      tags:
        - Order
      summary: Cancel an order
      description: Cancel an order by updating it
      operationId: cancelOrder
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      requestBody:
        description: CancelOrderRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelOrderRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrderResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrderResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrderResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrderResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelOrderResponse'
  /connect/order/download:
    put:
      tags:
        - Order
      summary: Update download time of an order
      description: Update download time of an order
      operationId: updateDownloadTime
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      requestBody:
        description: UpdateDownloadTimeRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDownloadTimeRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateDownloadTimeResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateDownloadTimeResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateDownloadTimeResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateDownloadTimeResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateDownloadTimeResponse'
  /connect/order/{ID}:
    get:
      tags:
        - Order
      summary: Get an order data
      description: Get an order information
      operationId: getOrder
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrderResponse'
  /connect/order/{ID}/download:
    get:
      tags:
        - Order
      summary: Get download information of an order
      description: Get download information related to an order
      operationId: getDownloadInfo
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDownloadInfoResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDownloadInfoResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDownloadInfoResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDownloadInfoResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDownloadInfoResponse'
  /connect/stock:
    post:
      tags:
        - Product
      summary: Get stock info for products
      description: Get stock info for products
      operationId: getStockStatus
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      requestBody:
        description: GetStockStatusRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetStockStatusRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStockStatusResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StockStatus'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StockStatus'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StockStatus'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StockStatus'
  /connect/order/crossupsell:
    post:
      tags:
        - Product
      summary: Get cross-/up-sell products for order
      description: Get cross-/up-sell products for order
      operationId: getCrossUpSell
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      requestBody:
        description: GetCrossUpSellRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetCrossUpSellRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCrossUpSellResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCrossUpSellResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCrossUpSellResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCrossUpSellResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCrossUpSellResponse'
  /connect/subscription:
    put:
      tags:
        - Subscription
      summary: Cancel Subscription
      description: Cancel Subscription
      operationId: cancelSubscription
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      requestBody:
        description: SubscriptionRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubscriptionResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubscriptionResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubscriptionResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubscriptionResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubscriptionResponse'
    post:
      tags:
        - Subscription
      summary: Get subscription status
      description: Get subscription status
      operationId: getSubscriptionStatus
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      requestBody:
        description: SubscriptionRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionStatusResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionStatusResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionStatusResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionStatusResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionStatusResponse'
  /connect/subscription/renew:
    post:
      tags:
        - Subscription
      summary: Renew subscription
      description: Renew subscription of an order
      operationId: renewSubscription
      parameters:
        - name: secret
          in: header
          description: Access secret
          required: true
          schema:
            type: string
      requestBody:
        description: SubscriptionRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewResponse'
        '500':
          description: Failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewResponse'
components:
  schemas:
    Category:
      required:
        - id
        - label
      type: object
      properties:
        id:
          type: integer
          description: Category system id
          format: int32
          example: 7466
        label:
          type: string
          description: Category name
          example: Anti-Virus & Security
        Subcategory list:
          type: array
          description: List of subcategories of given category
          xml:
            name: subcategory
            wrapped: true
          items:
            $ref: '#/components/schemas/Subcategory'
      description: List of categories
    GetCategoriesResponse:
      required:
        - responseCode
        - responseMessage
      type: object
      properties:
        responseCode:
          type: integer
          description: >-
            A code corresponding to the treatement of getCategories request. See
            a list of possible errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text describing the result of getCategories request
          example: OK
        categoryList:
          type: array
          description: List of categories
          xml:
            name: categories
            wrapped: true
          items:
            $ref: '#/components/schemas/Category'
      xml:
        name: out
    Subcategory:
      required:
        - id
        - label
      type: object
      properties:
        id:
          type: integer
          description: Subcategory system id
          format: int32
          example: 7467
        label:
          type: string
          description: Subcategory name
          example: Antivirus
      description: List of subcategories of given category
    GetOperatingSystemsResponse:
      required:
        - responseCode
        - responseMessage
      type: object
      properties:
        responseCode:
          type: integer
          description: >-
            A code corresponding to the treatement of getOperatingSystems
            request. See a list of possible errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text describing the result of getOperatingSystems request
          example: OK
        osList:
          type: array
          description: List of operating systems
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/OperatingSystem'
      xml:
        name: out
    OperatingSystem:
      required:
        - id
        - label
      type: object
      properties:
        id:
          type: integer
          description: Operating system id
          format: int32
          example: 63
        label:
          type: string
          description: Operating system name
          example: Win 10 32/64 bits
      description: List of operating systems
    CreateOrderRequest:
      required:
        - currency
        - customer
        - orderDate
        - orderLines
        - partnerOrderNumber
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: XXXXXXXXXXXXX
        orderDate:
          type: string
          description: >-
            The date of the order, must respect the ISO 8601 format. Example:
            2004-02-12T15:19:21+00:00
          example: '2004-02-12T15:19:21+00:00'
        marketingProgramId:
          type: string
          description: Allows the marketing department to find the order
          example: XXXXXXXXXXXXX
        currency:
          type: string
          description: >-
            The currency used for the transaction, must respect the ISO 4217
            format. Example: EUR
          example: EUR
        orderLines:
          type: array
          description: The details of products in the order
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/OrderLines'
        customer:
          $ref: '#/components/schemas/Customer'
        payment:
          $ref: '#/components/schemas/Payment'
        discounts:
          type: array
          description: Allows to set one or many discounts
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/Discount'
        metadata:
          type: array
          description: Allows to set various type of data
          xml:
            name: metaData
            wrapped: true
          items:
            $ref: '#/components/schemas/OrderMetadata'
      xml:
        name: request
    Customer:
      required:
        - email
        - language
        - locationDelivery
        - locationInvoice
        - partnerId
      type: object
      properties:
        partnerId:
          type: string
          description: Unique ID of the customer
          example: XXXXXXX
        email:
          type: string
          description: Email address of the customer
          example: XXXXX@XX
        language:
          type: string
          description: >-
            Language of the customer, must respect the ISO 639_ISO 3166 format.
            Example: fr_FR
          example: fr_FR
        locationDelivery:
          $ref: '#/components/schemas/Location'
        locationInvoice:
          $ref: '#/components/schemas/Location'
        ipV4:
          type: string
          description: IPv4 address of the customer
          example: 127.0.0.1
          xml:
            name: IP_V4
        ipV6:
          type: string
          description: IPv6 address of the customer
          example: 2001:0db8:0000:85a3:0000:0000:ac1f:8001
          xml:
            name: IP_V6
      description: Contains information about the customer
    Discount:
      required:
        - foreignRef
        - label
        - operation
        - operationValue
        - priceDelta
      type: object
      properties:
        foreignRef:
          type: string
          description: The reference of the discount in your system
          example: XXXXXXX
        label:
          type: string
          description: The label of the discount
          example: XXXXXXX
        priceDelta:
          type: number
          description: The real amount of the discount
          format: float
          example: 0
        operation:
          type: string
          description: 'The type of discount (Amount/Percents). Example: Percents'
          example: Percents
        operationValue:
          type: number
          description: The value of the discount
          format: float
          example: 0
      description: Contains discount information
    Location:
      required:
        - address1
        - city
        - country
        - fax
        - firstName
        - lastName
        - phone
        - title
        - zipCode
      type: object
      properties:
        companyName:
          type: string
          description: >-
            In case the customer wish the order to be delivered at his work
            place
          example: XXXXXXXXXX
        title:
          type: integer
          description: 'The title of the customer, 0: Unknown; 1: Mr; 2: Mrs; 3: Ms'
          format: int32
        lastName:
          type: string
          description: The last name of the customer
          example: XXXXXXXXXX
        firstName:
          type: string
          description: The first name of the customer
          example: XXXXXXXXXX
        address1:
          type: string
          description: The address of the customer
          example: XXXXXXXXXX
        address2:
          type: string
          description: The complement of the address of the customer
          example: XXXXXXXXXX
        zipCode:
          type: string
          description: The zip code of the customer
          example: XXXXXXXXXX
        city:
          type: string
          description: The city of the customer
          example: XXXXXXXXXX
        province:
          type: string
          description: >-
            The province (format ISO 3166-2) - can be required in the invoice
            node if the customer lives in the US, CA, BR or AU (USA, Canada,
            Brazil or Australia)
          example: XXXXXXXXXX
        country:
          type: string
          description: The country of the customer. Required in ISO ALPHA-2 code
          example: FR
        phone:
          type: string
          description: The phone of the customer
          example: XXXXXXXXXX
        fax:
          type: string
          description: The fax of the customer
          example: XXXXXXXXXX
      description: The information about customer's locations
    OrderLines:
      required:
        - amountDutyFree
        - amountTotal
        - productRef
        - quantity
        - vatRate
      type: object
      properties:
        productRef:
          type: string
          description: The ID of the product
          example: XXXXX
        quantity:
          type: integer
          description: The number of product bought
          format: int32
          example: 0
        vatRate:
          type: number
          description: The rate of VAT
          format: float
          example: 0
        amountDutyFree:
          type: number
          description: The cost of product tax free
          format: float
          example: 0
        amountTotal:
          type: number
          description: >-
            The amount total = amountDutyFree * quantity + ((amountDutyFree *
            quantity) * (vatRate/100))
          format: float
          example: 0
        endUserEmail:
          type: string
          description: The email of the person who really made the order
          example: XXXXXX
        discounts:
          type: array
          description: Allows to set a discount attached to an order line
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/Discount'
      description: The details of the products in the order
    OrderMetadata:
      required:
        - key
        - value
      type: object
      properties:
        key:
          type: string
          description: The name of the data
          example: XXXX
        value:
          type: string
          description: The value of the data
          example: XXXX
      description: Allows to set various type of data
    Payment:
      required:
        - paymentMethod
      type: object
      properties:
        paymentMethod:
          type: string
          description: 'The method used for the payment. Default value: External Payment'
          example: External Payment
      description: Contains payment information.
    CreateOrderResponse:
      required:
        - partnerOrderNumber
        - responseCode
        - responseMessage
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: XXXXXXXX
        orderNumber:
          type: integer
          description: The order number in Nexway system
          format: int32
          example: 12345678
        orderLines:
          type: array
          description: Contains all information about the order
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/OrderLine'
        downloadManager:
          $ref: '#/components/schemas/DownloadManager'
        responseCode:
          type: integer
          description: >-
            A code corresponding to a potential error. See a list of possible
            errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text explaining a potential error
          example: OK
      xml:
        name: out
    DownloadManager:
      required:
        - mac
        - pc
      type: object
      properties:
        pc:
          type: string
          description: >-
            Download link for PC. Example:
            http://.../XXXXXX/XXXXXX/downloadManager_XXXXXX.exe
          example: http://.../XXXXXX/XXXXXX/downloadManager_XXXXXX.exe
        mac:
          type: string
          description: >-
            Download link for Mac. Example:
            http://.../XXXXXX/XXXXXX/downloadManager_XXXXXX.dmg
          example: http://.../XXXXXX/XXXXXX/downloadManager_XXXXXX.dmg
      description: Contains preconfigured downloadManager.exe links for downloading files
    FileItem:
      required:
        - group
        - label
        - size
        - type
        - url
      type: object
      properties:
        label:
          type: string
          description: File label
          example: Game label
        type:
          type: string
          description: 'File type (i.e. doc, install). Example: patch|doc|install|'
          example: patch|doc|install|...
        url:
          type: string
          description: >-
            Link to download the file. Example:
            http://.../xxxxxxxxxxxxxxxxxxx/file.exe
          example: http://.../xxxxxxxxxxxxxxxxxxx/file.exe
        size:
          type: number
          description: File size in Bytes
          format: float
          example: 654
        group:
          type: string
          description: The group of the file
          example: XXX
      description: Contains information about the files to download
    LineItem:
      required:
        - responseCode
      type: object
      properties:
        serials:
          type: array
          description: Contains the serial numbers, the encoding, ... for one product
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/Serial'
        subscriptionId:
          type: integer
          description: >-
            An ID corresponding to subscription. If equals 0, means the product
            does not have a subscription or subscription was not created yet
          format: int32
        responseCode:
          type: integer
          description: >-
            A code corresponding to a potential error. See a list of possible
            errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text explaining a potential error
          example: OK
      description: Contains information like the serial number for one specific product
    OrderLine:
      required:
        - dateEndDownload
        - lineItems
        - productRef
        - remark
        - responseCode
        - responseMessage
      type: object
      properties:
        productRef:
          type: integer
          description: Product ID
          format: int32
          example: 12345
        lineItems:
          type: array
          description: Contains one lineItem object per each product ordered
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/LineItem'
        files:
          type: array
          description: Download URLs to get the files of an orderLine
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/FileItem'
        dateEndDownload:
          type: string
          description: 'Download access expiry date. Example: 2017-04-12'
          example: '2017-04-12'
        remark:
          type: string
          description: Any other comments
        digitalLockerLink:
          type: string
          description: Digital locker access url (if available for purchased products)
          example: www.example.com/?token=XXXX
        responseCode:
          type: integer
          description: >-
            A code corresponding to a potential error. See a list of possible
            errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text explaining a potential error
          example: OK
      description: Contains information about the order
    Serial:
      required:
        - charset
        - data
        - encoding
        - fileName
      type: object
      properties:
        data:
          type: string
          description: The serial number
          example: XXX-XXXX-XXXX-XXXX-XXXX
        encoding:
          type: string
          description: >-
            The file encoding, ex: base64, text, ... For the moment we only
            support the text encoding. Example: base64|text
          example: base64|text
        charset:
          type: string
          description: 'The file charset. Example: utf-8'
          example: utf-8
        fileName:
          type: string
          description: For those who stock the serials in a file
          example: Serial.DAT
      description: Contains the serial numbers, the encoding, ... about one product
    CancelOrderRequest:
      required:
        - partnerOrderNumber
        - reasonCode
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number as string
          example: XXXXXXXXXX
        reasonCode:
          type: integer
          description: >-
            The reason of cancellation. Possible values - 2: Order Cancelled, 3:
            Unsatisfied customer, 4: Double Order, 5: Product Error, 6:
            Incompatible product, 16: Fraud/Charge back
          format: int32
          example: 2
        comment:
          type: string
          description: A text in complement of the reason
          example: XXXXXX
      description: Contains information about the order and the reason of cancellation
      xml:
        name: request
    CancelOrderResponse:
      required:
        - partnerOrderNumber
        - responseCode
        - responseMessage
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: XXXXXXXXX
        orderNumber:
          type: string
          description: The order ID in Nexway system
          example: '54654'
        responseCode:
          type: integer
          description: >-
            A code corresponding to the treatement of cancellation. See a list
            of possible errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text describing the result of order cancellation
          example: OK
        subscriptionStatusCode:
          type: integer
          description: >-
            A code corresponding to result of cancellation of subscription (if
            applicable). See a list of possible errors below
          format: int32
          example: 200
        subscriptionStatus:
          type: string
          description: A text describing the result of subscription cancellation
          example: Subscription cancelled
      xml:
        name: out
    UpdateDownloadTimeRequest:
      required:
        - partnerOrderNumber
        - value
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: XXXXXXXXXXXX
        value:
          type: string
          description: 'The date value for new download expiry date. Example: P1Y4M3D'
          example: P1Y4M3D
      description: Contains the partner order number and the date value
      xml:
        name: request
    UpdateDownloadTimeResponse:
      required:
        - partnerOrderNumber
        - responseCode
        - responseMessage
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: GMFSERZ30071981
        newDownloadEndDate:
          type: string
          description: 'A new download expiry date. Example: 2011-05-27'
          example: '2011-05-27'
        responseCode:
          type: integer
          description: >-
            A code corresponding to the treatement of updating download expiry
            date. See a list of possible errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text describing the result of updating download expiry date
          example: OK
      description: New expiration date will be returned in the response
      xml:
        name: out
    GetOrderResponse:
      required:
        - partnerOrderNumber
        - responseCode
        - responseMessage
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: XXXXXXXX
        orderNumber:
          type: integer
          description: Order number in Nexway system
          format: int32
          example: 65464
        orderLines:
          type: array
          description: Contains information about the order
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/OrderLine'
        downloadManager:
          $ref: '#/components/schemas/DownloadManager'
        responseCode:
          type: integer
          description: >-
            A code corresponding to a potential error. See a list of possible
            errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text explaining a potential error
          example: OK
      xml:
        name: out
    FileDownload:
      required:
        - countCompleteDownload
        - countStartDownload
        - dateFirstDownload
        - dateLastDownload
        - group
        - label
        - size
        - type
        - url
      type: object
      properties:
        label:
          type: string
          description: The download file name
          example: File1 label
        type:
          type: string
          description: 'The download file type. Example: install'
          example: install
        url:
          type: string
          description: >-
            The url of download file. Example:
            http://.../xxxxxxxxxxxxxxxxxxx/file1.exe
          example: http://.../xxxxxxxxxxxxxxxxxxx/file1.exe
        size:
          type: number
          description: The size of download file
          format: float
          example: 2023751
        group:
          type: string
          description: The download file group
          example: xxxxxxxxx
        dateFirstDownload:
          type: string
          description: 'The date of the first download. Example: xxxx-xx-xx'
          example: xxxx-xx-xx
        dateLastDownload:
          type: string
          description: 'The date of the last download. Example: xxxx-xx-xx'
          example: xxxx-xx-xx
        countStartDownload:
          type: integer
          description: The count of started downloads
          format: int32
          example: 1
        countCompleteDownload:
          type: integer
          description: >-
            The count of completed downloads. Important: This value is reliable
            until 1 download. When this value is bigger than 1, it's only an
            indicative information.
          format: int32
          example: 0
      description: Contains downloadable files information
    GetDownloadInfoResponse:
      required:
        - downloadEndDate
        - partnerOrderNumber
        - responseCode
        - responseMessage
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: XXXXXXXXXXX
        downloadEndDate:
          type: string
          description: Download access expiry date (YYYY-MM-DD)
          example: '2011-04-20'
        orderLines:
          type: array
          description: Contains order list - can be null
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/OrderLineDownload'
        responseCode:
          type: integer
          description: >-
            A code corresponding to the treatement of getDownloadInfo. See a
            list of possible errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text describing the result of getDownloadInfo
          example: OK
      description: >-
        Lists all downloadable files for the order indicating the download
        status for each file.
      xml:
        name: out
    OrderLineDownload:
      required:
        - productRef
      type: object
      properties:
        productRef:
          type: integer
          description: The product ID
          format: int32
          example: 12345678
        files:
          type: array
          description: The downloadable files information - can be null
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/FileDownload'
      description: Contains customer order list to return
    GetStockStatusRequest:
      required:
        - productRefs
      type: object
      properties:
        productRefs:
          type: array
          description: List of productRef numbers
          xml:
            name: productRef
            wrapped: true
          items:
            type: integer
            description: List of productRef numbers
            format: int32
            xml:
              name: integer
      xml:
        name: request
    GetStockStatusResponse:
      required:
        - stockStatusList
      type: object
      properties:
        stockStatusList:
          type: array
          description: List of stock status on given productRefs
          xml:
            name: productStatus
            wrapped: true
          items:
            $ref: '#/components/schemas/StockStatus'
      xml:
        name: out
    StockStatus:
      required:
        - productRef
        - responseCode
        - responseMessage
        - status
      type: object
      properties:
        productRef:
          type: integer
          description: ID of the product
          format: int32
          example: 12345678
        status:
          type: integer
          description: >-
            Status of the stock serial numbers. See a list of possible status
            codes below
          format: int32
          example: 100
        responseCode:
          type: integer
          description: >-
            A code corresponding to an potential error. See a list of possible
            errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text explaining the error
          example: productRef not found
      description: List of stock status on given productRefs
    GetCrossUpSellRequest:
      required:
        - language
        - products
      type: object
      properties:
        language:
          type: string
          description: >-
            Languages list (use ISO 3166-1-alpha-2 format). This method accepts
            one language or list of languages separated with a comma. Example:
            EN,FR,PT
          example: EN,FR,PT
        products:
          type: array
          description: List of products with product refs and quantities
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/Product'
      description: Contains products list and languages list
      xml:
        name: request
    Product:
      required:
        - productRef
        - quantity
      type: object
      properties:
        productRef:
          type: integer
          description: The product reference
          format: int32
          example: 654917
        quantity:
          type: integer
          description: The product quantity
          format: int32
          example: 1
      description: List of products with product refs and quantities
    GetCrossUpSellResponse:
      required:
        - responseCode
        - responseMessage
      type: object
      properties:
        productsReturn:
          type: array
          description: Contains the products list to return - can be null
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/ProductReturn'
        responseCode:
          type: integer
          description: >-
            A code corresponding to the treatement of getCrossUpSell. See a list
            of possible errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text describing the result of getCrossUpSell
          example: OK
      xml:
        name: out
    ProductReturn:
      required:
        - amountDutyFree
        - currency
        - imageSmall
        - language
        - name
        - ref
        - shortDescription
        - type
      type: object
      properties:
        ref:
          type: integer
          description: Product reference number
          format: int32
          example: 654917
        type:
          type: string
          description: 'Product type (option, up, cross). Example: up'
          example: up
        name:
          type: string
          description: Product name
          example: 101 Airborne
        amountDutyFree:
          type: number
          description: The base price
          format: float
          example: 6.6806
        currency:
          type: string
          description: 'The currency. Example: GBP'
          example: GBP
        shortDescription:
          type: string
          description: The short description of the product
          example: >-
            Lead a squad of 18 paratroopers behind enemy lines in this
            strategy-based simulation of squad level combat based on the D-Day
            landings in Normandy.
        language:
          type: string
          description: 'The language of short description. Example: EN'
          example: EN
        imageSmall:
          type: string
          description: The URL of the small image
          example: empire/airborne19.gif
      description: Contains the products list to return
    SubscriptionRequest:
      required:
        - partnerOrderNumber
        - subscriptionId
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: XXXXXXXXXX
        subscriptionId:
          type: integer
          description: An ID corresponding to subscription in given order
          format: int32
      xml:
        name: request
    SubscriptionStatusResponse:
      required:
        - amount
        - code
        - currency
        - generation
        - message
        - period
        - productRef
        - subscriptionId
        - technicalStatus
      type: object
      properties:
        subscriptionId:
          type: integer
          description: An ID corresponding to subscription
          format: int32
        productRef:
          type: integer
          description: Subscription product reference
          format: int32
        period:
          type: string
          description: 'Status of subscription. Can be: Active, Renewing, Canceled'
          example: XXXXXXXX
        generation:
          type: integer
          description: >-
            Generation of subscription. Initially is 0, incremented with each
            renewal of subscription
          format: int32
        technicalStatus:
          type: string
          description: >-
            Technical status of subscription. Can be: Ok, Waiting (for external
            notification), Error (needs a correction)
          example: XXXXXXXX
        currency:
          type: string
          description: Currency to use in payment on next billing
          example: EUR
        amount:
          type: number
          description: Amount of the next billing
          format: float
          example: 0
        code:
          type: integer
          description: 'A code corresponding to result of a request. Example: 200 (Success)'
          format: int32
          example: 200
        message:
          type: string
          description: 'A text explaining result of request. Example: Success'
          example: Success
        creation_datetime:
          type: string
          writeOnly: true
        creationDatetime:
          type: string
        updateDatetime:
          type: string
        update_datetime:
          type: string
        expiration_datetime:
          type: string
          writeOnly: true
        expirationDatetime:
          type: string
        next_status_change_datetime:
          type: string
          writeOnly: true
        nextStatusChangeDatetime:
          type: string
    CancelSubscriptionResponse:
      required:
        - partnerOrderNumber
        - responseCode
        - responseMessage
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: Your unique order number
          example: XXXXXXXXX
        orderNumber:
          type: string
          description: The order ID in Nexway system
          example: '54654'
        subscriptionId:
          type: integer
          description: An ID corresponding to subscription
          format: int32
          example: 54654
        responseCode:
          type: integer
          description: >-
            A code corresponding to the treatement of cancellation. See a list
            of possible errors below
          format: int32
          example: 0
        responseMessage:
          type: string
          description: A text describing the result of order cancellation
          example: OK
      xml:
        name: out
    RenewResponse:
      required:
        - code
        - message
        - partnerOrderNumber
        - period
        - subscriptionId
      type: object
      properties:
        partnerOrderNumber:
          type: string
          description: >-
            Your order number. Extended with pattern -\<generation\> if
            generation is higher than 0 (for renewed subscriptions)
          example: XXXXXXXX
        subscriptionId:
          type: integer
          description: An ID corresponding to subscription
          format: int32
        period:
          type: string
          description: 'Status of subscription. Can be: Active, Renewing, Canceled'
          example: XXXXXXXX
        code:
          type: integer
          description: >-
            A code corresponding to result of a request. See a list of possible
            response codes below
          format: int32
          example: 0
        message:
          type: string
          description: A text explaining result of request
          example: Subscription renewed
  securitySchemes:
    Bearer:
      type: http
      description: Enter Bearer token
      scheme: bearer
      bearerFormat: JWT
