> ## 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.

# Get Voucher's Redemptions

> Retrieve the number of times a voucher was redeemed and each of the redemption details.



## OpenAPI

````yaml /openapi/redemptions.json get /v1/vouchers/{code}/redemption
openapi: 3.0.1
info:
  title: Voucherify API - Redemptions
  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/vouchers/{code}/redemption:
    parameters:
      - $ref: '#/components/parameters/code'
    get:
      tags:
        - Redemptions
      summary: Get Voucher's Redemptions
      description: >-
        Retrieve the number of times a voucher was redeemed and each of the
        redemption details.
      operationId: get-voucher-redemptions
      parameters: []
      responses:
        '200':
          description: >-
            A dictionary with a `redemption_entries` property that contains an
            array of voucher's redemptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VouchersRedemptionGetResponseBody'
              examples:
                Example:
                  value:
                    quantity: null
                    redeemed_quantity: 6
                    object: list
                    url: >-
                      /v1/vouchers/Test - FB - Vouchers -
                      9/redemptions?page=1&limit=10
                    data_ref: redemption_entries
                    total: 6
                    redemption_entries:
                      - id: r_0bc92f81a6801f9bca
                        object: redemption
                        date: '2022-10-03T12:24:58.008Z'
                        customer_id: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
                        tracking_id: >-
                          track_fxEMFisanb6bqeHALcTMxy9fmc+1Azdq951CZwGFCweQF8eGLowFHg==
                        metadata: {}
                        result: SUCCESS
                        order:
                          id: ord_bhp1EH2SDz7UwkkurPFPLPhi
                          source_id: null
                          created_at: '2022-10-03T12:24:56.179Z'
                          updated_at: null
                          status: PAID
                          amount: 230000
                          discount_amount: 100
                          total_discount_amount: 100
                          total_amount: 229900
                          applied_discount_amount: 100
                          total_applied_discount_amount: 100
                          items:
                            - object: order_item
                              product_id: prod_0bae45ffc7003ffc52
                              quantity: 1
                              amount: 230000
                              price: 230000
                              subtotal_amount: 230000
                              product:
                                id: prod_0bae45ffc7003ffc52
                                source_id: second_product
                                name: Samsung Phone 2
                                price: 230000
                          metadata: {}
                          customer:
                            id: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
                            object: customer
                          customer_id: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
                          referrer_id: null
                          object: order
                          redemptions:
                            r_0bc92f81a6801f9bca:
                              date: '2022-10-03T12:24:56.219Z'
                              related_object_type: voucher
                              related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        channel:
                          channel_id: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
                          channel_type: USER
                        customer:
                          id: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
                          name: null
                          email: null
                          source_id: johnnyy@email.com
                          metadata: {}
                          object: customer
                        related_object_type: voucher
                        related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        voucher:
                          id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                          code: Test - FB - Vouchers - 9
                          campaign_id: null
                      - id: r_0bc92e6a68050e118c
                        object: redemption
                        date: '2022-10-03T12:20:11.873Z'
                        customer_id: cust_TzWOhveicr7BI1Qg4bCFrrQQ
                        tracking_id: track_5DQxXbK0C0pvAaHk7mnulmKhuFqhawWj
                        metadata: {}
                        result: SUCCESS
                        order:
                          id: ord_rBsuJYqf4eFZgqj6IxeJgEcN
                          source_id: null
                          created_at: '2022-10-03T12:20:10.222Z'
                          updated_at: null
                          status: PAID
                          amount: 230000
                          discount_amount: 100
                          total_discount_amount: 100
                          total_amount: 229900
                          applied_discount_amount: 100
                          total_applied_discount_amount: 100
                          items:
                            - object: order_item
                              product_id: prod_0bae45ffc7003ffc52
                              quantity: 1
                              amount: 230000
                              price: 230000
                              subtotal_amount: 230000
                              product:
                                id: prod_0bae45ffc7003ffc52
                                source_id: second_product
                                name: Samsung Phone 2
                                price: 230000
                          metadata: {}
                          customer:
                            id: cust_TzWOhveicr7BI1Qg4bCFrrQQ
                            object: customer
                          customer_id: cust_TzWOhveicr7BI1Qg4bCFrrQQ
                          referrer_id: null
                          object: order
                          redemptions:
                            r_0bc92e6a68050e118c:
                              date: '2022-10-03T12:20:10.272Z'
                              related_object_type: voucher
                              related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        channel:
                          channel_id: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
                          channel_type: USER
                        customer:
                          id: cust_TzWOhveicr7BI1Qg4bCFrrQQ
                          name: Bob Jones
                          email: bob.smith@email.com
                          source_id: pub_source_customer_4
                          metadata:
                            lang: en
                            test: true
                          object: customer
                        related_object_type: voucher
                        related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        voucher:
                          id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                          code: Test - FB - Vouchers - 9
                          campaign_id: null
                      - id: r_0bc92db6e6001f9aa8
                        object: redemption
                        date: '2022-10-03T12:17:07.780Z'
                        customer_id: cust_BB6F97yf0XqCe7hxVUV7M4sS
                        tracking_id: track_5DQxXbK0C0pvAaHk7mnulmYlx396Pk4X
                        metadata: {}
                        result: SUCCESS
                        order:
                          id: ord_JvZbg1LFcXdQ67no5SENGldH
                          source_id: null
                          created_at: '2022-10-03T12:17:06.404Z'
                          updated_at: null
                          status: PAID
                          amount: 230000
                          discount_amount: 1200
                          total_discount_amount: 1200
                          total_amount: 228800
                          applied_discount_amount: 1200
                          total_applied_discount_amount: 1200
                          items:
                            - object: order_item
                              product_id: prod_0bae45ffc7003ffc52
                              quantity: 1
                              amount: 230000
                              price: 230000
                              subtotal_amount: 230000
                              product:
                                id: prod_0bae45ffc7003ffc52
                                source_id: second_product
                                name: Samsung Phone 2
                                price: 230000
                          metadata: {}
                          customer:
                            id: cust_BB6F97yf0XqCe7hxVUV7M4sS
                            object: customer
                          customer_id: cust_BB6F97yf0XqCe7hxVUV7M4sS
                          referrer_id: null
                          object: order
                          redemptions:
                            r_0bc92db6e6001f9aa8:
                              date: '2022-10-03T12:17:06.456Z'
                              related_object_type: voucher
                              related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        channel:
                          channel_id: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
                          channel_type: USER
                        customer:
                          id: cust_BB6F97yf0XqCe7hxVUV7M4sS
                          name: Bob Jones
                          email: bob.smith@email.com
                          source_id: pub_source_customer_5
                          metadata:
                            lang: en
                            test: true
                          object: customer
                        related_object_type: voucher
                        related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        voucher:
                          id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                          code: Test - FB - Vouchers - 9
                          campaign_id: null
                      - id: r_0bc2dc6404426c0ab3
                        object: redemption
                        date: '2022-09-28T14:30:56.199Z'
                        customer_id: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
                        tracking_id: >-
                          track_fxEMFisanb6bqeHALcTMxy9fmc+1Azdq951CZwGFCweQF8eGLowFHg==
                        metadata: {}
                        result: SUCCESS
                        order:
                          id: ord_6uuhGraDuXMOpVRTJT251kKW
                          source_id: null
                          created_at: '2022-09-28T14:30:54.681Z'
                          updated_at: null
                          status: PAID
                          amount: 230000
                          discount_amount: 800
                          total_discount_amount: 800
                          total_amount: 229200
                          applied_discount_amount: 800
                          total_applied_discount_amount: 800
                          items:
                            - object: order_item
                              product_id: prod_0bae45ffc7003ffc52
                              quantity: 1
                              amount: 230000
                              price: 230000
                              subtotal_amount: 230000
                              product:
                                id: prod_0bae45ffc7003ffc52
                                source_id: second_product
                                name: Samsung Phone 2
                                price: 230000
                          metadata: {}
                          customer:
                            id: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
                            object: customer
                          customer_id: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
                          referrer_id: null
                          object: order
                          redemptions:
                            r_0bc2dc6404426c0ab3:
                              date: '2022-09-28T14:30:54.737Z'
                              related_object_type: voucher
                              related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        channel:
                          channel_id: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
                          channel_type: USER
                        customer:
                          id: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
                          name: null
                          email: null
                          source_id: jonny@email.com
                          metadata: {}
                          object: customer
                        related_object_type: voucher
                        related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        voucher:
                          id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                          code: Test - FB - Vouchers - 9
                          campaign_id: null
                      - id: r_0bc2d6f0ebc95f1783
                        object: redemption
                        date: '2022-09-28T14:07:07.516Z'
                        customer_id: cust_H0nXrItO1DNV3UiPIl54HA5o
                        tracking_id: track_ThofCMTQe4EVIo0zvvOlTor1twaQNd7E
                        metadata: {}
                        result: SUCCESS
                        order:
                          id: ord_ZQevc2J2sBegsnp5DwanXHsa
                          source_id: null
                          created_at: '2022-09-28T14:07:06.073Z'
                          updated_at: null
                          status: PAID
                          amount: 230000
                          discount_amount: 0
                          total_discount_amount: 0
                          total_amount: 230000
                          applied_discount_amount: 0
                          total_applied_discount_amount: 0
                          items:
                            - object: order_item
                              product_id: prod_0bae45ffc7003ffc52
                              quantity: 1
                              amount: 230000
                              price: 230000
                              subtotal_amount: 230000
                              product:
                                id: prod_0bae45ffc7003ffc52
                                source_id: second_product
                                name: Samsung Phone 2
                                price: 230000
                          metadata: {}
                          customer:
                            id: cust_H0nXrItO1DNV3UiPIl54HA5o
                            object: customer
                          customer_id: cust_H0nXrItO1DNV3UiPIl54HA5o
                          referrer_id: null
                          object: order
                          redemptions:
                            r_0bc2d6f0ebc95f1783:
                              date: '2022-09-28T14:07:06.159Z'
                              related_object_type: voucher
                              related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        channel:
                          channel_id: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
                          channel_type: USER
                        customer:
                          id: cust_H0nXrItO1DNV3UiPIl54HA5o
                          name: Bob Smith
                          email: bob.smith.1@email.com
                          source_id: bob.smith.1@email.com
                          metadata:
                            lang: en
                            test: false
                          object: customer
                        related_object_type: voucher
                        related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        voucher:
                          id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                          code: Test - FB - Vouchers - 9
                          campaign_id: null
                      - id: r_0bc2d3c4f7495f159a
                        object: redemption
                        date: '2022-09-28T13:53:16.057Z'
                        customer_id: cust_tAED42tFhLM9v7GmZUaklJFd
                        tracking_id: track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=
                        metadata: {}
                        result: SUCCESS
                        order:
                          id: ord_ff6rwr58kmdyuLsi5orplnVW
                          source_id: null
                          created_at: '2022-09-28T13:53:14.604Z'
                          updated_at: null
                          status: PAID
                          amount: 230000
                          discount_amount: 800
                          total_discount_amount: 800
                          total_amount: 229200
                          applied_discount_amount: 800
                          total_applied_discount_amount: 800
                          items:
                            - object: order_item
                              product_id: prod_0bae45ffc7003ffc52
                              quantity: 1
                              amount: 230000
                              price: 230000
                              subtotal_amount: 230000
                              product:
                                id: prod_0bae45ffc7003ffc52
                                source_id: second_product
                                name: Samsung Phone 2
                                price: 230000
                          metadata: {}
                          customer:
                            id: cust_tAED42tFhLM9v7GmZUaklJFd
                            object: customer
                          customer_id: cust_tAED42tFhLM9v7GmZUaklJFd
                          referrer_id: null
                          object: order
                          redemptions:
                            r_0bc2d3c4f7495f159a:
                              date: '2022-09-28T13:53:14.717Z'
                              related_object_type: voucher
                              related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        channel:
                          channel_id: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
                          channel_type: USER
                        customer:
                          id: cust_tAED42tFhLM9v7GmZUaklJFd
                          name: John Smith
                          email: john.smith@email.com
                          source_id: john.smith@email.com
                          metadata:
                            acquisition_channel: Facebook
                          object: customer
                        related_object_type: voucher
                        related_object_id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                        voucher:
                          id: v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno
                          code: Test - FB - Vouchers - 9
                          campaign_id: null
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - vouchers
components:
  parameters:
    code:
      name: code
      in: path
      schema:
        $ref: '#/components/schemas/ParameterCode'
      description: A **code** that identifies the voucher.
      required: true
  schemas:
    VouchersRedemptionGetResponseBody:
      type: object
      title: Vouchers Redemption Get Response Body
      description: Response body schema for **GET** `v1/vouchers/{code}/redemption`.
      properties:
        quantity:
          type: integer
          nullable: true
          description: The maximum number of times a voucher can be redeemed.
        redeemed_quantity:
          type: integer
          description: The number of times the voucher was redeemed successfully.
        object:
          type: string
          default: list
          description: >-
            The type of the object represented by JSON. This object stores
            information about redemptions in a dictionary.
        url:
          type: string
          example: /v1/vouchers/PROMO-CODE2/redemptions?page=1&limit=10
          description: URL
        data_ref:
          type: string
          default: redemption_entries
          description: >-
            Identifies the name of the attribute that contains the array of
            `redemption_entries`.
        total:
          type: integer
          description: Total number of redemption objects.
        redemption_entries:
          description: Contains the array of successful and failed redemption objects.
          items:
            title: Vouchers Redemption Get Response Body Redemption Entries Item
            allOf:
              - $ref: '#/components/schemas/RedemptionEntry'
      required:
        - quantity
        - redeemed_quantity
        - object
        - url
        - data_ref
        - total
        - redemption_entries
    ParameterCode:
      type: string
      example: 2CpRCE2c
    RedemptionEntry:
      title: Redemption Entry
      oneOf:
        - $ref: >-
            #/components/schemas/RedemptionWithVoucherWithoutStackingRulesTypeCategories
        - $ref: '#/components/schemas/RedemptionRollback'
    RedemptionWithVoucherWithoutStackingRulesTypeCategories:
      title: Redemption
      type: object
      description: This is an object representing a redemption.
      allOf:
        - $ref: '#/components/schemas/RedemptionBase'
        - type: object
          properties:
            voucher:
              description: Defines the details of the voucher being redeemed.
              allOf:
                - $ref: '#/components/schemas/Voucher'
                - $ref: '#/components/schemas/VoucherHolder'
    RedemptionRollback:
      title: Redemption Rollback
      type: object
      description: This is an object representing a redemption rollback.
      properties:
        id:
          type: string
          example: rr_0efeb3dab05e62e599
          description: Unique identifier of the redemption rollback.
        object:
          type: string
          description: The type of the object represented by the JSON
          default: redemption_rollback
          enum:
            - redemption_rollback
        date:
          type: string
          example: '2021-12-22T10:13:06.487Z'
          description: >-
            Timestamp representing the date and time when the object was
            created. The value is shown in the ISO 8601 format.
          format: date-time
        customer_id:
          type: string
          nullable: true
          example: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
          description: Unique customer ID of the redeeming customer.
        tracking_id:
          type: string
          nullable: true
          description: Hashed customer source ID.
        metadata:
          type: object
          nullable: true
          description: >-
            The metadata object stores all custom attributes assigned to the
            redemption.
        amount:
          type: integer
          description: >-
            For gift cards, this represents the number of the credits restored
            to the card in the rolledback redemption. The number is a negative
            integer in the smallest currency unit, e.g. -100 cents for $1.00
            added back to the card.

            For loyalty cards, this represents the number of loyalty points
            restored to the card in the rolledback redemption. The number is a
            negative integer.
          example: -10000
        redemption:
          nullable: true
          type: string
          description: Unique redemption ID of the parent redemption.
          example: r_0c656311b5878a2031
        reason:
          type: string
          description: >-
            System generated cause for the redemption being invalid in the
            context of the provided parameters.
        result:
          type: string
          enum:
            - SUCCESS
            - FAILURE
          description: Redemption result.
        status:
          type: string
          enum:
            - SUCCEEDED
            - FAILED
          description: Redemption status.
        failure_code:
          type: string
          example: customer_rules_violated
          description: >-
            If the result is `FAILURE`, this parameter will provide a generic
            reason as to why the redemption failed.
        failure_message:
          type: string
          description: >-
            If the result is `FAILURE`, this parameter will provide a more
            expanded reason as to why the redemption failed.
        order:
          nullable: true
          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'
        channel:
          type: object
          description: >-
            Defines the details of the channel through which the redemption was
            issued.
          properties:
            channel_id:
              type: string
              example: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
              description: >-
                Unique identifier of the channel which was used by the user
                performing the redemption rollback. This is either a user ID
                from the user using the Voucherify Dashboard or an X-APP-Id of a
                user using the API.
            channel_type:
              type: string
              description: >-
                The source of the channel for the redemption. A `USER`
                corresponds to the Voucherify Dashboard and an `API` corresponds
                to the API.
              enum:
                - USER
                - API
        customer:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/SimpleCustomer'
        related_object_type:
          type: string
          description: Defines the related object.
          enum:
            - voucher
            - promotion_tier
            - redemption
        related_object_id:
          type: string
          description: >-
            Unique identifier of the related object. It is assigned by
            Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher.
        voucher:
          description: Defines the details of the voucher being originally redeemed.
          allOf:
            - $ref: '#/components/schemas/Voucher'
        promotion_tier:
          description: Contains details of the promotion tier and the parent campaign.
          allOf:
            - $ref: '#/components/schemas/PromotionTier'
        reward:
          $ref: '#/components/schemas/RedemptionRewardResult'
        gift:
          type: object
          description: >-
            Contains the amount returned to the gift card in the redemption
            rollback. It is expressed as a negative integer.
          properties:
            amount:
              type: integer
              description: >-
                Amount returned to the gift card as a result of the redemption
                rollback and expressed as a negative integer. The amount is
                expressed as the smallest currency unit (e.g. -100 cents for
                $1.00 returned).
        loyalty_card:
          type: object
          description: >-
            Contains the number of points returned to the loyalty card in the
            reward redemption rollback. It is expressed as a negative integer.
          properties:
            points:
              type: integer
              description: >-
                Number of points being returned to the loyalty card for the
                reward redemption rollback. It is expressed as a negative
                integer.
      required:
        - id
        - object
        - date
        - customer_id
        - tracking_id
        - metadata
        - redemption
        - result
        - status
        - order
        - channel
        - customer
        - related_object_type
        - related_object_id
    RedemptionBase:
      title: Redemption Base
      type: object
      properties:
        id:
          type: string
          example: r_0bc92f81a6801f9bca
          description: Unique redemption ID.
        object:
          type: string
          description: The type of the object represented by the JSON
          default: redemption
          enum:
            - redemption
        date:
          type: string
          example: '2021-12-22T10:13:06.487Z'
          description: >-
            Timestamp representing the date and time when the object was
            created. The value is shown in the ISO 8601 format.
          format: date-time
        customer_id:
          type: string
          nullable: true
          example: cust_i8t5Tt6eiKG5K79KQlJ0Vs64
          description: Unique customer ID of the redeeming customer.
        tracking_id:
          type: string
          nullable: true
          description: Hashed customer source ID.
        metadata:
          type: object
          nullable: true
          description: >-
            The metadata object stores all custom attributes assigned to the
            redemption.
        amount:
          type: integer
          description: >-
            For gift cards, this is a positive integer in the smallest currency
            unit (e.g. 100 cents for $1.00) representing the number of redeemed
            credits.

            For loyalty cards, this is the number of loyalty points used in the
            transaction.
          example: 10000
        redemption:
          nullable: true
          type: string
          description: Unique redemption ID of the parent redemption.
          example: r_0c656311b5878a2031
        result:
          type: string
          enum:
            - SUCCESS
            - FAILURE
          description: Redemption result.
        status:
          type: string
          enum:
            - SUCCEEDED
            - FAILED
            - ROLLED_BACK
          description: Redemption status.
        session:
          type: object
          description: >-
            Contains details about the redemption session lock. Sessions can be
            established only for discount vouchers, promotions, and gift cards.
          properties:
            key:
              type: string
              description: >-
                The session unique ID assigned by Voucherify or your own unique
                session ID sent in the request.
        related_redemptions:
          type: object
          properties:
            rollbacks:
              type: array
              items:
                title: Redemption Related Redemptions Rollbacks Item
                type: object
                properties:
                  id:
                    type: string
                    example: rr_0bc92f81a6801f9bca
                    description: Unique rollback redemption ID.
                  date:
                    type: string
                    example: '2021-12-22T10:13:06.487Z'
                    description: >-
                      Timestamp representing the date and time when the object
                      was created. The value is shown in the ISO 8601 format.
                    format: date-time
                  rollback_order_mode:
                    type: string
                    description: >-
                      Defines the rollback mode for the order. `WITH_ORDER` is a
                      default setting. The redemption is rolled back together
                      with the data about the order, including related discount
                      values. `WITHOUT_ORDER` allows rolling the redemption back
                      without affecting order data, including the applied
                      discount values. This is returned only in GET
                      `v1/redemptions/` and GET `v1/redemptions/{redemptionId}`
                      endpoints.
                    enum:
                      - WITH_ORDER
                      - WITHOUT_ORDER
            redemptions:
              type: array
              items:
                title: Redemption Related Redemptions Item
                type: object
                properties:
                  id:
                    type: string
                    example: r_0bc92f81a6801f9bca
                    description: Unique redemption ID.
                  date:
                    type: string
                    example: '2021-12-22T10:13:06.487Z'
                    description: >-
                      Timestamp representing the date and time when the object
                      was created. The value is shown in the ISO 8601 format.
                    format: date-time
        failure_code:
          type: string
          example: customer_rules_violated
          description: >-
            If the result is `FAILURE`, this parameter will provide a generic
            reason as to why the redemption failed.
        failure_message:
          type: string
          description: >-
            If the result is `FAILURE`, this parameter will provide a more
            expanded reason as to why the redemption failed.
        order:
          nullable: true
          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:
                    allOf:
                      - $ref: '#/components/schemas/OrderCalculatedItem'
                      - type: object
                        properties:
                          application_details:
                            $ref: '#/components/schemas/ApplicationDetails'
        channel:
          type: object
          description: >-
            Defines the details of the channel through which the redemption was
            issued.
          properties:
            channel_id:
              type: string
              example: user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH
              description: >-
                Unique channel ID of the user performing the redemption. This is
                either a user ID from a user using the Voucherify Dashboard or
                an X-APP-Id of a user using the API. For `AUTO_REDEEM`, it is
                the reward assignment ID.
            channel_type:
              type: string
              description: >-
                The source of the channel for the redemption. A `USER`
                corresponds to the Voucherify Dashboard, `API` corresponds to
                the API, and `AUTO_REDEEM` corresponds to a loyalty campaign
                reward that has been redeemed automatically.
              enum:
                - USER
                - API
                - AUTO_REDEEM
        customer:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/SimpleCustomer'
        related_object_type:
          type: string
          description: Defines the related object.
          enum:
            - voucher
            - promotion_tier
            - redemption
        related_object_id:
          type: string
          description: >-
            Unique related object ID assigned by Voucherify, i.e.
            v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.
        promotion_tier:
          description: Contains details of the promotion tier and the parent campaign.
          allOf:
            - $ref: '#/components/schemas/PromotionTier'
        reward:
          $ref: '#/components/schemas/RedemptionRewardResult'
        gift:
          type: object
          description: >-
            Contains the amount subtracted from the gift card for the
            redemption.
          properties:
            amount:
              type: integer
              description: >-
                Amount subtracted from the gift card as a result of the
                redemption. The amount is expressed as the smallest currency
                unit (e.g. 100 cents for $1.00).
        loyalty_card:
          type: object
          description: >-
            Contains the number of points subtracted from the loyalty card for
            the redemption.
          properties:
            points:
              type: integer
              description: >-
                Number of points subtracted from the loyalty card as a result of
                the redemption.
      required:
        - id
        - object
        - date
        - customer_id
        - tracking_id
        - metadata
        - redemption
        - result
        - status
        - order
        - channel
        - customer
        - related_object_type
        - related_object_id
    Voucher:
      title: Voucher
      description: >-
        This is an object representing a voucher with categories and validation
        rules assignments.
      allOf:
        - $ref: '#/components/schemas/VoucherBase'
        - type: object
          properties:
            categories:
              type: array
              description: Contains details about the category.
              items:
                $ref: '#/components/schemas/Category'
            validation_rules_assignments:
              $ref: '#/components/schemas/ValidationRulesAssignmentsList'
    VoucherHolder:
      title: Voucher Holder
      type: object
      description: This is an object representing a voucher holder.
      properties:
        holder:
          $ref: '#/components/schemas/SimpleCustomer'
    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
    SimpleCustomer:
      title: Simple Customer
      type: object
      description: Simplified customer data.
      properties:
        id:
          type: string
          description: >-
            Unique identifier of an existing customer. It is assigned by
            Voucherify.
        name:
          type: string
          description: Customer's first and last name.
        email:
          type: string
          description: Customer's email address.
        source_id:
          type: string
          description: >-
            A unique identifier of the customer. It can be a customer ID or
            email from a CRM system, database, or a third-party service.
        metadata:
          type: object
          description: >-
            A set of custom key/value pairs that are attached to the customer.
            It stores all custom attributes assigned to the customer.
        object:
          type: string
          description: The type of the object represented by JSON.
          enum:
            - customer
    PromotionTier:
      type: object
      description: >-
        This is an object representing a promotion tier. Promotion tiers are
        always assigned to a campaign and cannot be used standalone.
      title: Promotion Tier
      properties:
        id:
          type: string
          example: promo_63fYCt81Aw0h7lzyRkrGZh9p
          description: Unique promotion tier ID.
        created_at:
          type: string
          example: '2021-12-15T11:34:01.333Z'
          format: date-time
          description: >-
            Timestamp representing the date and time when the promotion tier was
            created. The value is shown in the ISO 8601 format.
        updated_at:
          type: string
          example: '2022-02-09T09:20:05.603Z'
          format: date-time
          description: >-
            Timestamp representing the date and time when the promotion tier was
            updated. The value is shown in the ISO 8601 format.
        name:
          type: string
          description: Name of the promotion tier.
        banner:
          type: string
          description: Text to be displayed to your customers on your website.
        action:
          type: object
          description: Contains details about the discount applied by the promotion tier.
          properties:
            discount:
              $ref: '#/components/schemas/Discount'
        metadata:
          type: object
          description: >-
            The metadata object stores all custom attributes assigned to the
            promotion tier. A set of key/value pairs that you can attach to a
            promotion tier object. It can be useful for storing additional
            information about the promotion tier in a structured format.
        hierarchy:
          type: integer
          description: >-
            The promotions hierarchy defines the order in which the discounts
            from different tiers will be applied to a customer's order. If a
            customer qualifies for discounts from more than one tier, discounts
            will be applied in the order defined in the hierarchy.
        promotion_id:
          type: string
          description: Promotion unique ID.
        campaign:
          type: object
          description: Contains details about promotion tier's parent campaign.
          properties:
            id:
              type: string
              description: Unique campaign ID.
            start_date:
              type: string
              description: >-
                Activation timestamp defines when the campaign starts to be
                active in ISO 8601 format. Campaign is *inactive before* this
                date. 
              format: date-time
              example: '2022-09-22T00:00:00.000Z'
            expiration_date:
              type: string
              format: date-time
              description: >-
                Expiration timestamp defines when the campaign expires in ISO
                8601 format.  Campaign is *inactive after* this date.
              example: '2022-09-30T00:00:00.000Z'
            validity_timeframe:
              $ref: '#/components/schemas/ValidityTimeframe'
            validity_day_of_week:
              $ref: '#/components/schemas/ValidityDayOfWeek'
            validity_hours:
              $ref: '#/components/schemas/ValidityHours'
            active:
              type: boolean
              description: >-
                A flag indicating whether the campaign is active or not active.
                A campaign can be disabled even though it's within the active
                period defined by the `start_date` and `expiration_date` using
                the [Disable Campaign](/api-reference/disable-campaign)
                endpoint.  


                - `true` indicates an *active* campaign

                - `false` indicates an *inactive* campaign
            category_id:
              type: string
              example: cat_0b688929a2476386a6
              description: Unique category ID that this campaign belongs to.
            object:
              type: string
              description: >-
                The type of the object represented by the campaign object. This
                object stores information about the campaign.
              default: campaign
        campaign_id:
          type: string
          description: Promotion tier's parent campaign's unique ID.
        active:
          type: boolean
          description: >-
            A flag to toggle the promotion tier on or off. You can disable a
            promotion tier even though it's within the active period defined by
            the `start_date` and `expiration_date`.  


            - `true` indicates an *active* promotion tier

            - `false` indicates an *inactive* promotion tier
        start_date:
          type: string
          description: >-
            Activation timestamp defines when the promotion tier starts to be
            active in ISO 8601 format. Promotion tier is *inactive before* this
            date. 
          format: date-time
          example: '2022-09-23T00:00:00.000Z'
        expiration_date:
          type: string
          description: >-
            Activation timestamp defines when the promotion tier expires in ISO
            8601 format. Promotion tier is *inactive after* this date. 
          format: date-time
          example: '2022-09-26T00:00:00.000Z'
        validity_timeframe:
          $ref: '#/components/schemas/ValidityTimeframe'
        validity_day_of_week:
          $ref: '#/components/schemas/ValidityDayOfWeek'
        validity_hours:
          $ref: '#/components/schemas/ValidityHours'
        summary:
          type: object
          description: Contains statistics about promotion tier redemptions and orders.
          properties:
            redemptions:
              type: object
              description: Contains statistics about promotion tier redemptions.
              properties:
                total_redeemed:
                  type: integer
                  description: Number of times the promotion tier was redeemed.
            orders:
              type: object
              description: Contains statistics about orders related to the promotion tier.
              properties:
                total_amount:
                  type: integer
                  description: Sum of order totals.
                total_discount_amount:
                  type: integer
                  description: Sum of total discount applied using the promotion tier.
        object:
          type: string
          default: promotion_tier
          description: >-
            The type of the object represented by JSON. This object stores
            information about the promotion tier.
        validation_rule_assignments:
          $ref: '#/components/schemas/ValidationRuleAssignmentsList'
        category_id:
          type: string
          description: Promotion tier category ID.
          example: cat_0c9da30e7116ba6bba
        categories:
          type: array
          items:
            $ref: '#/components/schemas/Category'
    RedemptionRewardResult:
      title: Redemption Reward Result
      type: object
      properties:
        customer:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/SimpleCustomer'
        assignment_id:
          type: string
          nullable: true
          description: Unique reward assignment ID assigned by Voucherify.
        voucher:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Voucher'
        product:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Product'
        sku:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Sku'
        loyalty_tier_id:
          type: string
          nullable: true
          description: Unique loyalty tier ID assigned by Voucherify.
        id:
          type: string
          example: rew_0bc92f81a6801f9bca
          description: Unique reward ID.
        name:
          type: string
          example: Reward Name
          description: Name of the reward.
        object:
          type: string
          description: The type of the object represented by the JSON
          default: reward
          enum:
            - reward
        created_at:
          type: string
          example: '2021-12-22T10:13:06.487Z'
          description: >-
            Timestamp representing the date and time when the redemption was
            created. The value is shown in the ISO 8601 format.
          format: date-time
        updated_at:
          type: string
          format: date-time
          example: '2022-10-03T12:24:58.008Z'
          description: Timestamp in ISO 8601 format indicating when the reward was updated.
        parameters:
          type: object
          description: These are parameters representing a material reward.
          properties:
            campaign:
              type: object
              description: Defines the product redeemed as a reward.
              properties:
                id:
                  type: string
                  description: Campaign unique ID.
                  example: camp_13BbZ0kQsNinhqsX3wUts2UP
                balance:
                  type: integer
                  description: >-
                    Points available for reward redemption. This is calculated
                    as follows: `balance` = `points` - `expired_points` -
                    `subtracted_points` - `redemption.redeemed_points`.
                type:
                  type: string
                  description: Defines the type of the campaign.
            product:
              type: object
              description: Defines the product redeemed as a reward.
              properties:
                id:
                  type: string
                  example: prod_0b7d7dfb05cbe5c616
                  description: 'Unique product ID, assigned by Voucherify. '
                sku_id:
                  type: string
                  description: Unique identifier of the SKU. It is assigned by Voucherify.
                  example: sku_0a41e31c7b41c28358
            coin:
              type: object
              description: >-
                Defines the ratio by mapping the number of loyalty points in
                `points_ratio` to a predefined cash amount in `exchange_ratio`.
              properties:
                exchange_ratio:
                  type: integer
                  description: >-
                    The cash equivalent of the points defined in the
                    `points_ratio` property.
                points_ratio:
                  type: integer
                  description: >-
                    The number of loyalty points that will map to the predefined
                    cash amount defined by the `exchange_ratio` property.
        metadata:
          type: object
          description: >-
            A set of custom key/value pairs that you can attach to a reward. The
            metadata object stores all custom attributes assigned to the reward.
        type:
          type: string
          enum:
            - CAMPAIGN
            - COIN
            - MATERIAL
          description: Reward type.
      required:
        - reward
        - customer
        - assignment_id
        - voucher
        - product
        - sku
        - loyalty_tier_id
    ApplicationDetails:
      type: array
      description: >-
        Array containing details about the items that are replaced and the items
        that are replacements for discounts with the `REPLACE_ITEMS` effect.
      items:
        type: object
        description: Object representing item replacement.
        properties:
          source_index:
            type: integer
            description: >-
              Index number of the source item that is replaced. The enumeration
              starts from `0`, which represents the first item in the request,
              e.g., if the replaced item is passed as the second in the request,
              `source_index` equals `3`.
            minimum: 0
          source_applied_quantity:
            type: integer
            description: Number of source units that are replaced.
            maximum: -1
          source_applied_quantity_amount:
            type: integer
            description: >-
              Amount equal to the price of the units that are replaced.
              Determines the change of the amount of the source item quantity.
            maximum: 0
          target_index:
            type: integer
            description: >-
              Index number of the target item that is a replacement of the
              source item. The enumeration continues the values for the order
              items, e.g. if there are three items in the request,
              `target_index` equals `3`, as enumeration starts from `0`.
          target_applied_quantity:
            type: integer
            description: Number of added target units that are replacements.
          target_applied_quantity_amount:
            type: integer
            description: >-
              Amount equal to the price of the units that are replacements.
              Determines the change in the amount of the target item quantity.
          target_applied_discount_amount:
            type: integer
            description: >-
              Discount amount applied to the target item with regard to the
              replacement. Equals the `target_applied_quantity_amount` minus
              `source_applied_quantity_amount`.
    VoucherBase:
      title: Voucher Base
      description: This is an object representing a voucher.
      type: object
      properties:
        id:
          type: string
          example: v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV
          description: Assigned by the Voucherify API, identifies the voucher.
        code:
          type: string
          example: WVPblOYX
          description: >-
            A code that identifies a voucher. Pattern can use all letters of the
            English alphabet, Arabic numerals, and special characters.
        campaign:
          type: string
          example: Gift Card Campaign
          description: A unique campaign name, identifies the voucher's parent campaign.
        campaign_id:
          type: string
          example: camp_FNYR4jhqZBM9xTptxDGgeNBV
          description: >-
            Assigned by the Voucherify API, identifies the voucher's parent
            campaign.
        category:
          type: string
          description: >-
            Tag defining the category that this voucher belongs to. Useful when
            listing vouchers using the List Vouchers endpoint.
        category_id:
          type: string
          description: Unique category ID assigned by Voucherify.
          example: cat_0bb343dee3cdb5ec0c
        type:
          type: string
          enum:
            - GIFT_VOUCHER
            - DISCOUNT_VOUCHER
            - LOYALTY_CARD
          description: 'Defines the type of the voucher. '
        discount:
          $ref: '#/components/schemas/Discount'
        gift:
          type: object
          description: >-
            Object representing gift parameters. Child attributes are present
            only if `type` is `GIFT_VOUCHER`. Defaults to `null`.
          properties:
            amount:
              type: integer
              example: 10000
              description: >-
                Total gift card income over the lifetime of the card. The value
                is multiplied by 100 to represent 2 decimal places. For example
                `10000 cents` for `$100.00`.
            subtracted_amount:
              type: integer
              description: >-
                Total amount of subtracted credits over the gift card lifetime.
                The value is multiplied by 100 to represent 2 decimal places.
                For example `10000 cents` for `$100.00`.
            balance:
              type: integer
              example: 500
              description: >-
                Available funds. The value is multiplied by 100 to represent 2
                decimal places. For example `10000 cents` for `$100.00`.
            effect:
              type: string
              enum:
                - APPLY_TO_ORDER
                - APPLY_TO_ITEMS
              description: Defines how the credits are applied to the customer's order.
        loyalty_card:
          type: object
          description: >-
            Object representing loyalty card parameters. Child attributes are
            present only if `type` is `LOYALTY_CARD`. Defaults to `null`.
          properties:
            points:
              type: integer
              example: 7000
              description: >-
                Total number of points added to the loyalty card over its
                lifespan.
            balance:
              type: integer
              example: 6970
              description: >-
                Points available for reward redemption. This is calculated as
                follows: `balance` = `points` - `expired_points` -
                `subtracted_points` - `redemption.redeemed_points`.
            next_expiration_date:
              type: string
              format: date
              example: '2023-05-30'
              description: >-
                The next closest date when the next set of points are due to
                expire.
            next_expiration_points:
              type: integer
              description: The amount of points that are set to expire next.
            pending_points:
              type: integer
              description: >-
                Shows the number of pending points that will be added to the
                loyalty card when they are activated automatically or manually.
            expired_points:
              type: integer
              description: >-
                Shows the total number of expired points over the lifetime of
                the loyalty card.
            subtracted_points:
              type: integer
              description: >-
                Shows the total number of subtracted points over the lifetime of
                the loyalty card.
        start_date:
          type: string
          example: '2021-12-01T00:00:00.000Z'
          format: date-time
          description: >-
            Activation timestamp defines when the code starts to be active in
            ISO 8601 format. Voucher is *inactive before* this date. 
        expiration_date:
          type: string
          example: '2021-12-31T00:00:00.000Z'
          format: date-time
          description: >-
            Expiration timestamp defines when the code expires in ISO 8601
            format.  Voucher is *inactive after* this date.
        validity_timeframe:
          $ref: '#/components/schemas/ValidityTimeframe'
        validity_day_of_week:
          $ref: '#/components/schemas/ValidityDayOfWeek'
        validity_hours:
          $ref: '#/components/schemas/ValidityHours'
        active:
          type: boolean
          nullable: true
          description: >-
            A flag to toggle the voucher on or off. You can disable a voucher
            even though it's within the active period defined by the
            `start_date` and `expiration_date`.  


            - `true` indicates an *active* voucher

            - `false` indicates an *inactive* voucher
        additional_info:
          type: string
          description: >-
            An optional field to keep any extra textual information about the
            code such as a code description and details.
        metadata:
          type: object
          description: >-
            The metadata object stores all custom attributes assigned to the
            code. A set of key/value pairs that you can attach to a voucher
            object. It can be useful for storing additional information about
            the voucher in a structured format.
        assets:
          $ref: '#/components/schemas/VoucherAssets'
        is_referral_code:
          type: boolean
          nullable: true
          description: >-
            Flag indicating whether this voucher is a referral code; `true` for
            campaign type `REFERRAL_PROGRAM`.
        created_at:
          type: string
          example: '2021-12-22T10:13:06.487Z'
          description: >-
            Timestamp representing the date and time when the voucher was
            created. The value is shown in the ISO 8601 format.
          format: date-time
        updated_at:
          type: string
          example: '2021-12-22T10:14:45.316Z'
          format: date-time
          description: >-
            Timestamp representing the date and time when the voucher was last
            updated in ISO 8601 format.
        holder_id:
          type: string
          example: cust_eWgXlBBiY6THFRJwX45Iakv4
          description: >-
            Unique customer identifier of the redeemable holder. It equals to
            the customer ID assigned by Voucherify.
        referrer_id:
          type: string
          description: Unique identifier of the referring person.
          example: cust_Vzck5i8U3OhcEUFY6MKhN9Rv
        object:
          type: string
          description: The type of the object represented by JSON. Default is `voucher`.
          default: voucher
        publish:
          type: object
          description: >-
            Stores a summary of publication events: an event counter and
            endpoint to return details of each event. Publication is an
            assignment of a code to a customer, e.g. through a distribution.
          properties:
            object:
              type: string
              default: list
              description: >-
                The type of the object represented is by default `list`. To get
                this list, you need to make a call to the endpoint returned in
                the `url` attribute.
            count:
              type: integer
              example: 0
              description: Publication events counter.
            url:
              type: string
              example: /v1/vouchers/WVPblOYX/publications?page=1&limit=10
              description: >-
                The endpoint where this list of publications can be accessed
                using a **GET** method.
                `/v1/vouchers/{voucher_code}/publications`
        redemption:
          type: object
          description: >-
            Stores a summary of redemptions that have been applied to the
            voucher.
          properties:
            quantity:
              type: integer
              description: >-
                How many times a voucher can be redeemed. A `null` value means
                unlimited.
            redeemed_quantity:
              type: integer
              example: 1
              description: How many times a voucher has already been redeemed.
            redeemed_points:
              type: integer
              example: 100000
              description: Total loyalty points redeemed.
            object:
              type: string
              default: list
              description: >-
                The type of the object represented is by default `list`. To get
                this list, you need to make a call to the endpoint returned in
                the url attribute.
            url:
              type: string
              example: /v1/vouchers/WVPblOYX/redemptions?page=1&limit=10
              description: >-
                The endpoint where this list of redemptions can be accessed
                using a **GET** method.
                `/v1/vouchers/{voucher_code}/redemptions`
    Category:
      title: Category
      description: This is an object representing a category.
      type: object
      properties:
        id:
          type: string
          description: Unique category ID assigned by Voucherify.
        name:
          type: string
          description: Category name.
        hierarchy:
          type: integer
          description: >-
            Category hierarchy. Categories with lower hierarchy are processed
            before categories with higher hierarchy value.
          minimum: 0
        object:
          type: string
          default: category
          enum:
            - category
          description: >-
            The type of the object represented by the JSON. This object stores
            information about the category.
        created_at:
          type: string
          description: >-
            Timestamp representing the date and time when the category was
            created. The value is shown in the ISO 8601 format.
          example: '2022-07-14T10:45:13.156Z'
          format: date-time
        updated_at:
          type: string
          example: '2022-08-16T10:52:08.094Z'
          description: >-
            Timestamp representing the date and time when the category was
            updated. The value is shown in the ISO 8601 format.
          format: date-time
      required:
        - id
        - name
        - hierarchy
        - created_at
        - object
    ValidationRulesAssignmentsList:
      title: Validation Rules Assignments List
      description: List of Validation Rules Assignments
      type: object
      properties:
        object:
          type: string
          default: list
          enum:
            - list
          description: >-
            The type of the object represented by JSON. This object stores
            information about validation rules assignments.
        data_ref:
          type: string
          default: data
          enum:
            - data
          description: >-
            Identifies the name of the attribute that contains the array of
            validation rules assignments.
        data:
          type: array
          description: Contains array of validation rules assignments.
          items:
            $ref: '#/components/schemas/BusValRuleAssignment'
        total:
          type: integer
          minimum: 0
          description: Total number of validation rules assignments.
      required:
        - object
        - data_ref
        - data
        - total
    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
    Discount:
      title: Discount
      type: object
      description: Contains information about discount.
      oneOf:
        - $ref: '#/components/schemas/DiscountAmount'
        - $ref: '#/components/schemas/DiscountUnit'
        - $ref: '#/components/schemas/DiscountUnitMultiple'
        - $ref: '#/components/schemas/DiscountPercent'
        - $ref: '#/components/schemas/DiscountFixed'
    ValidityTimeframe:
      title: Validity Timeframe
      type: object
      description: >-
        Set recurrent time periods when the earning rule is valid. For example,
        valid for 1 hour every other day.`start_date` **required** when
        including the `validity_timeframe`.
      properties:
        duration:
          type: string
          description: >-
            Defines the amount of time an earning rule will be active in ISO
            8601 format. For example, an earning rule with a `duration` of
            `PT1H` will be valid for a duration of one hour.
          example: PT1H
        interval:
          type: string
          description: >-
            Defines the intervening time between two time points in ISO 8601
            format, expressed as a duration. For example, an earning rule with
            an `interval` of `P2D` will be valid every other day.
          example: P2D
    ValidityDayOfWeek:
      title: Validity Day Of Week
      type: array
      description: >-
        Integer array corresponding to the particular days of the week in which
        the voucher is valid.


        - `0` Sunday

        - `1` Monday

        - `2` Tuesday

        - `3` Wednesday

        - `4` Thursday

        - `5` Friday

        - `6` Saturday
      items:
        type: integer
        enum:
          - 0
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
    ValidityHours:
      title: Validity Hours
      type: object
      description: Determines the hours of validity, e.g. to create a happy hours scenario.
      properties:
        daily:
          type: array
          description: >-
            Defines the recurring period(s) when the resource is active. The
            periods should not overlap.
          items:
            type: object
            description: Defines the recurring period(s) when the resource will be active.
            properties:
              start_time:
                type: string
                format: time
                description: >-
                  Defines the starting hour of validity in the HH:mm format. The
                  resource is *inactive before* this time.
                example: '12:00'
              days_of_week:
                type: array
                description: >-
                  Integer array corresponding to the particular days of the week
                  in which the resource is valid.


                  - `0` Sunday

                  - `1` Monday

                  - `2` Tuesday

                  - `3`  Wednesday

                  - `4` Thursday

                  - `5` Friday

                  - `6` Saturday
                items:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
              expiration_time:
                type: string
                format: time
                description: >-
                  Defines the ending hour of validity in the HH:mm format. The
                  resource is *inactive after* this time.
                example: '14:00'
    ValidationRuleAssignmentsList:
      type: object
      description: Validation Rule Assignments List
      title: Validation Rule Assignments List
      properties:
        object:
          type: string
          description: >-
            The type of the object represented by JSON. This object stores
            information about validation rule assignments.
          default: list
        data_ref:
          type: string
          description: >-
            Identifies the name of the JSON property that contains the array of
            validation rule assignments.
          default: data
        data:
          type: array
          description: A dictionary that contains an array of validation rule assignments.
          items:
            $ref: '#/components/schemas/ValidationRuleAssignment'
        total:
          type: integer
          description: Total number of validation rule assignments.
      required:
        - object
        - data_ref
        - data
        - total
    Product:
      type: object
      description: >-
        This is an object representing a product.  


        This entity should be used to map product items from your inventory
        management system. The aim of products is to build which reflect
        product-specific campaigns.
      title: Product
      allOf:
        - $ref: '#/components/schemas/ProductWithoutSkus'
        - type: object
          properties:
            skus:
              $ref: '#/components/schemas/SkusListForProduct'
    Sku:
      title: SKU Object
      type: object
      description: This is an object representing a product SKU.
      properties:
        id:
          type: string
          example: sku_0b1621b319d248b79f
          description: >-
            A unique identifier that represents the SKU and is assigned by
            Voucherify.
        source_id:
          type: string
          nullable: true
          example: sku_source_id_4
          description: A unique SKU identifier from your inventory system.
        product_id:
          type: string
          example: prod_0b15f6b9f650c16990
          description: The parent product's unique ID.
        sku:
          type: string
          nullable: true
          example: Large Pink Shirt
          description: Unique user-defined SKU name.
        price:
          type: integer
          nullable: true
          description: >-
            Unit price. It is represented by a value multiplied by 100 to
            accurately reflect 2 decimal places, such as `$100.00` being
            expressed as `10000`.
        currency:
          type: string
          nullable: true
          description: SKU price currency.
          example: USD
        attributes:
          type: object
          description: >-
            The attributes object stores values for all custom attributes
            inherited by the SKU from the parent product. A set of key/value
            pairs that are attached to a SKU object and are unique to each SKU
            within a product family.
        image_url:
          type: string
          nullable: true
          description: >-
            The HTTPS URL pointing to the .png or .jpg file that will be used to
            render the SKU image.
        metadata:
          type: object
          description: >-
            The metadata object stores all custom attributes assigned to the
            SKU. A set of key/value pairs that you can attach to a SKU object.
            It can be useful for storing additional information about the SKU in
            a structured format. It can be used to create product collections.
        created_at:
          type: string
          example: '2022-05-17T10:36:30.187Z'
          description: >-
            Timestamp representing the date and time when the SKU was created.
            The value is shown in the ISO 8601 format.
          format: date-time
        updated_at:
          type: string
          nullable: true
          example: '2022-05-17T10:55:09.137Z'
          description: >-
            Timestamp representing the date and time when the SKU was updated.
            The value is shown in the ISO 8601 format.
          format: date-time
        object:
          type: string
          default: sku
          description: >-
            The type of the object represented by JSON. This object stores
            information about the `SKU`.
          enum:
            - sku
      required:
        - id
        - source_id
        - product_id
        - sku
        - price
        - attributes
        - metadata
        - image_url
        - created_at
        - updated_at
        - object
    VoucherAssets:
      title: Voucher Assets
      type: object
      description: >-
        Stores links to images of QR and barcode that correspond to an encrypted
        voucher code.
      properties:
        qr:
          type: object
          description: Stores Quick Response (QR) representation of encrypted code.
          properties:
            id:
              type: string
              example: >-
                U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==
              description: Encrypted voucher code ID.
            url:
              type: string
              example: >-
                https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D
              description: >-
                URL to QR code  


                *Optional:* Attach query parameters to base URL to customize the
                image of the encrypted voucher code.  


                - `size`: integer value from `1` to `100`  

                - `format`: string, either `png` (default) or `svg`
        barcode:
          type: object
          description: Stores barcode representation of encrypted code.
          properties:
            id:
              type: string
              example: >-
                U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==
              description: Encrypted voucher code ID.
            url:
              type: string
              example: >-
                https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D
              description: >-
                URL to barcode  


                *Optional:* Attach query parameters to base URL to customize the
                image of the encrypted voucher code.  


                - `size`: integer value from `1` to `100`  

                - `format`: string, either `png` (default) or `svg`
    BusValRuleAssignment:
      title: Business Validation Rule Assignment
      description: Assignments of business validation rule
      example:
        id: asgm_LnY1g7UNFA9KyDrD
        rule_id: val_3gPNA6SnH4ae
        related_object_id: camp_CZOnEGiZfwIKWmSjhIoIT7Ol
        related_object_type: campaign
        object: validation_rules_assignment
        validation_status: PARTIALLY_VALID
        validation_omitted_rules:
          - '1'
      properties:
        id:
          type: string
          description: The unique identifier for a assignment
        rule_id:
          type: string
          description: The unique identifier for a rule
        related_object_id:
          type: string
          description: The unique identifier for a related object
        related_object_type:
          type: string
          description: The type of related object
        created_at:
          type: string
          description: >-
            Timestamp representing the date and time when the object was
            created. The value is shown in the ISO 8601 format.
          example: '2022-03-09T11:19:04.819Z'
          format: date-time
        updated_at:
          type: string
          description: >-
            Timestamp representing the date and time when the object was last
            updated in ISO 8601 format.
          example: '2022-03-09T11:19:04.819Z'
          format: date-time
        object:
          type: string
          description: The type of the object represented by JSON.
          default: validation_rules_assignment
          enum:
            - validation_rules_assignment
        validation_status:
          type: string
          description: The validation status of the assignment
          enum:
            - VALID
            - PARTIALLY_VALID
            - INVALID
        validation_omitted_rules:
          type: array
          description: The list of omitted rules
          items:
            type: string
      required:
        - id
        - rule_id
        - related_object_id
        - related_object_type
        - object
    DiscountAmount:
      type: object
      title: Amount
      properties:
        type:
          type: string
          default: AMOUNT
          enum:
            - AMOUNT
          description: Defines the type of the voucher.
        amount_off:
          type: number
          description: >-
            Amount taken off the subtotal of a price. Value is multiplied by 100
            to precisely represent 2 decimal places. For example, a $10 discount
            is written as 1000.
        amount_off_formula:
          type: string
          description: Formula used to dynamically calculate the discount.
        aggregated_amount_limit:
          type: integer
          description: Maximum discount amount per order.
        effect:
          description: Defines how the discount is applied to the customer's order.
          allOf:
            - $ref: '#/components/schemas/DiscountAmountVouchersEffectTypes'
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
      required:
        - type
        - amount_off
    DiscountUnit:
      type: object
      title: Unit
      properties:
        type:
          type: string
          default: UNIT
          enum:
            - UNIT
          description: Discount type.
        unit_off:
          type: integer
          description: Number of units to be granted a full value discount.
        unit_off_formula:
          type: string
          description: Formula used to dynamically calculate the number of units.
        effect:
          description: Defines how the unit is added to the customer's order.
          allOf:
            - $ref: '#/components/schemas/DiscountUnitVouchersEffectTypes'
        unit_type:
          type: string
          description: >-
            The product deemed as free, chosen from product inventory (e.g.
            time, items).
        product:
          description: Contains information about the product.
          allOf:
            - $ref: '#/components/schemas/SimpleProductDiscountUnit'
        sku:
          $ref: '#/components/schemas/SimpleSkuDiscountUnit'
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
      required:
        - type
        - unit_type
    DiscountUnitMultiple:
      type: object
      title: Unit Multiple
      properties:
        type:
          type: string
          default: UNIT
          enum:
            - UNIT
          description: Discount type.
        effect:
          type: string
          default: ADD_MANY_ITEMS
          enum:
            - ADD_MANY_ITEMS
          description: Defines how the discount is applied to the customer's order.
        units:
          type: array
          items:
            $ref: '#/components/schemas/DiscountUnitMultipleOneUnit'
      required:
        - type
        - units
    DiscountPercent:
      type: object
      title: Percent
      properties:
        type:
          type: string
          default: PERCENT
          enum:
            - PERCENT
          description: Defines the type of the voucher.
        percent_off:
          type: number
          description: The percent discount that the customer will receive.
        percent_off_formula:
          type: string
          description: Formula used to dynamically calculate the discount.
        amount_limit:
          type: number
          description: >-
            Upper limit allowed to be applied as a discount. Value is multiplied
            by 100 to precisely represent 2 decimal places. For example, a $6
            maximum discount is written as 600.
        aggregated_amount_limit:
          type: integer
          description: Maximum discount amount per order.
        effect:
          description: Defines how the discount is applied to the customer's order.
          allOf:
            - $ref: '#/components/schemas/DiscountPercentVouchersEffectTypes'
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
      required:
        - type
        - percent_off
    DiscountFixed:
      title: Fixed
      type: object
      properties:
        type:
          type: string
          default: FIXED
          enum:
            - FIXED
          description: Defines the type of the voucher.
        fixed_amount:
          type: number
          description: >-
            Sets a fixed value for an order total or the item price. The value
            is multiplied by 100 to precisely represent 2 decimal places. For
            example, a $10 discount is written as 1000. If the fixed amount is
            calculated by the formula, i.e. the `fixed_amount_formula` parameter
            is present in the fixed amount definition, this value becomes the
            **fallback value**. As a result, if the formula cannot be calculated
            due to missing metadata, for example, this value will be used as the
            fixed value.
        fixed_amount_formula:
          type: string
          description: Formula used to dynamically calculate the discount.
        effect:
          description: Defines how the discount is applied to the customer's order.
          allOf:
            - $ref: '#/components/schemas/DiscountFixedVouchersEffectTypes'
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
      required:
        - type
        - fixed_amount
    ValidationRuleAssignment:
      title: Validation Rule Assignment
      type: object
      description: This is an object representing a validation rule assignment.
      properties:
        id:
          type: string
          example: asgm_74F7QZoYbUoljwQO
          description: Validation rule assignment ID.
        rule_id:
          type: string
          example: val_4j7DCRm2IS59
          description: Validation rule ID.
        related_object_id:
          type: string
          example: v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT
          description: The resource ID to which the validation rule was assigned.
        related_object_type:
          type: string
          description: The type of resource to which the validation rule was assigned.
          enum:
            - voucher
            - campaign
            - earning_rule
            - reward_assignment
            - promotion_tier
            - distribution
        created_at:
          type: string
          example: '2022-02-17T08:18:15.085Z'
          description: >-
            Timestamp representing the date and time when the validation rule
            assignment was created. The value is shown in the ISO 8601 format.
          format: date-time
        object:
          type: string
          default: validation_rules_assignment
          description: The type of the object represented by the ID.
          enum:
            - validation_rules_assignment
      required:
        - id
        - rule_id
        - related_object_id
        - related_object_type
        - created_at
        - object
    ProductWithoutSkus:
      title: Product without Skus Object
      properties:
        id:
          type: string
          description: Unique product ID assigned by Voucherify.
          example: prod_0b1da8105693710357
        source_id:
          type: string
          nullable: true
          example: productSourceID16
          description: Unique product source ID.
        name:
          type: string
          nullable: true
          description: Unique user-defined product name.
          example: T-shirt
        price:
          type: integer
          nullable: true
          description: >-
            Unit price. It is represented by a value multiplied by 100 to
            accurately reflect 2 decimal places, such as `$100.00` being
            expressed as `10000`.
        attributes:
          type: array
          description: >-
            A list of product attributes whose values you can customize for
            given SKUs: `["color","size","ranking"]`. Each child SKU can have a
            unique value for a given attribute.
          items:
            type: string
        metadata:
          type: object
          description: >-
            The metadata object stores all custom attributes assigned to the
            product. A set of key/value pairs that you can attach to a product
            object. It can be useful for storing additional information about
            the product in a structured format. It can be used to create product
            collections.
        image_url:
          type: string
          nullable: true
          description: >-
            The HTTPS URL pointing to the .png or .jpg file that will be used to
            render the product image.
          example: https://images.com/original.jpg
        created_at:
          type: string
          description: >-
            Timestamp representing the date and time when the product was
            created. The value is shown in the ISO 8601 format.
          example: '2022-05-23T06:52:55.008Z'
          format: date-time
        updated_at:
          type: string
          nullable: true
          description: >-
            Timestamp representing the date and time when the product was
            updated. The value is shown in the ISO 8601 format.
          example: '2022-05-23T09:24:07.405Z'
          format: date-time
        object:
          type: string
          description: >-
            The type of the object represented by JSON. This object stores
            information about the product.
          default: product
          enum:
            - product
      required:
        - id
        - source_id
        - name
        - attributes
        - metadata
        - object
        - price
    SkusListForProduct:
      type: object
      description: Contains information about child SKUs.
      title: Skus List For Product
      properties:
        object:
          type: string
          description: >-
            The type of the object represented by JSON. This object stores
            information about SKUs.
          default: list
        data_ref:
          type: string
          description: >-
            Identifies the name of the JSON property that contains the array of
            SKUs.
          default: data
        data:
          type: array
          description: A dictionary that contains an array of SKUs.
          items:
            $ref: '#/components/schemas/Sku'
        total:
          type: integer
          description: Total number of SKUs in the product.
      required:
        - object
        - data_ref
        - data
        - total
    DiscountAmountVouchersEffectTypes:
      title: Discount Amount Vouchers Effect Types
      enum:
        - APPLY_TO_ORDER
        - APPLY_TO_ITEMS
        - APPLY_TO_ITEMS_PROPORTIONALLY
        - APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY
        - APPLY_TO_ITEMS_BY_QUANTITY
      type: string
    DiscountUnitVouchersEffectTypes:
      title: Discount Unit Vouchers Effect Types
      enum:
        - ADD_MISSING_ITEMS
        - ADD_NEW_ITEMS
        - ADD_MANY_ITEMS
        - ADD_SAME_ITEMS
      type: string
    SimpleProductDiscountUnit:
      type: object
      title: Simple Product Discount Unit
      properties:
        id:
          type: string
          description: Unique product ID, assigned by Voucherify.
        source_id:
          type: string
          description: Product's source ID.
        name:
          type: string
          description: Product name.
      required:
        - id
        - name
    SimpleSkuDiscountUnit:
      type: object
      title: Simple Sku Discount Unit
      properties:
        id:
          type: string
          description: Unique SKU ID, assigned by Voucherify.
        source_id:
          type: string
          description: Product variant's source ID.
        name:
          type: string
          description: Sku name
      required:
        - id
        - name
    DiscountUnitMultipleOneUnit:
      type: object
      title: One Unit
      properties:
        unit_off:
          type: number
          description: Number of units to be granted a full value discount.
        unit_off_formula:
          type: string
          description: Formula used to dynamically calculate the number of units.
        effect:
          type: string
          enum:
            - ADD_NEW_ITEMS
            - ADD_MISSING_ITEMS
          description: |+
            Defines how the unit is added to the customer's order.

        unit_type:
          type: string
          description: >-
            The product deemed as free, chosen from product inventory (e.g.
            time, items).
        product:
          description: Contains information about the product.
          allOf:
            - $ref: '#/components/schemas/SimpleProductDiscountUnit'
        sku:
          description: Contains information about the sku.
          allOf:
            - $ref: '#/components/schemas/SimpleSkuDiscountUnit'
      required:
        - effect
        - unit_type
    DiscountPercentVouchersEffectTypes:
      title: Discount Percent Vouchers Effect Types
      enum:
        - APPLY_TO_ORDER
        - APPLY_TO_ITEMS
      type: string
    DiscountFixedVouchersEffectTypes:
      title: Discount Fixed Vouchers Effect Types
      enum:
        - APPLY_TO_ORDER
        - APPLY_TO_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`.

````