> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Orders

> Returns a list of orders.





## OpenAPI

````yaml /openapi/orders.json get /v1/orders
openapi: 3.0.1
info:
  title: Voucherify API - Orders
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/orders:
    get:
      tags:
        - Orders
      summary: List Orders
      description: |+
        Returns a list of orders.

      operationId: list-orders
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/page'
        - schema:
            $ref: '#/components/schemas/ParameterOrderListOrders'
          in: query
          name: order
          description: >-
            This is a property that controls the sorting direction of the
            results. Sort the results using one of the filtering options, where
            the dash `-` preceding a sorting option means sorting in a
            descending order.
      responses:
        '200':
          description: >-
            Returns a dictionary with order objects. The orders are returned
            sorted by creation date by default, with the most recent orders
            appearing last, unless you specify another sequence using the order
            query parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrdersListResponseBody'
              examples:
                Example:
                  value:
                    object: list
                    data_ref: orders
                    orders:
                      - id: ord_v5vupdacgud1CwUSyKqSlHuk
                        source_id: null
                        created_at: '2022-09-09T07:44:41.594Z'
                        updated_at: '2022-09-09T07:44:42.331Z'
                        status: PAID
                        amount: 2700
                        discount_amount: 1243
                        items_discount_amount: 270
                        total_discount_amount: 1513
                        total_amount: 1187
                        items:
                          - object: order_item
                            source_id: prod_5h1pp1ng
                            related_object: product
                            quantity: 1
                            amount: 700
                            discount_amount: 70
                            price: 700
                            subtotal_amount: 630
                            product:
                              name: Shipping
                          - object: order_item
                            source_id: roses_1
                            related_object: product
                            quantity: 1
                            amount: 500
                            discount_amount: 50
                            price: 500
                            subtotal_amount: 450
                            product:
                              name: Bouquet - Romantic Roses
                              price: 500
                          - object: order_item
                            source_id: vase_1
                            related_object: product
                            quantity: 1
                            amount: 1500
                            discount_amount: 150
                            price: 1500
                            subtotal_amount: 1350
                            product:
                              name: Vase - Boho Vintage
                              price: 1500
                        metadata: {}
                        customer:
                          id: cust_tAED42tFhLM9v7GmZUaklJFd
                          object: customer
                        customer_id: cust_tAED42tFhLM9v7GmZUaklJFd
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0baa093537528ef645:
                            date: '2022-09-09T07:44:41.695Z'
                            related_object_type: redemption
                            related_object_id: r_0baa093537528ef645
                            stacked:
                              - r_0baa093537528ef646
                              - r_0baa093537528ef647
                              - r_0baa093537528ef648
                      - id: ord_3JkWC6jG0JgyRf5lO3r4IyU1
                        source_id: null
                        created_at: '2022-09-09T07:04:22.597Z'
                        updated_at: '2022-09-09T07:04:23.743Z'
                        status: PAID
                        amount: 73100
                        items_discount_amount: 7310
                        total_discount_amount: 7310
                        total_amount: 65790
                        items:
                          - object: order_item
                            product_id: prod_0b7d7c4e814be5c502
                            quantity: 1
                            amount: 70000
                            discount_amount: 7000
                            price: 70000
                            subtotal_amount: 63000
                            product:
                              name: Apple iPhone 12
                              price: 70000
                          - object: order_item
                            product_id: prod_0b7d7dfb05cbe5c616
                            sku_id: sku_0b7d7dfb090be5c619
                            quantity: 1
                            amount: 1600
                            discount_amount: 160
                            price: 1600
                            subtotal_amount: 1440
                            product:
                              name: Comic Books1
                              price: 1600
                            sku:
                              sku: Comics1
                              price: 1600
                          - object: order_item
                            product_id: prod_0b72b0bd64d198e3ae
                            quantity: 1
                            amount: 1500
                            discount_amount: 150
                            price: 1500
                            subtotal_amount: 1350
                            product:
                              name: Vase - Boho Vintage
                              price: 1500
                        metadata: {}
                        customer:
                          id: cust_tAED42tFhLM9v7GmZUaklJFd
                          object: customer
                        customer_id: cust_tAED42tFhLM9v7GmZUaklJFd
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0ba9fffae90e1b2495:
                            date: '2022-09-09T07:04:22.692Z'
                            related_object_type: voucher
                            related_object_id: v_24rljiUfdLNC9poBf0BPNmoh2txzFkLs
                      - id: ord_HwdbziIPvUZJkIC7z74FKmPv
                        source_id: null
                        created_at: '2022-09-09T06:47:14.195Z'
                        updated_at: '2022-09-09T06:47:15.369Z'
                        status: PAID
                        amount: 71600
                        discount_amount: 7160
                        total_discount_amount: 7160
                        total_amount: 64440
                        items:
                          - object: order_item
                            product_id: prod_0b7d7dfb05cbe5c616
                            sku_id: sku_0b7d7dfb090be5c619
                            quantity: 1
                            amount: 1600
                            price: 1600
                            subtotal_amount: 1600
                            product:
                              name: Comic Books1
                              price: 1600
                            sku:
                              sku: Comics1
                              price: 1600
                          - object: order_item
                            product_id: prod_0b7d7c4e814be5c502
                            quantity: 1
                            amount: 70000
                            price: 70000
                            subtotal_amount: 70000
                            product:
                              name: Apple iPhone 12
                              price: 70000
                        metadata: {}
                        customer:
                          id: cust_tAED42tFhLM9v7GmZUaklJFd
                          object: customer
                        customer_id: cust_tAED42tFhLM9v7GmZUaklJFd
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0ba9fc0eb00e1b2230:
                            date: '2022-09-09T06:47:14.369Z'
                            related_object_type: voucher
                            related_object_id: v_3vEprqa6tbzfhFtpjr4mDlkNchXepW7s
                      - id: ord_HRluwFS2seoILUkXxWML0D7Z
                        source_id: null
                        created_at: '2022-09-09T06:44:27.383Z'
                        updated_at: '2022-09-09T06:44:28.252Z'
                        status: PAID
                        amount: 71600
                        discount_amount: 100
                        total_discount_amount: 100
                        total_amount: 71500
                        items:
                          - object: order_item
                            product_id: prod_0b7d7dfb05cbe5c616
                            sku_id: sku_0b7d7dfb090be5c619
                            quantity: 1
                            amount: 1600
                            price: 1600
                            subtotal_amount: 1600
                            product:
                              name: Comic Books1
                              price: 1600
                            sku:
                              sku: Comics1
                              price: 1600
                          - object: order_item
                            product_id: prod_0b7d7c4e814be5c502
                            quantity: 1
                            amount: 70000
                            price: 70000
                            subtotal_amount: 70000
                            product:
                              name: Apple iPhone 12
                              price: 70000
                        metadata: {}
                        customer:
                          id: cust_tAED42tFhLM9v7GmZUaklJFd
                          object: customer
                        referrer:
                          id: cust_Vzck5i8U3OhcEUFY6MKhN9Rv
                          object: customer
                        customer_id: cust_tAED42tFhLM9v7GmZUaklJFd
                        referrer_id: cust_Vzck5i8U3OhcEUFY6MKhN9Rv
                        object: order
                        redemptions:
                          r_0ba9fb6bb7928ed9ec:
                            date: '2022-09-09T06:44:27.486Z'
                            related_object_type: voucher
                            related_object_id: v_vhHuiEmZSchWHtE0xKm0HM7PFCR9cNkA
                            related_object_parent_id: camp_rRsfatlwN7unSeUIJDCYedal
                      - id: ord_Qg5utCohAZ3tafYvc1O4C80r
                        source_id: null
                        created_at: '2022-09-09T06:42:34.083Z'
                        updated_at: '2022-09-09T06:42:35.169Z'
                        status: PAID
                        amount: 70000
                        discount_amount: 4000
                        total_discount_amount: 4000
                        total_amount: 66000
                        items:
                          - object: order_item
                            product_id: prod_0b7d7c4e814be5c502
                            quantity: 1
                            amount: 70000
                            price: 70000
                            subtotal_amount: 70000
                            product:
                              name: Apple iPhone 12
                              price: 70000
                        metadata: {}
                        customer:
                          id: cust_tAED42tFhLM9v7GmZUaklJFd
                          object: customer
                        customer_id: cust_tAED42tFhLM9v7GmZUaklJFd
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0ba9fafd11d28ed999:
                            date: '2022-09-09T06:42:34.183Z'
                            related_object_type: voucher
                            related_object_id: v_RaMaTT7F0Q47BetdGcFxsyqwo1aZGzJs
                            related_object_parent_id: camp_hg7ajfHh6DcE1xa18mw3SdF6
                      - id: ord_G9LBb5SOPa36pHdwxUvzkw4P
                        source_id: null
                        created_at: '2022-09-09T06:38:17.984Z'
                        updated_at: '2022-09-09T06:38:19.064Z'
                        status: PAID
                        amount: 4600
                        items_discount_amount: 300
                        total_discount_amount: 300
                        total_amount: 4300
                        items:
                          - object: order_item
                            product_id: prod_0b7d7dfb05cbe5c616
                            sku_id: sku_0b7d7dfb090be5c619
                            quantity: 1
                            amount: 1600
                            price: 1600
                            subtotal_amount: 1600
                            product:
                              name: Comic Books1
                              price: 1600
                            sku:
                              sku: Comics1
                              price: 1600
                          - object: order_item
                            product_id: prod_0a65b3ff8592d7a5b5
                            quantity: 1
                            amount: 3000
                            discount_amount: 300
                            price: 3000
                            subtotal_amount: 2700
                            product:
                              name: Koffee Cup
                              price: 3000
                        metadata: {}
                        customer:
                          id: cust_tAED42tFhLM9v7GmZUaklJFd
                          object: customer
                        customer_id: cust_tAED42tFhLM9v7GmZUaklJFd
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0ba9fa02fcd28ed8f1:
                            date: '2022-09-09T06:38:18.099Z'
                            related_object_type: voucher
                            related_object_id: v_KqP2NOSb4dJb1D6UBhcq7ScPZXun0y40
                            related_object_parent_id: camp_hC2GdqYtOmTT45zfhib62cK1
                      - id: ord_N3YBowDTZs0UH2hHoMZLbUDN
                        source_id: null
                        created_at: '2022-09-09T06:18:31.459Z'
                        updated_at: '2022-09-09T06:18:31.624Z'
                        status: PAID
                        amount: 71600
                        discount_amount: 7160
                        total_discount_amount: 7160
                        total_amount: 64440
                        items:
                          - object: order_item
                            product_id: prod_0b7d7c4e814be5c502
                            quantity: 1
                            amount: 70000
                            price: 70000
                            subtotal_amount: 70000
                            product:
                              name: Apple iPhone 12
                              price: 70000
                          - object: order_item
                            product_id: prod_0b7d7dfb05cbe5c616
                            sku_id: sku_0b7d7dfb090be5c619
                            quantity: 1
                            amount: 1600
                            price: 1600
                            subtotal_amount: 1600
                            product:
                              name: Comic Books1
                              price: 1600
                            sku:
                              sku: Comics1
                              price: 1600
                        metadata: {}
                        customer:
                          id: cust_Vzck5i8U3OhcEUFY6MKhN9Rv
                          object: customer
                        customer_id: cust_Vzck5i8U3OhcEUFY6MKhN9Rv
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0ba9f57c37128ed639:
                            date: '2022-09-09T06:18:31.516Z'
                            related_object_type: promotion_tier
                            related_object_id: promo_CQonGnrsFAdEJfJQ3oKB3a8G
                            related_object_parent_id: camp_SGq39XXJ47vm7Xys3D0NLgQ0
                      - id: ord_3R6vsxRZRkND8rpe0rAn9Agc
                        source_id: null
                        created_at: '2022-09-05T08:13:13.720Z'
                        updated_at: '2022-09-05T08:13:14.498Z'
                        status: PAID
                        amount: 74000
                        items_discount_amount: 1500
                        total_discount_amount: 1500
                        total_amount: 72500
                        items:
                          - object: order_item
                            product_id: prod_0b7d7c4e814be5c502
                            quantity: 1
                            amount: 70000
                            price: 70000
                            subtotal_amount: 70000
                            product:
                              name: Apple iPhone 12
                              price: 70000
                          - object: order_item
                            product_id: prod_0b72b0bd64d198e3ae
                            quantity: 2
                            amount: 3000
                            discount_amount: 500
                            price: 1500
                            subtotal_amount: 2500
                            product:
                              name: Vase - Boho Vintage
                              price: 1500
                          - object: order_item
                            product_id: prod_0b72b00ffed198e344
                            quantity: 2
                            amount: 1000
                            discount_amount: 1000
                            price: 500
                            subtotal_amount: 0
                            product:
                              name: Bouquet - Romantic Roses
                              price: 500
                        metadata: {}
                        customer:
                          id: cust_CSnYd37MXmrbS19XCrghjBsv
                          object: customer
                        customer_id: cust_CSnYd37MXmrbS19XCrghjBsv
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0ba4e961444579711a:
                            date: '2022-09-05T08:13:13.873Z'
                            related_object_type: voucher
                            related_object_id: v_hwySVBBk6YmMD4GzZHJzke1Fxo3QO7kP
                            related_object_parent_id: camp_Uji5a53s5wRSUHqznncTkhHh
                      - id: ord_7bqlkoHyEJCQuxVZpKfZYNeA
                        source_id: null
                        created_at: '2022-09-02T17:12:13.213Z'
                        updated_at: '2022-09-02T17:12:13.969Z'
                        status: PAID
                        amount: 292400
                        items_discount_amount: 900
                        total_discount_amount: 900
                        total_amount: 291500
                        items:
                          - object: order_item
                            product_id: prod_0b7d7dfb05cbe5c616
                            sku_id: sku_0b7d7dfb090be5c619
                            quantity: 4
                            amount: 6400
                            price: 1600
                            subtotal_amount: 6400
                            product:
                              name: Comic Books1
                              price: 1600
                            sku:
                              sku: Comics1
                              price: 1600
                          - object: order_item
                            product_id: prod_0b72b0bd64d198e3ae
                            quantity: 4
                            amount: 6000
                            price: 1500
                            subtotal_amount: 6000
                            product:
                              name: Vase - Boho Vintage
                              price: 1500
                          - object: order_item
                            product_id: prod_0b7d7c4e814be5c502
                            quantity: 4
                            amount: 280000
                            discount_amount: 900
                            price: 70000
                            subtotal_amount: 279100
                            product:
                              name: Apple iPhone 12
                              price: 70000
                        metadata: {}
                        customer:
                          id: cust_CSnYd37MXmrbS19XCrghjBsv
                          object: customer
                        customer_id: cust_CSnYd37MXmrbS19XCrghjBsv
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0ba187f9bb45792c13:
                            date: '2022-09-02T17:12:13.293Z'
                            related_object_type: voucher
                            related_object_id: v_pg6DhwhmeZASoSoJ15PdzMT9MhsPjYuc
                            related_object_parent_id: camp_W8DJVd8J0btqXT6FBwn7BSkC
                      - id: ord_7HwbJiHmS07O7FsVAtjJcuRS
                        source_id: null
                        created_at: '2022-09-02T17:08:37.794Z'
                        updated_at: '2022-09-02T17:08:38.879Z'
                        status: PAID
                        amount: 223900
                        items_discount_amount: 900
                        total_discount_amount: 900
                        total_amount: 223000
                        items:
                          - object: order_item
                            product_id: prod_0b7d7dfb05cbe5c616
                            sku_id: sku_0b7d7dfb090be5c619
                            quantity: 4
                            amount: 6400
                            discount_amount: 300
                            price: 1600
                            subtotal_amount: 6100
                            product:
                              name: Comic Books1
                              price: 1600
                            sku:
                              sku: Comics1
                              price: 1600
                          - object: order_item
                            product_id: prod_0b7d7c4e814be5c502
                            quantity: 3
                            amount: 210000
                            discount_amount: 300
                            price: 70000
                            subtotal_amount: 209700
                            product:
                              name: Apple iPhone 12
                              price: 70000
                          - object: order_item
                            product_id: prod_0b72b0bd64d198e3ae
                            quantity: 5
                            amount: 7500
                            discount_amount: 300
                            price: 1500
                            subtotal_amount: 7200
                            product:
                              name: Vase - Boho Vintage
                              price: 1500
                        metadata: {}
                        customer:
                          id: cust_CSnYd37MXmrbS19XCrghjBsv
                          object: customer
                        customer_id: cust_CSnYd37MXmrbS19XCrghjBsv
                        referrer_id: null
                        object: order
                        redemptions:
                          r_0ba1872762c5792b73:
                            date: '2022-09-02T17:08:37.899Z'
                            related_object_type: voucher
                            related_object_id: v_yQydppWWJpSUuGNEWJ4I2upFGY2Ma4IY
                            related_object_parent_id: camp_A5L21BD4cJii28882owYBqTV
                    total: 441
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - orders
components:
  parameters:
    limit:
      name: limit
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/ParameterLimit'
      description: >-
        Limits the number of objects to be returned. The limit can range between
        1 and 100 items. If no limit is set, it returns 10 items.
    page:
      name: page
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/ParameterPage'
      description: Which page of results to return. The lowest value is `1`.
  schemas:
    ParameterOrderListOrders:
      type: string
      enum:
        - created_at
        - '-created_at'
        - updated_at
        - '-updated_at'
    OrdersListResponseBody:
      type: object
      title: Orders List Response Body
      description: Response body schema representing **GET** `v1/orders`.
      properties:
        object:
          type: string
          default: list
          enum:
            - list
          description: >-
            The type of the object represented by JSON. This object stores
            information about orders in a dictionary.
        data_ref:
          type: string
          default: orders
          enum:
            - orders
          description: >-
            Identifies the name of the attribute that contains the array of
            order objects.
        orders:
          type: array
          description: Contains array of order objects.
          items:
            allOf:
              - $ref: '#/components/schemas/OrderCalculated'
              - type: object
                properties:
                  items:
                    type: array
                    description: >-
                      Array of items applied to the order. It can include up to
                      500 items.
                    items:
                      $ref: '#/components/schemas/OrderCalculatedItem'
        total:
          type: integer
          description: Total number of orders.
      required:
        - object
        - data_ref
        - orders
        - total
    ParameterLimit:
      type: integer
      minimum: 1
      maximum: 100
    ParameterPage:
      type: integer
      minimum: 1
      maximum: 100
    OrderCalculated:
      title: Order Calculated No Customer Data
      type: object
      description: Order information.
      properties:
        id:
          type: string
          description: >-
            Unique ID assigned by Voucherify of an existing order that will be
            linked to the redemption of this request.
        source_id:
          type: string
          nullable: true
          description: >-
            Unique source ID of an existing order that will be linked to the
            redemption of this request.
        status:
          type: string
          description: The order status.
          enum:
            - CREATED
            - PAID
            - CANCELED
            - FULFILLED
        amount:
          type: integer
          description: >-
            This is the sum of the order items' amounts. It is expressed as an
            integer in the smallest currency unit (e.g. 100 cents for $1.00).
        initial_amount:
          type: integer
          description: >-
            This is the sum of the order items' amounts before any discount or
            other effect (e.g. add missing units) is applied. It is expressed as
            an integer in the smallest currency unit (e.g. 100 cents for $1.00).
        discount_amount:
          type: integer
          description: >-
            Sum of all order-level discounts applied to the order. It is
            expressed as an integer in the smallest currency unit (e.g. 100
            cents for $1.00).
        items_discount_amount:
          type: integer
          description: >-
            Sum of all product-specific discounts applied to the order. It is
            expressed as an integer in the smallest currency unit (e.g. 100
            cents for $1.00).
        total_discount_amount:
          type: integer
          description: >-
            Sum of all order-level AND all product-specific discounts applied to
            the order. It is expressed as an integer in the smallest currency
            unit (e.g. 100 cents for $1.00).
        total_amount:
          type: integer
          description: >-
            Order amount after undoing all the discounts through the rollback
            redemption. It is expressed as an integer in the smallest currency
            unit (e.g. 100 cents for $1.00).
        applied_discount_amount:
          type: integer
          description: >-
            This field shows the order-level discount applied. It is expressed
            as an integer in the smallest currency unit (e.g. 100 cents for
            $1.00).
        items_applied_discount_amount:
          type: integer
          description: >-
            Sum of all product-specific discounts applied in a particular
            request. It is expressed as an integer in the smallest currency unit
            (e.g. 100 cents for $1.00).  

            `sum(items, i => i.applied_discount_amount)`
        total_applied_discount_amount:
          type: integer
          description: >-
            Sum of all order-level AND all product-specific discounts applied in
            a particular request. It is expressed as an integer in the smallest
            currency unit (e.g. 100 cents for $1.00).  

            `total_applied_discount_amount` = `applied_discount_amount` +
            `items_applied_discount_amount`
        metadata:
          type: object
          description: >-
            A set of custom key/value pairs that you can attach to an order. It
            can be useful for storing additional information about the order in
            a structured format. It can be used to define business validation
            rules or discount formulas.
        object:
          type: string
          description: The type of the object represented by JSON.
          default: order
          enum:
            - order
        created_at:
          type: string
          example: '2021-12-22T10:13:06.487Z'
          description: >-
            Timestamp representing the date and time when the order was created.
            The value is shown in the ISO 8601 format.
          format: date-time
        updated_at:
          type: string
          nullable: true
          example: '2021-12-22T10:14:45.316Z'
          format: date-time
          description: >-
            Timestamp representing the date and time when the order was last
            updated in ISO 8601 format.
        customer_id:
          type: string
          nullable: true
          description: >-
            Unique customer identifier of the customer making the purchase. The
            ID is assigned by Voucherify.
          example: cust_7iUa6ICKyU6gH40dBU25kQU1
        referrer_id:
          type: string
          nullable: true
          description: Unique referrer ID.
          example: cust_nM4jqPiaXUvQdVSA6vTRUnix
        customer:
          allOf:
            - $ref: '#/components/schemas/CustomerId'
        referrer:
          allOf:
            - $ref: '#/components/schemas/ReferrerId'
        redemptions:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/OrderRedemptionsEntry'
    OrderCalculatedItem:
      type: object
      title: Order Item Calculated
      properties:
        id:
          type: string
          description: Unique identifier of the order line item.
        sku_id:
          type: string
          description: Unique identifier of the SKU. It is assigned by Voucherify.
        product_id:
          type: string
          description: Unique identifier of the product. It is assigned by Voucherify.
        related_object:
          type: string
          enum:
            - product
            - sku
          description: >-
            Used along with the source_id property, can be set to either sku or
            product.
        source_id:
          type: string
          description: >-
            The merchant's product/SKU ID (if it is different from the
            Voucherify product/SKU ID). It is useful in the integration between
            multiple systems. It can be an ID from an eCommerce site, a
            database, or a third-party service.
        quantity:
          type: integer
          description: The quantity of the particular item in the cart.
        discount_quantity:
          type: integer
          description: Number of dicounted items.
        initial_quantity:
          type: integer
          description: >-
            A positive integer in the smallest unit quantity representing the
            total amount of the order; this is the sum of the order items'
            quantity.
        amount:
          type: integer
          description: The total amount of the order item (price * quantity).
        discount_amount:
          type: integer
          description: Sum of all order-item-level discounts applied to the order.
        applied_discount_amount:
          type: integer
          description: This field shows the order-level discount applied.
        applied_discount_quantity:
          type: integer
          description: Number of the discounted items applied in the transaction.
        applied_quantity:
          type: integer
          description: >-
            Quantity of items changed by the application of a new quantity
            items. It can be positive when an item is added or negative if an
            item is replaced.
        applied_quantity_amount:
          type: integer
          description: >-
            Amount for the items changed by the application of a new quantity
            items. It can be positive when an item is added or negative if an
            item is replaced.
        initial_amount:
          type: integer
          description: >-
            A positive integer in the smallest currency unit (e.g. 100 cents for
            $1.00) representing the total amount of the order. This is the sum
            of the order items' amounts.
        price:
          type: integer
          description: >-
            Unit price of an item. The value is multiplied by 100 to represent 2
            decimal places. For example `10000 cents` for `$100.00`.
        subtotal_amount:
          type: integer
          description: >-
            Final order item amount after the applied item-level discount.  If
            there are no item-level discounts applied, this item is equal to the
            `amount`.   

            `subtotal_amount`=`amount`-`applied_discount_amount`
        product:
          type: object
          description: An object containing details of the related product.
          properties:
            id:
              type: string
              description: >-
                A unique identifier that represents the product and is assigned
                by Voucherify.
            source_id:
              type: string
              description: >-
                The merchant's product ID (if it is different than Voucherify's
                product ID). It is really useful in case of integration between
                multiple systems. It can be an ID from an eCommerce site, a
                database or a 3rd party service.
            override:
              type: boolean
              description: >-
                The override set to `true` is used to store the product
                information in the system. If the product does not exist, it
                will be created with a source_id; if it does exist, the provided
                values for the name, price, and metadata will replace those
                already stored in the system.
            name:
              type: string
              description: Product name.
            metadata:
              type: object
              description: >-
                A set of custom key/value pairs that you can attach to a
                product. It can be useful for storing additional information
                about the product in a structured format. It can be used to
                create product collections.
            price:
              type: number
              description: >-
                Product price. A positive integer in the smallest currency unit
                (e.g. 100 cents for $1.00).
        sku:
          type: object
          description: An object containing details of the related SKU.
          properties:
            id:
              type: string
              description: >-
                A unique identifier that represents the SKU and is assigned by
                Voucherify.
            source_id:
              type: string
              description: >-
                The merchant's SKU ID (if it is different than Voucherify's SKU
                ID). It is really useful in case of integration between multiple
                systems. It can be an ID from an eCommerce site, a database or a
                3rd party service.
            override:
              type: boolean
              description: >-
                The override set to `true` is used to store the product
                information in the system. If the product does not exist, it
                will be created with a source_id; if it does exist, the provided
                values for the name, price, and metadata will replace those
                already stored in the system.
            sku:
              type: string
              description: The SKU name.
            price:
              type: number
              description: >-
                SKU price. A positive integer in the smallest currency unit
                (e.g. 100 cents for $1.00).
            metadata:
              type: object
              description: >-
                A set of custom key/value pairs that you can attach to an SKU.
                It can be useful for storing additional information about the
                SKU in a structured format. It can be used to create product
                collections.
        object:
          type: string
          default: order_item
          enum:
            - order_item
          description: The type of the object represented by JSON.
        metadata:
          type: object
          description: >-
            A set of custom key/value pairs that you can attach to an item
            object. It can be useful for storing additional information about
            the item in a structured format. It can be used to define business
            validation rules or discount formulas.
      required:
        - object
    CustomerId:
      title: Customer Id
      type: object
      properties:
        id:
          type: string
          description: A unique identifier of an existing customer.
        object:
          type: string
          description: The type of the object represented by JSON.
          default: customer
          enum:
            - customer
      required:
        - id
        - object
    ReferrerId:
      title: Referrer Id
      allOf:
        - $ref: '#/components/schemas/CustomerId'
    OrderRedemptionsEntry:
      title: Order Redemptions
      type: object
      properties:
        date:
          type: string
          description: >-
            Timestamp representing the date and time when the redemption was
            created. The value is shown in the ISO 8601 format.
          example: '2022-09-02T17:06:56.649Z'
          format: date-time
        rollback_id:
          type: string
          description: Unique ID of the redemption rollback.
          example: rr_0c63c84eb78ee0a6c0
        rollback_date:
          type: string
          description: >-
            Timestamp representing the date and time when the redemption
            rollback was created. The value is shown in the ISO 8601 format.
          example: '2023-01-31T14:18:37.150Z'
          format: date-time
        related_object_type:
          type: string
          description: The source of the incentive.
          default: redemption
        related_object_id:
          type: string
          description: Unique ID of the parent redemption.
          example: r_0ba186c4824e4881e1
        related_object_parent_id:
          type: string
          description: >-
            Represent's the campaign ID of the voucher if the redemption was
            based on a voucher that was part of bulk codes generated within a
            campaign. In case of a promotion tier, this represents the campaign
            ID of the promotion tier's parent campaign.
        stacked:
          type: array
          description: >-
            Contains a list of unique IDs of child redemptions, which belong to
            the stacked incentives.
          items:
            type: string
        rollback_stacked:
          type: array
          description: >-
            Lists the rollback redemption IDs of the particular child
            redemptions.
          items:
            type: string
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````