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

# Validate Voucher (client-side)

> > ❗️ Deprecated  
>
> This endpoint represents the deprecated version of the API responsible for voucher validation, and we do not recommend using it. The new [Stackable Discounts API](/api-reference/client-side/validate-stackable-discounts-client-side) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. 

To verify a voucher code given by customer, you can use this method. It is designed for client side integration which means that is accessible only through public keys. This method is designed to be run directly either in web browsers or mobile apps.

> ❗️ Specifying gift credits and loyalty points
>
> This endpoint does not support specifying the specific amount of gift credits to apply to an order nor the specific amount of loyalty points to an order. It calculates the amount that is available on the card and applies as much credits or points as possible to cover the total amount. 

### Set customer identity (optional)

Voucherify can help you track anonymous customers. Once you integrate Voucherify into your web app and call the validate method, Voucherify will return a tracking ID and the script will store it in a cookie. Each subsequent validate call will use the same tracking ID.

Voucherify tracks a user using a tracking ID to see if the user who is validating vouchers is the same as the one who consuming them. Voucherify does this by setting up an identity for the user. A `tracking_id` will be generated on the server side, unless you specify your own `tracking_id`. In both cases, you will receive the `tracking_id` in the validation response.

The returned `tracking_id` field should be used as the customer `source_id` in subsequent redemption requests. Moreover, the `tracking_id` returned from Validation API is encoded. Voucherify will recognize both values for identifying customer - the one before encryption sent as a query parameter to the **GET** `v1/validate` request, and the version encrypted and returned as part of the validation request.

### Sample workflow

Customer tracking workflow in a nutshell:

**Client-side:**
  * A customer visits your website.
  * A customer validates a voucher code. That triggers a validate request to be sent to Voucherify. In the request, you pass the tracking_id or customer.source_id. As a result, the API call to this endpoint returns an **encoded** `tracking_id`.

**Backend:**
  * Once the customer finishes the checkout process, your website passes the `tracking_id` to your backend during a redemption call. The `tracking_id` is sent as a value assigned to the property *source_id* in a customer object.
  * A customer object is created and within the redemption response, you get a customer `id`.
  * You can use the customer `id` or the customer `source_id` to fetch or modify the customer details.
  
A customer is created (upserted) automatically with a redemption call. Alternatively, you can create a new profile by creating a customer via a dedicated API method. Take a look at the customer object to understand the [entity's structure](/api-reference/customers/customer-object). 



> 📘 Customer identifier
>
> The source id of the customer may either be an already hashed version of the `tracking_id`, which you received in a response from a validation request or a custom ID you predefined (i.e. an email address). Nevertheless, we recommend using identifiers delivered by Voucherify API.




### Examples with Query Parameters

| **Query Parameters** | **Example URL** |
|:---|:---|
| Shortcut - `customer` query param instead of `customer[source_id]` | `https://api.voucherify.io/client/v1/validate?code=sKKFCKLZ&amount=10100&customer=customer_id` |
| Pass `customer`'s and `redemption`'s context `metadata` in query parameters | `https://api.voucherify.io/client/v1/validate?code=sKKFCKLZ&amount=10100&customer=sure_he_is_new&metadata[shop]=1&customer[metadata][propsy]=2&metadata[test]=true` |
| Use `tracking_id` instead of `source_id` | `https://api.voucherify.io/client/v1/validate?code=IKU-mvS-JOG&amount=10100&tracking_id=sure_he_is_new_5&metadata[shop]=1&metadata[test]=true` |

### Reasons why a validation might fail

Voucher validation might fail because of one of these reasons:

* `voucher not found` - voucher doesn't exist or was [deleted](/api-reference/vouchers/delete-voucher)
* `voucher expired` - voucher is out of [start date - expiration date] timeframe
* `voucher is disabled` - learn more about [disabled vouchers](/api-reference/vouchers/disable-voucher)
* `customer does not match segment rules` - learn more about [customer tracking](/api-reference/customers/customer-object)
* `order does not match validation rules` - learn more about [validation rules](/api-reference/validations/validation-object)



## OpenAPI

````yaml /openapi/client-side.json get /client/v1/validate
openapi: 3.0.1
info:
  title: Voucherify API - Client-side
  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:
  /client/v1/validate:
    get:
      tags:
        - Client-side
      summary: Validate Voucher (client-side)
      description: >-
        > ❗️ Deprecated  

        >

        > This endpoint represents the deprecated version of the API responsible
        for voucher validation, and we do not recommend using it. The new
        [Stackable Discounts
        API](/api-reference/client-side/validate-stackable-discounts-client-side)
        introduces additional features and improvements while maintaining
        backward compatibility, including applying a combination of coupon codes
        and promotion tiers. Developers are encouraged to migrate to the latest
        version to take advantage of the latest enhancements and bug fixes. No
        updates will be provided to the deprecated endpoint. 


        To verify a voucher code given by customer, you can use this method. It
        is designed for client side integration which means that is accessible
        only through public keys. This method is designed to be run directly
        either in web browsers or mobile apps.


        > ❗️ Specifying gift credits and loyalty points

        >

        > This endpoint does not support specifying the specific amount of gift
        credits to apply to an order nor the specific amount of loyalty points
        to an order. It calculates the amount that is available on the card and
        applies as much credits or points as possible to cover the total
        amount. 


        ### Set customer identity (optional)


        Voucherify can help you track anonymous customers. Once you integrate
        Voucherify into your web app and call the validate method, Voucherify
        will return a tracking ID and the script will store it in a cookie. Each
        subsequent validate call will use the same tracking ID.


        Voucherify tracks a user using a tracking ID to see if the user who is
        validating vouchers is the same as the one who consuming them.
        Voucherify does this by setting up an identity for the user. A
        `tracking_id` will be generated on the server side, unless you specify
        your own `tracking_id`. In both cases, you will receive the
        `tracking_id` in the validation response.


        The returned `tracking_id` field should be used as the customer
        `source_id` in subsequent redemption requests. Moreover, the
        `tracking_id` returned from Validation API is encoded. Voucherify will
        recognize both values for identifying customer - the one before
        encryption sent as a query parameter to the **GET** `v1/validate`
        request, and the version encrypted and returned as part of the
        validation request.


        ### Sample workflow


        Customer tracking workflow in a nutshell:


        **Client-side:**
          * A customer visits your website.
          * A customer validates a voucher code. That triggers a validate request to be sent to Voucherify. In the request, you pass the tracking_id or customer.source_id. As a result, the API call to this endpoint returns an **encoded** `tracking_id`.

        **Backend:**
          * Once the customer finishes the checkout process, your website passes the `tracking_id` to your backend during a redemption call. The `tracking_id` is sent as a value assigned to the property *source_id* in a customer object.
          * A customer object is created and within the redemption response, you get a customer `id`.
          * You can use the customer `id` or the customer `source_id` to fetch or modify the customer details.
          
        A customer is created (upserted) automatically with a redemption call.
        Alternatively, you can create a new profile by creating a customer via a
        dedicated API method. Take a look at the customer object to understand
        the [entity's structure](/api-reference/customers/customer-object). 




        > 📘 Customer identifier

        >

        > The source id of the customer may either be an already hashed version
        of the `tracking_id`, which you received in a response from a validation
        request or a custom ID you predefined (i.e. an email address).
        Nevertheless, we recommend using identifiers delivered by Voucherify
        API.





        ### Examples with Query Parameters


        | **Query Parameters** | **Example URL** |

        |:---|:---|

        | Shortcut - `customer` query param instead of `customer[source_id]` |
        `https://api.voucherify.io/client/v1/validate?code=sKKFCKLZ&amount=10100&customer=customer_id`
        |

        | Pass `customer`'s and `redemption`'s context `metadata` in query
        parameters |
        `https://api.voucherify.io/client/v1/validate?code=sKKFCKLZ&amount=10100&customer=sure_he_is_new&metadata[shop]=1&customer[metadata][propsy]=2&metadata[test]=true`
        |

        | Use `tracking_id` instead of `source_id` |
        `https://api.voucherify.io/client/v1/validate?code=IKU-mvS-JOG&amount=10100&tracking_id=sure_he_is_new_5&metadata[shop]=1&metadata[test]=true`
        |


        ### Reasons why a validation might fail


        Voucher validation might fail because of one of these reasons:


        * `voucher not found` - voucher doesn't exist or was
        [deleted](/api-reference/vouchers/delete-voucher)

        * `voucher expired` - voucher is out of [start date - expiration date]
        timeframe

        * `voucher is disabled` - learn more about [disabled
        vouchers](/api-reference/vouchers/disable-voucher)

        * `customer does not match segment rules` - learn more about [customer
        tracking](/api-reference/customers/customer-object)

        * `order does not match validation rules` - learn more about [validation
        rules](/api-reference/validations/validation-object)
      operationId: validate-voucher-client-side
      parameters:
        - $ref: '#/components/parameters/origin'
        - schema:
            $ref: '#/components/schemas/ParameterCode'
          in: query
          name: code
          description: A code that identifies the voucher.
        - schema:
            $ref: '#/components/schemas/ParameterString'
          in: query
          name: tracking_id
          description: >-
            A tracking identifier of a user that validated the voucher. This
            identifier is generated during voucher validation based on your
            internal ID (e.g., email, database ID) during the first request.
            This is a hashed customer source ID. If the request is performed for
            the first time, pass the internal ID to track the customer.
            **Although not all information is required, the extra information
            helps prevent fraud.**
        - schema:
            $ref: '#/components/schemas/ParameterString'
          in: query
          name: amount
          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.
        - schema:
            $ref: '#/components/schemas/ParameterSessionKey'
          in: query
          name: session_key
          description: >-
            The session unique ID assigned by Voucherify or your own unique
            session ID. Sending an existing ID will result in overwriting an
            existing session. If no session key is provided, then a new ID will
            be generated.
        - schema:
            $ref: '#/components/schemas/ParameterInteger'
          in: query
          name: session_ttl
          description: >-
            Value for the period of time that the session is active. Units for
            this parameter are defined by the `session_ttl_unit` parameter.
        - schema:
            $ref: '#/components/schemas/ParameterSessionTtlUnit'
          in: query
          name: session_ttl_unit
          description: Defines the type of unit in which the session time is counted.
        - $ref: '#/components/parameters/metadata'
        - $ref: '#/components/parameters/item'
        - schema:
            $ref: '#/components/schemas/ParameterString'
          in: query
          name: session_type
          description: >-
            The session is required to establish a session between multiple
            parallel validation and redemption requests. This parameter is
            required to establish a new session. The session locks the
            **redemption quantity by 1** and additionally the redemption **gift
            credits** specified within the request for a gift card and the
            **loyalty points** for a loyalty card.
        - name: customer
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ParameterCustomerValidateVoucherClientSide'
          description: Customer details.
        - name: order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ParameterOrderMetadata'
          style: deepObject
          explode: true
          description: Order details.
      responses:
        '200':
          description: >-
            Returns information whether the voucher is valid in the context of
            the parameter values provided in the query parameters. Moreover, it
            returns a hashed source identifier which can be used as tracking ID
            in future calls. If a validation session is established, then the
            session details will be returned as well. Read more on [validation
            sessions](/guides/locking-validation-session).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/6_res_validate_voucher'
                  - $ref: '#/components/schemas/6_res_validate_voucher_false'
              examples:
                Wrong customer:
                  value:
                    valid: false
                    reason: customer does not match validation rules
                    error:
                      message: >-
                        Only the gift card owner can apply credits from the gift
                        card to the order.
                    tracking_id: track_0nmdnu/6xIb6NTN0Ea40oFmM4wD5QYlxAgKdSn6wh+o
                    code: GIFT-CARD-kW4aEsfB
                    metadata: {}
                Validation Rule Not Satisfied:
                  value:
                    valid: false
                    reason: redemption does not match validation rules
                    error:
                      code: 400
                      key: redemption_rules_violated
                      message: redemption does not match validation rules
                      details: >-
                        Discount Coupon cannot be redeemed because of violated
                        validation rules: val_WuupvE7OVXyo
                      request_id: v-0be54f4afa0357c12f
                    tracking_id: track_0nmdnu/6xIb6NTN0Ea40oFmM4wD5QYlxAgKdSn6wh+oychk
                    code: PAYINEUROS
                    metadata:
                      shoutout: >-
                        Pay in euros to get 10 Euros off, any other currency to
                        get 5 off in that currency.
                Validate Discount Coupon:
                  value:
                    valid: true
                    applicable_to:
                      data: []
                      total: 0
                      data_ref: data
                      object: list
                    inapplicable_to:
                      data: []
                      total: 0
                      data_ref: data
                      object: list
                    tracking_id: >-
                      track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==
                    session:
                      key: A
                      type: LOCK
                      ttl: 1
                      ttl_unit: NANOSECONDS
                    order:
                      amount: 13000
                      discount_amount: 1000
                      total_discount_amount: 1000
                      total_amount: 12000
                      applied_discount_amount: 1000
                      total_applied_discount_amount: 1000
                      items:
                        - object: order_item
                          source_id: webinar_BF_sweater_pink_sweater
                          related_object: product
                          quantity: 2
                          amount: 13000
                          price: 6500
                          subtotal_amount: 13000
                          product:
                            id: prod_0bd76ca337954ca116
                            source_id: webinar_BF_sweater_pink_sweater
                            name: Pink Sweater
                            price: 6500
                      metadata:
                        currency: EUR
                      customer_id: null
                      referrer_id: null
                      object: order
                    code: PAYINEUROS
                    discount:
                      type: AMOUNT
                      effect: APPLY_TO_ORDER
                      amount_off: 1000
                    metadata:
                      shoutout: >-
                        Pay in euros to get 10 Euros off, any other currency to
                        get 5 off in that currency.
                Validate Loyalty Card:
                  value:
                    valid: true
                    applicable_to:
                      data: []
                      total: 0
                      data_ref: data
                      object: list
                    inapplicable_to:
                      data: []
                      total: 0
                      data_ref: data
                      object: list
                    tracking_id: >-
                      track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==
                    session:
                      key: A
                      type: LOCK
                      ttl: 1
                      ttl_unit: NANOSECONDS
                    order:
                      amount: 121700
                      discount_amount: 5000
                      total_discount_amount: 5000
                      total_amount: 116700
                      applied_discount_amount: 5000
                      total_applied_discount_amount: 5000
                      items:
                        - object: order_item
                          source_id: webinar_BF_sweater_pink_sweater
                          related_object: product
                          quantity: 2
                          amount: 13000
                          price: 6500
                          subtotal_amount: 13000
                          product:
                            id: prod_0bd76ca337954ca116
                            source_id: webinar_BF_sweater_pink_sweater
                            name: Pink Sweater
                            price: 6500
                        - object: order_item
                          source_id: webinar_BF_pants_gray_sweat_pants
                          related_object: product
                          quantity: 2
                          amount: 10000
                          price: 5000
                          subtotal_amount: 10000
                          product:
                            id: prod_0bd76b8656956a183f
                            source_id: webinar_BF_pants_gray_sweat_pants
                            name: Gray Sweat Pants
                            price: 5000
                        - object: order_item
                          product_id: prod_0bd76bb4aa003890cb
                          quantity: 2
                          amount: 9000
                          price: 4500
                          subtotal_amount: 9000
                          product:
                            id: prod_0bd76bb4aa003890cb
                            source_id: webinar_BF_pants_black_sweat_pants
                            name: Black Sweat Pants
                            price: 4500
                        - object: order_item
                          source_id: M0E20000000ELDH
                          related_object: sku
                          product_id: prod_0b661d4bd2c7ec7d1f
                          quantity: 3
                          amount: 89700
                          price: 29900
                          subtotal_amount: 89700
                          product:
                            id: prod_0b661d4bd2c7ec7d1f
                            source_id: facdc58f-ff7c-40c4-a22f-ab0a084a9107
                            name: Casual jacket Michael Kors beige
                          sku:
                            id: sku_0b661e41fc8d35a8f8
                            source_id: M0E20000000ELDH
                            sku: Casual jacket Michael Kors beige
                            price: 29900
                      metadata:
                        currency: EUR
                      customer_id: null
                      referrer_id: null
                      object: order
                    code: LOYALTY-CARD-ng3Kb9tM
                    loyalty:
                      points_cost: 1000
                    reward:
                      id: rew_4ZF6Y69U2PXE3GLIZxfozgg1
                      assignment_id: rewa_WkeBlLhj0sRae70J5AAvLbmy
                    metadata: {}
                    campaign: Loyalty Campaign
                    campaign_id: camp_ZNb23Xtw1WuGCm7gdax84PUi
                Validate Gift Card:
                  value:
                    valid: true
                    applicable_to:
                      data: []
                      total: 0
                      data_ref: data
                      object: list
                    inapplicable_to:
                      data: []
                      total: 0
                      data_ref: data
                      object: list
                    tracking_id: >-
                      track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==
                    session:
                      key: A
                      type: LOCK
                      ttl: 1
                      ttl_unit: NANOSECONDS
                    order:
                      amount: 165700
                      discount_amount: 21500
                      total_discount_amount: 21500
                      total_amount: 144200
                      applied_discount_amount: 21500
                      total_applied_discount_amount: 21500
                      items:
                        - object: order_item
                          source_id: webinar_BF_sweater_pink_sweater
                          related_object: product
                          quantity: 2
                          amount: 13000
                          price: 6500
                          subtotal_amount: 13000
                          product:
                            id: prod_0bd76ca337954ca116
                            source_id: webinar_BF_sweater_pink_sweater
                            name: Pink Sweater
                            price: 6500
                        - object: order_item
                          source_id: webinar_BF_pants_gray_sweat_pants
                          related_object: product
                          quantity: 2
                          amount: 10000
                          price: 5000
                          subtotal_amount: 10000
                          product:
                            id: prod_0bd76b8656956a183f
                            source_id: webinar_BF_pants_gray_sweat_pants
                            name: Gray Sweat Pants
                            price: 5000
                        - object: order_item
                          product_id: prod_0bd76bb4aa003890cb
                          quantity: 2
                          amount: 9000
                          price: 4500
                          subtotal_amount: 9000
                          product:
                            id: prod_0bd76bb4aa003890cb
                            source_id: webinar_BF_pants_black_sweat_pants
                            name: Black Sweat Pants
                            price: 4500
                        - object: order_item
                          source_id: M0E20000000ELDH
                          related_object: sku
                          product_id: prod_0b661d4bd2c7ec7d1f
                          quantity: 3
                          amount: 89700
                          price: 29900
                          subtotal_amount: 89700
                          product:
                            id: prod_0b661d4bd2c7ec7d1f
                            source_id: facdc58f-ff7c-40c4-a22f-ab0a084a9107
                            name: Casual jacket Michael Kors beige
                          sku:
                            id: sku_0b661e41fc8d35a8f8
                            source_id: M0E20000000ELDH
                            sku: Casual jacket Michael Kors beige
                            price: 29900
                        - object: order_item
                          product_id: prod_0b661d4bd347ec7d26
                          sku_id: sku_0b661e41fc0d35a8f1
                          quantity: 4
                          amount: 44000
                          price: 11000
                          subtotal_amount: 44000
                          product:
                            id: prod_0b661d4bd347ec7d26
                            source_id: 975193eb-1911-444a-a0f0-f567efce1a8b
                            name: Pumps ”Flex” Michael Kors black
                          sku:
                            id: sku_0b661e41fc0d35a8f1
                            source_id: M0E20000000DMVX
                            sku: Pumps ”Flex” Michael Kors black
                            price: 11000
                      metadata:
                        currency: EUR
                      customer_id: null
                      referrer_id: null
                      object: order
                    code: GIFT-CARD-kW4aEsfB
                    gift:
                      amount: 32000
                      balance: 21500
                      effect: APPLY_TO_ORDER
                    metadata: {}
                    campaign: Gift Card Campaign
                    campaign_id: camp_ZjoZEdmnyUCPYwMPN0IVbvDK
                Validate Referral Code:
                  value:
                    valid: true
                    applicable_to:
                      data: []
                      total: 0
                      data_ref: data
                      object: list
                    inapplicable_to:
                      data: []
                      total: 0
                      data_ref: data
                      object: list
                    tracking_id: track_p6hPsnZj2VSvyXDjH9o6aQ==
                    order:
                      amount: 10000
                      discount_amount: 3000
                      total_discount_amount: 3000
                      total_amount: 7000
                      applied_discount_amount: 3000
                      total_applied_discount_amount: 3000
                      items: []
                      metadata: {}
                      referrer:
                        id: cust_nM4jqPiaXUvQdVSA6vTRUnix
                        object: customer
                      customer_id: null
                      referrer_id: cust_nM4jqPiaXUvQdVSA6vTRUnix
                      object: order
                    code: REFERRAL-CODE-OxBakPYf
                    discount:
                      type: PERCENT
                      effect: APPLY_TO_ORDER
                      percent_off: 30
                    metadata: {}
                    campaign: Referral Campaign
                    campaign_id: camp_TnOf5NB4Jtjxwoq38WckMJfy
        '400':
          description: >-
            Returns an error if missing required parameters or tracking IDs come
            from the same origin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Missing customer:
                  value:
                    code: 400
                    key: missing_customer
                    message: Missing customer
                    details: Customer is required to validate rules
                    request_id: v-0be548ae620abb0a73
                Ambiguous tracking ID:
                  value:
                    code: 400
                    key: ambiguous_tracking_id
                    message: >-
                      Ambiguous trackingId
                      ('track_0nmdnu/6xIb6NTN0Ea40oFmM4wD5QYlxAgKdSn6wh+oychkbEcMNB5RhcTj+zcKBEcGnUZkAXxg='
                      vs.
                      'track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==')
                    details: >-
                      The customer cannot be identified as two different
                      identifiers have been used between requests from same
                      origin.
                    request_id: v-0be550a5a84abb30f8
      deprecated: true
      security:
        - X-Client-Application-Id: []
          X-Client-Token: []
        - X-Voucherify-OAuth:
            - client_api
            - client_validate
components:
  parameters:
    origin:
      name: origin
      in: header
      required: true
      schema:
        $ref: '#/components/schemas/ParameterOrigin'
      description: Indicates the origin (scheme, hostname, and port).
    metadata:
      name: metadata
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/ParameterObject'
      style: deepObject
      explode: true
      description: Metadata key value pairs.
    item:
      name: item
      in: query
      required: false
      schema:
        $ref: >-
          #/components/schemas/6_query_validate_voucher_client_side_orders_order_item
      description: Array of order items.
      style: deepObject
      explode: true
  schemas:
    ParameterCode:
      type: string
      example: 2CpRCE2c
    ParameterString:
      type: string
    ParameterSessionKey:
      type: string
      example: ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts
    ParameterInteger:
      type: integer
    ParameterSessionTtlUnit:
      type: string
      enum:
        - HOURS
        - DAYS
        - MINUTES
        - SECONDS
        - MILLISECONDS
        - MICROSECONDS
        - NANOSECONDS
    ParameterCustomerValidateVoucherClientSide:
      oneOf:
        - type: object
          title: Customer details
          description: Customer source ID and/or customer metadata.
          properties:
            source_id:
              type: string
              description: Customer source ID.
              example: name.lastname@email.com
            metadata:
              type: object
              description: >-
                A set of custom key/value pairs that you can attach to a
                customer. The metadata object stores all custom attributes
                assigned to the customer. It can be useful for storing
                additional information about the customer in a structured
                format. This metadata can be used for validating whether the
                customer qualifies for a discount or it can be used in building
                customer segments.
        - type: string
          title: Customer ID
          description: >-
            Unique customer ID assigned by Voucherify, i.e.
            `cust_eWgXlBBiY6THFRJwX45Iakv4`.
          example: cust_eWgXlBBiY6THFRJwX45Iakv4
    ParameterOrderMetadata:
      type: object
      title: Order details
      description: Order details.
      properties:
        metadata:
          type: object
          description: >-
            The metadata object stores all custom attributes assigned to the
            order. A set of key/value pairs that are attached to an order
            object. Stores additional information about the order in a
            structured format.
    6_res_validate_voucher:
      title: Valid
      description: >-
        Response schema model for validating a voucher using **POST**
        `v1/vouchers/{code}/validate`.
      oneOf:
        - $ref: '#/components/schemas/6_res_validate_voucher_discount_code'
        - $ref: '#/components/schemas/6_res_validate_voucher_gift_card'
        - $ref: '#/components/schemas/6_res_validate_voucher_loyalty_card'
    6_res_validate_voucher_false:
      type: object
      title: Not Valid
      description: Response schema for a voucher that is not valid.
      properties:
        valid:
          type: boolean
          default: false
          description: >-
            Indicates whether the voucher is valid within the context of the
            parameters provided in the request body.
        reason:
          type: string
          description: >-
            System generated cause for the voucher being invalid in the context
            of the provided parameters.
        error:
          type: object
          description: >-
            Detailed failure cause for the invalid voucher if the reason has a
            translation defined in the Dashboard &rarr; Project Settings &rarr;
            Error Messages.
          properties:
            message:
              type: string
              description: Customized error message.
        tracking_id:
          type: string
          description: Hashed customer source ID.
        code:
          type: string
          description: Voucher code.
        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.
    Error:
      title: Error Object
      type: object
      description: Error details
      properties:
        code:
          type: integer
          description: Error's HTTP status code.
        key:
          type: string
          description: Short string describing the kind of error which occurred.
        message:
          type: string
          description: A human-readable message providing a short description of the error.
        details:
          type: string
          description: A human-readable message providing more details about the error.
        request_id:
          type: string
          example: v-0a885062c80375740f
          description: >-
            This ID is useful when troubleshooting and/or finding the root cause
            of an error response by our support team.
        resource_id:
          type: string
          description: >-
            Unique resource ID that can be used in another endpoint to get more
            details.
          example: rf_0c5d710a87c8a31f86
        resource_type:
          type: string
          description: The resource type.
          example: voucher
        error:
          type: object
          description: Includes additional information about the error.
          properties:
            message:
              type: string
              description: The message configured by the user in a validation rule.
      required:
        - code
        - message
    ParameterOrigin:
      type: string
      format: hostname
    ParameterObject:
      type: object
    6_query_validate_voucher_client_side_orders_order_item:
      type: array
      items:
        type: object
        title: Order Item
        description: This object represents an order line item.
        properties:
          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.
          related_object:
            type: string
            description: >-
              Used along with the `source_id` property, can be set to either
              `sku` or `product`.
          product_id:
            type: string
            description: Unique identifier of the product. It is assigned by Voucherify.
            example: prod_0a7e62db1fca8322a2
          sku_id:
            type: string
            description: Unique identifier of the SKU. It is assigned by Voucherify.
            example: sku_0a41e31c7b41c28358
          quantity:
            type: string
            description: The quantity of the particular item in the cart.
          price:
            type: string
            description: The unit price of the item.
          amount:
            type: string
            description: The total amount of the order item (`price` * `quantity`).
    6_res_validate_voucher_discount_code:
      type: object
      title: Valid - Discount Code
      description: >-
        Response schema model for validating a discount code using **POST**
        `v1/vouchers/{code}/validate`.
      properties:
        valid:
          type: boolean
          description: >-
            Indicates whether the voucher is valid within the context of the
            parameters provided in the request body.
        applicable_to:
          $ref: '#/components/schemas/6_res_applicable_to_object'
        inapplicable_to:
          $ref: '#/components/schemas/6_res_inapplicable_to_object'
        tracking_id:
          type: string
          description: Hashed customer source ID.
        order:
          $ref: '#/components/schemas/6_obj_order_object'
        code:
          type: string
          description: Voucher code.
        discount:
          oneOf:
            - $ref: '#/components/schemas/6_res_validate_voucher_discount_amount'
            - $ref: '#/components/schemas/6_res_validate_voucher_discount_percent'
            - $ref: '#/components/schemas/6_res_validate_voucher_discount_fixed'
            - $ref: '#/components/schemas/6_res_validate_voucher_discount_unit'
            - $ref: >-
                #/components/schemas/6_res_validate_voucher_discount_unit_multiple
            - $ref: '#/components/schemas/6_res_validate_voucher_discount_shipping'
          description: Contains information about the discount to be applied to the order.
        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.
        start_date:
          type: string
          format: date-time
          example: '2022-10-04T00:00:00.000Z'
          description: >-
            Activation timestamp defines when the voucher starts to be active in
            ISO 8601 format. Voucher is _inactive_ before this date.
        expiration_date:
          type: string
          format: date-time
          example: '2022-10-31T00:00:00.000Z'
          description: >-
            Expiration timestamp defines when the voucher expires in ISO 8601
            format. Voucher is _inactive_ after this date.
        campaign:
          type: string
          description: Voucher's parent campaign name.
        campaign_id:
          type: string
          example: camp_W8DJVd8J0btqXT6FBwn7BSkC
          description: Voucher's parent campaign's unique ID.
        session:
          $ref: '#/components/schemas/6_res_session_lock_discount_voucher'
    6_res_validate_voucher_gift_card:
      type: object
      title: Valid - Gift Card
      description: >-
        Response schema model for validating a gift card using **POST**
        `v1/vouchers/{code}/validate`.
      properties:
        valid:
          type: boolean
          description: >-
            Indicates whether the voucher is valid within the context of the
            parameters provided in the request body.
        applicable_to:
          $ref: '#/components/schemas/6_res_applicable_to_object'
        inapplicable_to:
          $ref: '#/components/schemas/6_res_inapplicable_to_object'
        tracking_id:
          type: string
          description: Hashed customer source ID.
        order:
          $ref: '#/components/schemas/6_obj_order_object'
        code:
          type: string
          description: Voucher code.
        gift:
          type: object
          description: Contains current gift card balance information.
          properties:
            amount:
              type: integer
              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`.
            balance:
              type: integer
              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.
        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.
        start_date:
          type: string
          format: date-time
          example: '2022-10-04T00:00:00.000Z'
          description: >-
            Activation timestamp defines when the voucher starts to be active in
            ISO 8601 format. Voucher is _inactive_ before this date.
        expiration_date:
          type: string
          format: date-time
          example: '2022-10-31T00:00:00.000Z'
          description: >-
            Expiration timestamp defines when the voucher expires in ISO 8601
            format. Voucher is _inactive_ after this date.
        campaign:
          type: string
          description: Voucher's parent campaign name.
        campaign_id:
          type: string
          example: camp_W8DJVd8J0btqXT6FBwn7BSkC
          description: Voucher's parent campaign's unique ID.
        session:
          $ref: '#/components/schemas/6_res_session_lock_gift_card'
    6_res_validate_voucher_loyalty_card:
      type: object
      title: Valid - Loyalty Card
      description: >-
        Response schema model for validating a loyalty card using **POST**
        `v1/vouchers/{code}/validate`.
      properties:
        valid:
          type: boolean
          description: >-
            Indicates whether the voucher is valid within the context of the
            parameters provided in the request body.
        applicable_to:
          $ref: '#/components/schemas/6_res_applicable_to_object'
        inapplicable_to:
          $ref: '#/components/schemas/6_res_inapplicable_to_object'
        tracking_id:
          type: string
          description: Hashed customer source ID.
        order:
          $ref: '#/components/schemas/6_obj_order_object_apply_to_order'
        code:
          type: string
          description: Voucher code.
        loyalty:
          type: object
          description: Contains the cost of reward in points.
          properties:
            points_cost:
              type: integer
              description: >-
                Number of points that wlil be deducted from loyaty card for the
                associated reward.
        reward:
          type: object
          description: Contains information about the reward that is being validated.
          properties:
            id:
              type: string
              description: Unique reward ID assigned by Voucherify.
              example: rew_Crmu3hu2FKZWZIML59AeAs1n
            assignment_id:
              type: string
              example: rewa_xZr6Ks0j5AHeMRVdELmpI9sc
              description: Unique reward assignment ID assigned by Voucherify.
            points:
              type: integer
              description: Number of points applied to the reward.
        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.
        start_date:
          type: string
          format: date-time
          example: '2022-10-04T00:00:00.000Z'
          description: >-
            Activation timestamp defines when the voucher starts to be active in
            ISO 8601 format. Voucher is _inactive_ before this date.
        expiration_date:
          type: string
          format: date-time
          example: '2022-10-31T00:00:00.000Z'
          description: >-
            Expiration timestamp defines when the voucher expires in ISO 8601
            format. Voucher is _inactive_ after this date.
        campaign:
          type: string
          description: Voucher's parent campaign name.
        campaign_id:
          type: string
          example: camp_W8DJVd8J0btqXT6FBwn7BSkC
          description: Voucher's parent campaign's unique ID.
        session:
          $ref: '#/components/schemas/6_res_session_lock_loyalty_card'
    6_res_applicable_to_object:
      title: Included  Items
      type: object
      description: >-
        Contains list of items that qualify in the scope of the discount. These
        are definitions of included products, SKUs, and product collections.
        These can be discounted.
      properties:
        data:
          type: array
          description: Contains array of items to which the discount can apply.
          items:
            oneOf:
              - $ref: '#/components/schemas/6_res_product_collection'
              - $ref: '#/components/schemas/6_res_product_collection_unit'
              - $ref: '#/components/schemas/6_res_product_collection_fixed_amount'
              - $ref: '#/components/schemas/6_res_product'
              - $ref: '#/components/schemas/6_res_product_unit'
              - $ref: '#/components/schemas/6_res_product_fixed_amount'
              - $ref: '#/components/schemas/6_res_sku'
              - $ref: '#/components/schemas/6_res_sku_unit'
              - $ref: '#/components/schemas/6_res_sku_unit_fixed_amount'
        total:
          type: integer
          description: >-
            Total number of objects defining included products, SKUs, or product
            collections.
        data_ref:
          type: string
          default: data
          description: >-
            Identifies the name of the attribute that contains the array of
            included objects.
        object:
          type: string
          default: list
          description: >-
            The type of the object represented by JSON. This object stores
            information about included products, SKUs, or product collections in
            a dictionary.
    6_res_inapplicable_to_object:
      title: Excluded Items
      type: object
      description: >-
        Contains list of items that **do not** qualify in the scope of the
        discount. These are definitions of excluded products, SKUs, and product
        collections. These **CANNOT** be discounted.
      properties:
        data:
          description: Contains array of items to which the discount cannot apply.
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/6_res_product_collection_excluded'
              - $ref: '#/components/schemas/6_res_product_excluded'
              - $ref: '#/components/schemas/6_res_sku_excluded'
        total:
          type: integer
          description: >-
            Total number of objects defining excluded products, SKUs, or product
            collections.
        data_ref:
          type: string
          default: data
          description: >-
            Identifies the name of the attribute that contains the array of
            excluded objects.
        object:
          type: string
          default: list
          description: >-
            The type of the object represented by JSON. This object stores
            information about excluded products, SKUs, or product collections in
            a dictionary.
    6_obj_order_object:
      title: Order object
      description: >-
        This is an object representing an order with calculated discounts
        applied using the voucher code.
      oneOf:
        - $ref: '#/components/schemas/6_obj_order_object_apply_to_order'
        - $ref: '#/components/schemas/6_obj_order_object_apply_to_items'
    6_res_validate_voucher_discount_amount:
      title: Amount Discount
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      properties:
        type:
          type: string
          default: AMOUNT
          description: Defines the type of the voucher.
        effect:
          type: string
          description: Defines how the discount is applied to the customer's order.
          enum:
            - APPLY_TO_ORDER
            - APPLY_TO_ITEMS
            - APPLY_TO_ITEMS_PROPORTIONALLY
            - APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY
            - APPLY_TO_ITEMS_BY_QUANTITY
        amount_off:
          type: integer
          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. 
    6_res_validate_voucher_discount_percent:
      title: Percent Discount
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      properties:
        type:
          type: string
          default: PERCENT
          description: Defines the type of the voucher.
        effect:
          type: string
          enum:
            - APPLY_TO_ORDER
            - APPLY_TO_ITEMS
          description: Defines how the discount is applied to the customer's order.
        percent_off:
          type: integer
          description: The percent discount that the customer will receive.
        amount_limit:
          type: integer
          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.
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
    6_res_validate_voucher_discount_fixed:
      title: Fixed Discount
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value. A fixed discounts sets a fixed total on cart or item(s) and then
        calculates the discount to apply.
      properties:
        type:
          type: string
          default: FIXED
          description: Type of discount.
        effect:
          type: string
          enum:
            - APPLY_TO_ORDER
            - APPLY_TO_ITEMS
          description: >-
            Defines how the discount is applied to the customer's order.    
                
            | **Effect** | **Definition** |

            |---|---|

            | **APPLY_TO_ORDER** | Sets the order total amount to the value of
            the fixed amount. The discount value is calculated during the
            redemption as it's a difference between the total amount of the
            customer's order and the fixed amount. |

            | **APPLY_TO_ITEMS** | Sets a new price on items. The total discount
            amount is calculated during the redemption and it's a difference
            between the initial item price and the fixed amount. |
        fixed_amount:
          type: integer
          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.
    6_res_validate_voucher_discount_unit:
      title: Unit Discount, single item
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      oneOf:
        - $ref: '#/components/schemas/6_res_validate_voucher_discount_unit_product'
        - $ref: '#/components/schemas/6_res_validate_voucher_discount_unit_sku'
    6_res_validate_voucher_discount_unit_multiple:
      title: Unit Discount, multiple items
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      properties:
        type:
          type: string
          default: UNIT
          description: Discount type.
        effect:
          type: string
          default: ADD_MANY_ITEMS
          description: Defines how the discount is applied to the customer's order.
        units:
          oneOf:
            - $ref: >-
                #/components/schemas/6_res_validate_voucher_discount_unit_product_multiple
            - $ref: >-
                #/components/schemas/6_res_validate_voucher_discount_unit_sku_multiple
    6_res_validate_voucher_discount_shipping:
      title: Shipping Discount
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      properties:
        type:
          type: string
          default: UNIT
          description: Discount type.
        effect:
          type: string
          description: Defines how the unit is added to the customer's order.
          default: ADD_MISSING_ITEMS
        unit_off:
          type: integer
          description: Number of units to be granted a full value discount.
          default: 1
        unit_type:
          type: string
          description: The shipping "product" deemed as free.
          default: prod_5h1pp1ng
        product:
          type: object
          description: Contains information about the shipping "product".
          properties:
            id:
              type: string
              description: Unique shipping "product" ID, assigned by Voucherify.
              default: prod_5h1pp1ng
            source_id:
              type: string
              description: '"Product''s" source ID.'
              default: 5h1pp1ng
            name:
              type: string
              description: '"Product" name.'
              default: Shipping
    6_res_session_lock_discount_voucher:
      title: Session Lock
      type: object
      description: >-
        Schema model for `session` lock object. The session object contains
        information about the session key that was used to establish a session
        between multiple parallel validation and redemption requests.
      properties:
        type:
          type: string
          description: This session locks the redemption **quantity** by 1.
          default: LOCK
        key:
          type: string
          description: >-
            The session unique ID assigned by Voucherify or your own unique
            session ID. 
          example: ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts
        ttl_unit:
          type: string
          description: Defines the type of unit in which the session time is counted.
          enum:
            - HOURS
            - DAYS
            - MINUTES
            - SECONDS
            - MILLISECONDS
            - MICROSECONDS
            - NANOSECONDS
        ttl:
          type: integer
          description: >-
            Value for the period of time that the session is active. Units for
            this parameter are defined by the `session.ttl_unit` parameter.
    6_res_session_lock_gift_card:
      title: Session Lock
      type: object
      description: >-
        Schema model for `session` lock object. The session object contains
        information about the session key that was used to establish a session
        between multiple parallel validation and redemption requests.
      properties:
        type:
          type: string
          description: >-
            This session locks the redemption **quantity** by 1 and the
            redemption **gift credits** specified within the request.
          default: LOCK
        key:
          type: string
          description: >-
            The session unique ID assigned by Voucherify or your own unique
            session ID. Sending an existing ID will result in overwriting an
            existing session. If no session key is provided, then a new ID will
            be generated.
          example: ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts
        ttl_unit:
          type: string
          description: Defines the type of unit in which the session time is counted.
          enum:
            - HOURS
            - DAYS
            - MINUTES
            - SECONDS
            - MILLISECONDS
            - MICROSECONDS
            - NANOSECONDS
        ttl:
          type: integer
          description: >-
            Value for the period of time that the session is active. Units for
            this parameter are defined by the `session.ttl_unit` parameter.
    6_obj_order_object_apply_to_order:
      type: object
      title: 'Order object - Effect: Apply to order'
      description: >-
        This is an object representing an order with calculated discounts
        applied using the voucher code.
      properties:
        id:
          type: string
          example: ord_OLWs41pBk7VFn6ZTyX9U6keh
          description: >-
            Unique order ID, assigned by Voucherify. This parameter is returned
            only if you use the order ID parameter of an already created and
            synced order in the Voucherify application, i.e by sending the
            `order.id` parameter in the request body.
        source_id:
          type: string
          description: >-
            The merchant's order ID if it is different from the Voucherify order
            ID. It is really useful in case of integration between multiple
            systems. It can be an order ID from CRM, database or 3rd party
            service. This parameter is returned only if you use the order ID
            parameter of an already created and synced order in the Voucherify
            application, i.e by sending the `order.id` parameter in the request
            body.
        created_at:
          type: string
          format: date-time
          example: '2022-10-06T11:40:48.705Z'
          description: >-
            Timestamp representing the date and time when the order was created.
            The value is shown in the ISO 8601 format. This parameter is
            returned only if you use the order ID parameter of an already
            created and synced order in the Voucherify application, i.e by
            sending the `order.id` parameter in the request body.
        updated_at:
          type: string
          format: date-time
          example: '2022-10-06T11:47:20.760Z'
          description: >-
            Timestamp representing the date and time when the order was updated.
            The value is shown in the ISO 8601 format. This parameter is
            returned only if you use the order ID parameter of an already
            created and synced order in the Voucherify application, i.e by
            sending the `order.id` parameter in the request body.
        status:
          type: string
          description: >-
            Order status. This parameter is returned if you use the order ID
            parameter of an already created and synced order in the Voucherify
            application, i.e by sending the `order.id` parameter in the request
            body or if you send the request body parameter when defining an
            order in the request body. This parameter can be passed but it's not
            required for validation at all. It's used in the redemption process.
            Normally after the redemption is done, the order is automatically to
            a `PAID` status. To avoid such default behaviour, the user can pass
            any of the other status options and it will be set the order status
            after the redemption instead of the default `PAID`.
          enum:
            - CREATED
            - PAID
            - CANCELED
            - FULFILLED
        amount:
          type: integer
          description: Order amount before applying any discount.
        discount_amount:
          type: integer
          description: Sum of all order-level discounts applied to the order.
        total_discount_amount:
          type: integer
          description: Sum of all order-level discounts.
        total_amount:
          type: integer
          description: |-
            Order amount after applying all the discounts.  
            `total_amount` = `amount` - `total_discount_amount`
        applied_discount_amount:
          type: integer
          description: This field shows the order-level discount applied.
        total_applied_discount_amount:
          type: integer
          description: This field sums up all order-level discounts applied to the order.
        items:
          type: array
          description: >-
            Array of order items that have been applied to the order. Each order
            item can show the effects of particular discounts on the item-level.
          items:
            type: object
            properties:
              object:
                type: string
                default: order_item
                description: >-
                  The type of the object represented by JSON. This object stores
                  information about the `order_item`.
              product_id:
                type: string
                example: prod_5h0wc453_1
                description: >-
                  A unique identifier that represents the product and is
                  assigned by Voucherify.
              sku_id:
                type: string
                example: sku_prod_5h0wc453_1_1
                description: >-
                  A unique identifier that represents the SKU and is assigned by
                  Voucherify.
              quantity:
                type: integer
                description: Quantity of the item in the cart.
              amount:
                type: integer
                description: >-
                  Represents a total pre-discount amount of order item (`price`
                  * `quantity`).
              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`-`discount_amount`
              product:
                type: object
                description: This object stores more information about the related product.
                properties:
                  id:
                    type: string
                    example: prod_5h0wc453_1
                    description: >-
                      A unique identifier that represents the product and is
                      assigned by Voucherify.
                  source_id:
                    type: string
                    description: A unique product identifier from your inventory system.
                    example: illy-arabica
                  name:
                    type: string
                    example: Brewing System
                    description: Product name.
                  price:
                    type: integer
                    description: >-
                      Unit price of a product. The value is multiplied by 100 to
                      represent 2 decimal places. For example `10000 cents` for
                      `$100.00`.
              sku:
                type: object
                description: This object stores more information about the related SKU.
                properties:
                  id:
                    type: string
                    example: sku_prod_5h0wc453_1_1
                    description: >-
                      A unique identifier that represents the SKU and is
                      assigned by Voucherify.
                  source_id:
                    type: string
                    example: illy-arabica-250g
                    description: A unique SKU identifier from your inventory system.
                  sku:
                    type: string
                    description: SKU name.
                  price:
                    type: integer
                    description: >-
                      Unit price of a SKU. The value is multiplied by 100 to
                      represent 2 decimal places. For example `10000 cents` for
                      `$100.00`.
        metadata:
          type: object
          description: >-
            The metadata object stores all custom attributes assigned to the
            order. A set of key/value pairs that are att to an order object.
            Stores additional information about the order in a structured
            format.
        customer:
          type: object
          description: >-
            Object containing information about the customer that is making the
            purchase.
          properties:
            id:
              type: string
              example: cust_7iUa6ICKyU6gH40dBU25kQU1
              description: >-
                Unique customer identifier of the customer making the purchase.
                The ID is assigned by Voucherify.
            object:
              type: string
              default: customer
              description: Type of object represented by the `customer` object.
        referrer:
          type: object
          description: Object containing information about the referrer.
          properties:
            id:
              type: string
              example: cust_7iUa6ICKyU6gH40dBU25kQU1
              description: >-
                Unique referrer ID, who referred the customer making the
                purchase.
            object:
              type: string
              default: customer
              description: Type of object represented by the `referrer` object.
        customer_id:
          type: string
          example: cust_7iUa6ICKyU6gH40dBU25kQU1
          description: >-
            Unique customer identifier of the customer making the purchase. The
            ID is assigned by Voucherify.
        referrer_id:
          type: string
          example: cust_nM4jqPiaXUvQdVSA6vTRUnix
          description: Unique referrer ID.
        object:
          type: string
          default: order
          description: >-
            The type of the object represented by JSON. This object stores
            information about the `order`.
    6_res_session_lock_loyalty_card:
      title: Session Lock
      type: object
      description: >-
        Schema model for `session` lock object. The session object contains
        information about the session key that was used to establish a session
        between multiple parallel validation and redemption requests.
      properties:
        type:
          type: string
          description: >-
            This session locks the redemption **quantity** by 1 and the
            redemption **loyalty points** specified within the request.
          default: LOCK
        key:
          type: string
          description: >-
            The session unique ID assigned by Voucherify or your own unique
            session ID. Sending an existing ID will result in overwriting an
            existing session. If no session key is provided, then a new ID will
            be generated.
          example: ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts
        ttl_unit:
          type: string
          description: Defines the type of unit in which the session time is counted.
          enum:
            - HOURS
            - DAYS
            - MINUTES
            - SECONDS
            - MILLISECONDS
            - MICROSECONDS
            - NANOSECONDS
        ttl:
          type: integer
          description: >-
            Value for the period of time that the session is active. Units for
            this parameter are defined by the `session.ttl_unit` parameter.
    6_res_product_collection:
      title: Product Collection
      type: object
      description: Contains definition for a product collection.
      properties:
        object:
          type: string
          default: products_collection
          description: This object stores information about the product collection.
        id:
          type: string
          example: pc_4ndRXAsTOzwSdHcQcxf489uU
          description: Unique product collection ID assigned by Voucherify.
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
    6_res_product_collection_unit:
      title: Product Collection for Unit Discount
      type: object
      description: Contains definition for a product collection.
      properties:
        object:
          type: string
          default: products_collection
          description: This object stores information about the product collection.
        id:
          type: string
          example: pc_4ndRXAsTOzwSdHcQcxf489uU
          description: Unique product collection ID assigned by Voucherify.
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
        quantity_limit:
          type: integer
          description: >-
            The maximum number of units allowed to be discounted per order line
            item.
        aggregated_quantity_limit:
          type: integer
          description: >-
            The maximum number of units allowed to be discounted combined across
            all matched order line items.
    6_res_product_collection_fixed_amount:
      title: Product Collection for Fixed Amount Discount
      type: object
      description: Contains definition for a product collection.
      properties:
        object:
          type: string
          default: products_collection
          description: This object stores information about the product collection.
        id:
          type: string
          example: pc_4ndRXAsTOzwSdHcQcxf489uU
          description: Unique product collection ID assigned by Voucherify.
        price:
          type: integer
          description: >-
            New fixed price of an item. Value is multiplied by 100 to precisely
            represent 2 decimal places. For example, a $10 price is written as
            1000. In case of the fixed price being calculated by the formula,
            i.e. the `price_formula` parameter is present in the fixed price
            definition, this value becomes the **fallback value**. Such that in
            a case where the formula cannot be calculated due to missing
            metadata, for example, this value will be used as the fixed price.
        price_formula:
          type: string
          description: >-
            Formula used to dynamically calculate the discounted price of an
            item.
          example: '"IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)'
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
    6_res_product:
      title: Product
      type: object
      description: Contains definition for a product.
      properties:
        object:
          type: string
          default: product
          description: This object stores information about the product.
        id:
          type: string
          description: Unique product ID assigned by Voucherify.
          example: prod_0bae2dc5a090fd0184
        source_id:
          type: string
          description: The product ID from your inventory system.
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
    6_res_product_unit:
      title: Product for Unit Discount
      type: object
      description: Contains definition for a product.
      properties:
        object:
          type: string
          default: product
          description: This object stores information about the product.
        id:
          type: string
          description: Unique product ID assigned by Voucherify.
          example: prod_0bae2dc5a090fd0184
        source_id:
          type: string
          description: The product ID from your inventory system.
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
        quantity_limit:
          type: integer
          description: >-
            The maximum number of units allowed to be discounted per order line
            item.
        aggregated_quantity_limit:
          type: integer
          description: >-
            The maximum number of units allowed to be discounted combined across
            all matched order line items.
    6_res_product_fixed_amount:
      title: Product for Fixed Amount Discount
      type: object
      description: Contains definition for a product.
      properties:
        object:
          type: string
          default: product
          description: This object stores information about the product.
        id:
          type: string
          description: Unique product ID assigned by Voucherify.
          example: prod_0bae2dc5a090fd0184
        source_id:
          type: string
          description: The product ID from your inventory system.
        price:
          type: integer
          description: >-
            New fixed price of an item. Value is multiplied by 100 to precisely
            represent 2 decimal places. For example, a $10 price is written as
            1000. In case of the fixed price being calculated by the formula,
            i.e. the `price_formula` parameter is present in the fixed price
            definition, this value becomes the **fallback value**. Such that in
            a case where the formula cannot be calculated due to missing
            metadata, for example, this value will be used as the fixed price.
        price_formula:
          type: string
          description: >-
            Formula used to dynamically calculate the discounted price of an
            item.
          example: IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
    6_res_sku:
      title: SKU
      type: object
      description: Contains definition for a product variant.
      properties:
        object:
          type: string
          default: sku
          description: This object stores information about the product variant.
        id:
          type: string
          description: Unique SKU ID assigned by Voucherify.
          example: sku_0b7d7dfb090be5c619
        source_id:
          type: string
          description: The source ID from your inventory system.
        product_id:
          type: string
          description: Parent product's unique ID assigned by Voucherify.
        product_source_id:
          type: string
          description: Parent product's source ID from your inventory system.
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
    6_res_sku_unit:
      title: SKU for Unit Discount
      type: object
      description: Contains definition for a product variant.
      properties:
        object:
          type: string
          default: sku
          description: This object stores information about the product variant.
        id:
          type: string
          description: Unique SKU ID assigned by Voucherify.
          example: sku_0b7d7dfb090be5c619
        source_id:
          type: string
          description: The source ID from your inventory system.
        product_id:
          type: string
          description: Parent product's unique ID assigned by Voucherify.
        product_source_id:
          type: string
          description: Parent product's source ID from your inventory system.
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
        quantity_limit:
          type: integer
          description: >-
            The maximum number of units allowed to be discounted per order line
            item.
        aggregated_quantity_limit:
          type: integer
          description: >-
            The maximum number of units allowed to be discounted combined across
            all matched order line items.
    6_res_sku_unit_fixed_amount:
      title: SKU for Amount Discount
      type: object
      description: Contains definition for a product variant.
      properties:
        object:
          type: string
          default: sku
          description: This object stores information about the product variant.
        id:
          type: string
          description: Unique SKU ID assigned by Voucherify.
          example: sku_0b7d7dfb090be5c619
        source_id:
          type: string
          description: The source ID from your inventory system.
        product_id:
          type: string
          description: Parent product's unique ID assigned by Voucherify.
        product_source_id:
          type: string
          description: Parent product's source ID from your inventory system.
        price:
          type: integer
          description: >-
            New fixed price of an item. Value is multiplied by 100 to precisely
            represent 2 decimal places. For example, a $10 price is written as
            1000. In case of the fixed price being calculated by the formula,
            i.e. the `price_formula` parameter is present in the fixed price
            definition, this value becomes the **fallback value**. Such that in
            a case where the formula cannot be calculated due to missing
            metadata, for example, this value will be used as the fixed price.
        price_formula:
          type: string
          description: >-
            Formula used to dynamically calculate the discounted price of an
            item.
          example: IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.2;6)
        effect:
          type: string
          enum:
            - APPLY_TO_EVERY
            - APPLY_TO_CHEAPEST
            - APPLY_TO_MOST_EXPENSIVE
          description: Defines how the discount is applied to the customer's order.
    6_res_product_collection_excluded:
      title: Product Collection
      type: object
      description: Contains definition for a product collection.
      properties:
        object:
          type: string
          default: products_collection
          description: This object stores information about the product collection.
        id:
          type: string
          example: pc_4ndRXAsTOzwSdHcQcxf489uU
          description: Unique product collection ID assigned by Voucherify.
        effect:
          type: string
          default: APPLY_TO_EVERY
          enum:
            - APPLY_TO_EVERY
          description: Defines how the discount is applied to the customer's order.
    6_res_product_excluded:
      title: Product
      type: object
      description: Contains definition for a product.
      properties:
        object:
          type: string
          default: product
          description: This product stores information about the product.
        id:
          type: string
          description: Unique product ID assigned by Voucherify.
          example: prod_0bae2dc5a090fd0184
        source_id:
          type: string
          description: The product ID from your inventory system.
        effect:
          type: string
          default: APPLY_TO_EVERY
          enum:
            - APPLY_TO_EVERY
          description: Defines how the discount is applied to the customer's order.
    6_res_sku_excluded:
      title: SKU
      type: object
      description: Contains definition for a product variant.
      properties:
        object:
          type: string
          default: sku
          description: This object stores information about the product variant.
        id:
          type: string
          description: Unique SKU ID assigned by Voucherify.
          example: sku_0b7d7dfb090be5c619
        source_id:
          type: string
          description: The source ID from your inventory system.
        effect:
          type: string
          default: APPLY_TO_EVERY
          enum:
            - APPLY_TO_EVERY
          description: Defines how the discount is applied to the customer's order.
    6_obj_order_object_apply_to_items:
      type: object
      title: 'Order object - Effect: Apply to items'
      description: >-
        This is an object representing an order with calculated discounts
        applied using the voucher code.
      properties:
        id:
          type: string
          example: ord_OLWs41pBk7VFn6ZTyX9U6keh
          description: >-
            Unique order ID, assigned by Voucherify. This parameter is returned
            only if you use the order ID parameter of an already created and
            synced order in the Voucherify application, i.e by sending the
            `order.id` parameter in the request body.
        source_id:
          type: string
          description: >-
            The merchant's order ID if it is different from the Voucherify order
            ID. It is really useful in case of integration between multiple
            systems. It can be an order ID from CRM, database or 3rd party
            service. This parameter is returned only if you use the order ID
            parameter of an already created and synced order in the Voucherify
            application, i.e by sending the `order.id` parameter in the request
            body.
        created_at:
          type: string
          format: date-time
          example: '2022-10-06T11:40:48.705Z'
          description: >-
            Timestamp representing the date and time when the order was created.
            The value is shown in the ISO 8601 format. This parameter is
            returned only if you use the order ID parameter of an already
            created and synced order in the Voucherify application, i.e by
            sending the `order.id` parameter in the request body.
        updated_at:
          type: string
          format: date-time
          example: '2022-10-06T11:47:20.760Z'
          description: >-
            Timestamp representing the date and time when the order was updated.
            The value is shown in the ISO 8601 format. This parameter is
            returned only if you use the order ID parameter of an already
            created and synced order in the Voucherify application, i.e by
            sending the `order.id` parameter in the request body.
        status:
          type: string
          description: >-
            Order status. This parameter is returned if you use the order ID
            parameter of an already created and synced order in the Voucherify
            application, i.e by sending the `order.id` parameter in the request
            body or if you send the request body parameter when defining an
            order in the request body. This parameter can be passed but it's not
            required for validation at all. It's used in the redemption process.
            Normally after the redemption is done, the order is automatically to
            a `PAID` status. To avoid such default behaviour, the user can pass
            any of the other status options and it will be set the order status
            after the redemption instead of the default `PAID`.
          enum:
            - CREATED
            - PAID
            - CANCELED
            - FULFILLED
        amount:
          type: integer
          description: Order amount before applying any discount.
        items_discount_amount:
          type: integer
          description: |-
            Sum of all product-specific discounts applied.  
            `sum(items, i => i.discount_amount)`
        total_discount_amount:
          type: integer
          description: Sum of all product-specific discounts applied.
        total_amount:
          type: integer
          description: |-
            Order amount after applying all the discounts.  
            `total_amount` = `amount` - `total_discount_amount`
        items_applied_discount_amount:
          type: integer
          description: Product-specifc discounts applied to all the items.
        total_applied_discount_amount:
          type: integer
          description: Product-specific discounts applied in the order.
        items:
          type: array
          description: >-
            Array of order items that have been applied to the order. Each order
            item can show the effects of particular discounts on the item-level.
          items:
            type: object
            properties:
              object:
                type: string
                default: order_item
                description: >-
                  The type of the object represented by JSON. This object stores
                  information about the `order_item`.
              product_id:
                type: string
                example: prod_5h0wc453_1
                description: >-
                  A unique identifier that represents the product and is
                  assigned by Voucherify.
              sku_id:
                type: string
                example: sku_prod_5h0wc453_1_1
                description: >-
                  A unique identifier that represents the SKU and is assigned by
                  Voucherify.
              quantity:
                type: integer
                description: Quantity of the item in the cart.
              amount:
                type: integer
                description: >-
                  Represents a total pre-discount amount of order item (`price`
                  * `quantity`).
              discount_amount:
                type: integer
                description: The item-level discount applied to the item.
              applied_discount_amount:
                type: integer
                description: The item-level discount applied to the item.
              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`-`discount_amount`
              product:
                type: object
                description: This object stores more information about the related product.
                properties:
                  id:
                    type: string
                    example: prod_5h0wc453_1
                    description: >-
                      A unique identifier that represents the product and is
                      assigned by Voucherify.
                  source_id:
                    type: string
                    description: A unique product identifier from your inventory system.
                    example: illy-arabica
                  name:
                    type: string
                    example: Brewing System
                    description: Product name.
                  price:
                    type: integer
                    description: >-
                      Unit price of a product. The value is multiplied by 100 to
                      represent 2 decimal places. For example `10000 cents` for
                      `$100.00`.
              sku:
                type: object
                description: This object stores more information about the related SKU.
                properties:
                  id:
                    type: string
                    example: sku_prod_5h0wc453_1_1
                    description: >-
                      A unique identifier that represents the SKU and is
                      assigned by Voucherify.
                  source_id:
                    type: string
                    example: illy-arabica-250g
                    description: A unique SKU identifier from your inventory system.
                  sku:
                    type: string
                    description: SKU name.
                  price:
                    type: integer
                    description: >-
                      Unit price of a SKU. The value is multiplied by 100 to
                      represent 2 decimal places. For example `10000 cents` for
                      `$100.00`.
        metadata:
          type: object
          description: >-
            The metadata object stores all custom attributes assigned to the
            order. A set of key/value pairs that are att to an order object.
            Stores additional information about the order in a structured
            format.
        customer:
          type: object
          description: >-
            Object containing information about the customer that is making the
            purchase.
          properties:
            id:
              type: string
              example: cust_7iUa6ICKyU6gH40dBU25kQU1
              description: >-
                Unique customer identifier of the customer making the purchase.
                The ID is assigned by Voucherify.
            object:
              type: string
              default: customer
              description: Type of object represented by the `customer` object.
        referrer:
          type: object
          description: Object containing information about the referrer.
          properties:
            id:
              type: string
              example: cust_7iUa6ICKyU6gH40dBU25kQU1
              description: >-
                Unique referrer ID, who referred the customer making the
                purchase.
            object:
              type: string
              default: customer
              description: Type of object represented by the `referrer` object.
        customer_id:
          type: string
          example: cust_7iUa6ICKyU6gH40dBU25kQU1
          description: >-
            Unique customer identifier of the customer making the purchase. The
            ID is assigned by Voucherify.
        referrer_id:
          type: string
          example: cust_nM4jqPiaXUvQdVSA6vTRUnix
          description: Unique referrer ID.
        object:
          type: string
          default: order
          description: >-
            The type of the object represented by JSON. This object stores
            information about the `order`.
    6_res_validate_voucher_discount_unit_product:
      title: Unit Discount, Product
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      properties:
        type:
          type: string
          default: UNIT
          description: Discount type.
        effect:
          type: string
          enum:
            - ADD_MISSING_ITEMS
            - ADD_NEW_ITEMS
          description: Defines how the unit is added to the customer's order.
        unit_off:
          type: integer
          description: Number of units to be granted a full value discount.
        unit_type:
          type: string
          example: prod_0a9f9ab4ab019a42d5
          description: >-
            The product deemed as free, chosen from product inventory (e.g.
            time, items).
        product:
          type: object
          description: Contains information about the product.
          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.
    6_res_validate_voucher_discount_unit_sku:
      title: Unit Discount, SKU
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      properties:
        type:
          type: string
          default: UNIT
          description: Discount type.
        effect:
          type: string
          enum:
            - ADD_MISSING_ITEMS
            - ADD_NEW_ITEMS
          description: Defines how the unit is added to the customer's order.
        unit_off:
          type: integer
          description: Number of units to be granted a full value discount.
        unit_type:
          type: string
          example: sku_0bae3b28f610fd0da1
          description: >-
            The product variant deemed as free, chosen from product inventory
            (e.g. time, items).
        sku:
          type: object
          description: Contains information about the SKU.
          properties:
            id:
              type: string
              example: sku_0bae3b28f610fd0da1
              description: Unique SKU ID, assigned by Voucherify.
            source_id:
              type: string
              description: Product variant's source ID.
            sku:
              type: string
              description: Product varient's name.
        product:
          type: object
          description: Contains information about the parent product.
          properties:
            id:
              type: string
              description: Unique parent product ID, assigned by Voucherify.
              example: prod_0bae2dc5a090fd0184
            source_id:
              type: string
              description: Source ID of parent product.
            name:
              type: string
              description: Name of parent product.
    6_res_validate_voucher_discount_unit_product_multiple:
      title: Product Item
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      properties:
        effect:
          type: string
          enum:
            - ADD_MISSING_ITEMS
            - ADD_NEW_ITEMS
          description: Defines how the unit is added to the customer's order.
        unit_off:
          type: integer
          description: Number of units to be granted a full value discount.
        unit_type:
          type: string
          example: prod_0a9f9ab4ab019a42d5
          description: >-
            The product deemed as free, chosen from product inventory (e.g.
            time, items).
        product:
          type: object
          description: Contains information about the product.
          properties:
            id:
              type: string
              description: Unique product ID, assigned by Voucherify.
              example: prod_0a9f9ab4ab019a42d5
            source_id:
              type: string
              description: Product's source ID.
            name:
              type: string
              description: Product name.
    6_res_validate_voucher_discount_unit_sku_multiple:
      title: SKU Item
      type: object
      description: >-
        This is an object representing the discount that the customer would
        receive in the context of the provided request body parameters. If the
        discount is calculated based on a formula, this object will return
        either the discount calculated based on the formula or the fallback
        value.
      properties:
        effect:
          type: string
          enum:
            - ADD_MISSING_ITEMS
            - ADD_NEW_ITEMS
          description: Defines how the unit is added to the customer's order.
        unit_off:
          type: integer
          description: Number of units to be granted a full value discount.
        unit_type:
          type: string
          example: sku_0bae3b28f610fd0da1
          description: >-
            The product variant deemed as free, chosen from product inventory
            (e.g. time, items).
        sku:
          type: object
          description: Contains information about the SKU.
          properties:
            id:
              type: string
              example: sku_0bae3b28f610fd0da1
              description: Unique SKU ID, assigned by Voucherify.
            source_id:
              type: string
              description: Product variant's source ID.
            sku:
              type: string
              description: Product varient's name.
        product:
          type: object
          description: Contains information about the parent product.
          properties:
            id:
              type: string
              description: Unique parent product ID, assigned by Voucherify.
              example: prod_0b7d7dfb05cbe5c616
            source_id:
              type: string
              description: Source ID of parent product.
            name:
              type: string
              description: Name of parent product.
  securitySchemes:
    X-Client-Application-Id:
      type: apiKey
      name: X-Client-Application-Id
      in: header
    X-Client-Token:
      type: apiKey
      name: X-Client-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`.

````