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

# Import Vouchers

> Import generic (standalone) vouchers and gift cards into the repository.
You can upload up to 100,000 codes to a campaign, as a campaign can have up to 100,000 codes by default. 
 Also, the request can include up to **10 MB** of data.


> 📘 Important notes
>
> - **Start and expiration dates** need to be provided in compliance with the ISO 8601 standard. For example, 2020-03-11T09:00:00.000Z.
> - Custom code attributes (not supported by-default) need to be added as code **metadata**.
> - You **cannot import the same codes** to a single Voucherify Project.

Any parameters not provided in the payload will be left blank or null.

For both **standalone discount vouchers and gift cards**, you can import the following fields:  

- code
- category
- active
- type
- start_date
- expiration_date
- redemption.quantity
- additional_info
- metadata

For **gift cards**, you can also import the following field:

- gift.amount

For **discount vouchers**, you can import the `discount` object. The object will slightly vary depending on the type of discount. Each discount type **requires** the `type` to be defined in the import.

| **Discount Type** | **Required fields** |
|:---|:---|
| Amount | amount_off, effect |
| Percent | percent_off, effect |
| Fixed | fixed_amount, effect |
| Unit - One item | unit_off, unit_type, effect |
| Unit - Multiple items | unit_off, unit_type, effect |
| Shipping | unit_off, unit_type, effect |

Fields other than the ones listed above won't be imported. Even if provided, they will be silently skipped.

This API request starts a process that affects Voucherify data in bulk. 

In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. 

The result will return the async ID. You can verify the status of your request via this [API request](/api-reference/async-actions/get-async-action).

>🚧 Standalone Vouchers and Campaigns
>
>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.



## OpenAPI

````yaml /openapi/vouchers.json post /v1/vouchers/import
openapi: 3.0.1
info:
  title: Voucherify API - Vouchers
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/vouchers/import:
    post:
      tags:
        - Vouchers
      summary: Import Vouchers
      description: >-
        Import generic (standalone) vouchers and gift cards into the repository.

        You can upload up to 100,000 codes to a campaign, as a campaign can have
        up to 100,000 codes by default. 
         Also, the request can include up to **10 MB** of data.


        > 📘 Important notes

        >

        > - **Start and expiration dates** need to be provided in compliance
        with the ISO 8601 standard. For example, 2020-03-11T09:00:00.000Z.

        > - Custom code attributes (not supported by-default) need to be added
        as code **metadata**.

        > - You **cannot import the same codes** to a single Voucherify Project.


        Any parameters not provided in the payload will be left blank or null.


        For both **standalone discount vouchers and gift cards**, you can import
        the following fields:  


        - code

        - category

        - active

        - type

        - start_date

        - expiration_date

        - redemption.quantity

        - additional_info

        - metadata


        For **gift cards**, you can also import the following field:


        - gift.amount


        For **discount vouchers**, you can import the `discount` object. The
        object will slightly vary depending on the type of discount. Each
        discount type **requires** the `type` to be defined in the import.


        | **Discount Type** | **Required fields** |

        |:---|:---|

        | Amount | amount_off, effect |

        | Percent | percent_off, effect |

        | Fixed | fixed_amount, effect |

        | Unit - One item | unit_off, unit_type, effect |

        | Unit - Multiple items | unit_off, unit_type, effect |

        | Shipping | unit_off, unit_type, effect |


        Fields other than the ones listed above won't be imported. Even if
        provided, they will be silently skipped.


        This API request starts a process that affects Voucherify data in bulk. 


        In case of small jobs (like bulk update) the request is put into a queue
        and processed once every other bulk request placed in the queue prior to
        this request is finished. However, when the job takes a longer time
        (like vouchers generation) then it is processed in small portions in a
        round-robin fashion. When there is a list of vouchers generation
        scheduled, then they will all have the `IN_PROGRESS` status shortly.
        This way, small jobs added just after scheduling big jobs of the same
        type will be processed in a short time window. 


        The result will return the async ID. You can verify the status of your
        request via this [API
        request](/api-reference/async-actions/get-async-action).


        >🚧 Standalone Vouchers and Campaigns

        >

        >In version
        [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004),
        generic (standalone) vouchers created through the Voucherify dashboard
        create a campaign for that voucher. However, vouchers imported through
        the dashboard in the Vouchers section or through the API do not have a
        campaign attached, so the values for `campaign` and `campaign_id` are
        `null`.
      operationId: import-vouchers
      parameters: []
      requestBody:
        required: true
        description: >-
          The request body is an array of objects. Each object contains details
          about a specific voucher. 
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VouchersImportCreateRequestBody'
            examples:
              Example:
                value:
                  - code: PROMO-CODE30OFF-NO-EFFECT
                    category: new customer acquisition
                    type: DISCOUNT_VOUCHER
                    active: true
                    discount:
                      amount_off: 3000
                      type: AMOUNT
                    start_date: '2020-12-01T23:00:00Z'
                    expiration_date: '2023-12-19T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code1
                  - code: PROMO-CODE30-PERCENT-NO-EFFECT
                    type: DISCOUNT_VOUCHER
                    active: false
                    discount:
                      percent_off: 30
                      type: PERCENT
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
                  - code: GIFT-CARD-100
                    type: GIFT_VOUCHER
                    active: true
                    category: new customer acquisition
                    gift:
                      amount: 10000
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 5
                    metadata:
                      unit: EUR
                    additional_info: secret-GIFT-code2
                  - code: PROMO-CODE1-PERCENT-EFFECT-ORDER
                    type: DISCOUNT_VOUCHER
                    active: false
                    discount:
                      percent_off: 30
                      type: PERCENT
                      effect: APPLY_TO_ORDER
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
                  - code: PROMO-CODE2-PERCENT-EFFECT-ITEM
                    type: DISCOUNT_VOUCHER
                    active: false
                    discount:
                      percent_off: 30
                      type: PERCENT
                      effect: APPLY_TO_ITEMS
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
                  - code: >-
                      PROMO-CODE1-PERCENT-NO-EFFECT-REDEEMED-QUANTITY-ATTRIBUTE-DOESNT-GET-PASSED
                    type: DISCOUNT_VOUCHER
                    active: false
                    discount:
                      percent_off: 30
                      type: PERCENT
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                      redeemed_quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
                  - code: PROMO-CODE1-AMOUNT-EFFECT-ITEMS-PROPORTIONALLY
                    type: DISCOUNT_VOUCHER
                    active: false
                    discount:
                      amount_off: 30
                      type: AMOUNT
                      effect: APPLY_TO_ITEMS_PROPORTIONALLY
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
                  - code: PROMO-CODE1-FIXED-EFFECT-ORDER
                    type: DISCOUNT_VOUCHER
                    active: false
                    discount:
                      fixed_amount: 30
                      type: FIXED
                      effect: APPLY_TO_ORDER
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
                  - code: PROMO-CODE1-UNIT-SINGLE-ITEM-EFFECT-MISSING
                    type: DISCOUNT_VOUCHER
                    active: false
                    discount:
                      unit_off: 1
                      unit_type: prod_0a9f9aeddb019a42db
                      type: UNIT
                      effect: ADD_MISSING_ITEMS
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
                  - code: PROMO-CODE2-UNIT-MULTIPLE-ITEMS
                    type: DISCOUNT_VOUCHER
                    active: true
                    discount:
                      type: UNIT
                      effect: ADD_MANY_ITEMS
                      units:
                        - unit_off: 1
                          unit_type: prod_0a9f9aeddb019a42db
                          effect: ADD_MISSING_ITEMS
                        - unit_off: 1
                          unit_type: prod_0a9f9aeddb019a42db
                          effect: ADD_NEW_ITEMS
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
                  - code: PROMO-CODE1-SHIPPING
                    type: DISCOUNT_VOUCHER
                    active: false
                    discount:
                      type: UNIT
                      unit_off: 1
                      unit_type: prod_5h1pp1ng
                      effect: ADD_MISSING_ITEMS
                    start_date: '2020-12-10T23:00:00Z'
                    expiration_date: '2023-12-31T23:00:00Z'
                    redemption:
                      quantity: 1
                    metadata:
                      unit: EUR
                    additional_info: secret-code2
      responses:
        '202':
          description: >-
            Returns ID of the scheduled async action. The response informs you
            that your request has been accepted and vouchers will be added to
            the repository asynchronously. To check the import status and
            result, copy the `async_action_id` from the response and pass it
            using the [Get Async
            Action](/api-reference/async-actions/get-async-action) endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VouchersImportCreateResponseBody'
              examples:
                Example:
                  value:
                    async_action_id: aa_0aac93c6af84485df3
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - vouchers
components:
  schemas:
    VouchersImportCreateRequestBody:
      title: Vouchers Import Request Body
      type: array
      description: Request body schema for **POST** `v1/vouchers/import`.
      items:
        $ref: '#/components/schemas/VouchersImportCreateItemRequestBody'
    VouchersImportCreateResponseBody:
      title: Vouchers Import Create Response Body
      description: Response body schema for **POST** `v1/vouchers/import`.
      allOf:
        - $ref: '#/components/schemas/AsyncActions'
    VouchersImportCreateItemRequestBody:
      title: Vouchers Import Request Body Item
      oneOf:
        - $ref: '#/components/schemas/VoucherImportGift'
        - $ref: '#/components/schemas/VoucherImportDiscount'
    AsyncActions:
      type: object
      title: Asynchronous Actions
      description: Response to requests that are processed asynchronously.
      properties:
        async_action_id:
          type: string
          example: aa_0a875d56c805df6601
          description: The ID of the scheduled asynchronous action.
      required:
        - async_action_id
    VoucherImportGift:
      title: Voucher Import Gift
      type: object
      allOf:
        - $ref: '#/components/schemas/VoucherImportBase'
        - type: object
          properties:
            type:
              type: string
              default: GIFT_VOUCHER
              enum:
                - GIFT_VOUCHER
              description: 'Defines the type of the voucher. '
            gift:
              $ref: '#/components/schemas/Gift'
          required:
            - gift
    VoucherImportDiscount:
      title: Voucher Import Discount
      type: object
      allOf:
        - $ref: '#/components/schemas/VoucherImportBase'
        - type: object
          properties:
            type:
              type: string
              default: DISCOUNT_VOUCHER
              enum:
                - DISCOUNT_VOUCHER
              description: 'Defines the type of the voucher. '
            discount:
              $ref: '#/components/schemas/Discount'
          required:
            - discount
    VoucherImportBase:
      title: Voucher Import Base
      type: object
      description: Object model for gift card object being imported.
      properties:
        code:
          type: string
          description: Value representing the imported code.
        redemption:
          type: object
          description: >-
            Stores the quantity of redemptions that can be applied to the
            voucher.
          properties:
            quantity:
              type: integer
              description: >-
                How many times a voucher can be redeemed. A `null` value means
                unlimited.
              example: 10
        active:
          type: boolean
          description: >-
            A flag to toggle the voucher on or off. You can disable a voucher
            even though it's within the active period defined by the
            `start_date` and `expiration_date`.  


            - `true` indicates an *active* voucher

            - `false` indicates an *inactive* voucher
        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.
        category:
          type: string
          description: >-
            Tag defining the category that this voucher belongs to. Useful when
            listing vouchers using the [List
            Vouchers](/api-reference/vouchers/list-vouchers) endpoint.
        start_date:
          type: string
          description: >-
            Activation timestamp presented in the ISO 8601 format. Voucher is
            *inactive before* this date. Start date defines when the code starts
            to be active.

            Allowed date formats are:

            - YYYY-MM-DD

            - YYYY-MM-DDTHH

            - YYYY-MM-DDTHH:mm

            - YYYY-MM-DDTHH:mm:ss

            - YYYY-MM-DDTHH:mm:ssZ

            - YYYY-MM-DDTHH:mm:ss.SSSZ
          format: date-time
          example: '2020-12-28T12:49:16.272Z'
        expiration_date:
          type: string
          description: >-
            Expiration date defines when the code expires. Expiration timestamp
            is presented in the ISO 8601 format.  Voucher is *inactive after*
            this date.

            Allowed date formats are:

            - YYYY-MM-DD

            - YYYY-MM-DDTHH

            - YYYY-MM-DDTHH:mm

            - YYYY-MM-DDTHH:mm:ss

            - YYYY-MM-DDTHH:mm:ssZ

            - YYYY-MM-DDTHH:mm:ss.SSSZ
          format: date-time
          example: '2053-12-28T12:49:16.272Z'
        validity_timeframe:
          $ref: '#/components/schemas/ValidityTimeframe'
        validity_day_of_week:
          $ref: '#/components/schemas/ValidityDayOfWeek'
        additional_info:
          type: string
          description: >-
            An optional field to keep any extra textual information about the
            code such as a code description and details.
      required:
        - code
    Gift:
      title: Gift
      type: object
      description: Contains current gift card balance information.
      properties:
        amount:
          type: number
          description: >-
            Total gift card income over the lifetime of the card. The value is
            multiplied by 100 to represent 2 decimal places. For example `10000
            cents` for `$100.00`.
        subtracted_amount:
          type: integer
          description: Total amount of subtracted credits over the gift card lifetime.
        balance:
          type: number
          description: >-
            Available funds. The value is multiplied by 100 to represent 2
            decimal places. For example `10000 cents` for `$100.00`. `balance` =
            `amount` - `subtracted_amount` - `redemption.redeemed_amount`.
        effect:
          type: string
          enum:
            - APPLY_TO_ORDER
            - APPLY_TO_ITEMS
          description: Defines how the credits are applied to the customer's order.
      required:
        - amount
        - balance
    Discount:
      title: Discount
      type: object
      description: Contains information about discount.
      oneOf:
        - $ref: '#/components/schemas/DiscountAmount'
        - $ref: '#/components/schemas/DiscountUnit'
        - $ref: '#/components/schemas/DiscountUnitMultiple'
        - $ref: '#/components/schemas/DiscountPercent'
        - $ref: '#/components/schemas/DiscountFixed'
    ValidityTimeframe:
      title: Validity Timeframe
      type: object
      description: >-
        Set recurrent time periods when the earning rule is valid. For example,
        valid for 1 hour every other day.`start_date` **required** when
        including the `validity_timeframe`.
      properties:
        duration:
          type: string
          description: >-
            Defines the amount of time an earning rule will be active in ISO
            8601 format. For example, an earning rule with a `duration` of
            `PT1H` will be valid for a duration of one hour.
          example: PT1H
        interval:
          type: string
          description: >-
            Defines the intervening time between two time points in ISO 8601
            format, expressed as a duration. For example, an earning rule with
            an `interval` of `P2D` will be valid every other day.
          example: P2D
    ValidityDayOfWeek:
      title: Validity Day Of Week
      type: array
      description: >-
        Integer array corresponding to the particular days of the week in which
        the voucher is valid.


        - `0` Sunday

        - `1` Monday

        - `2` Tuesday

        - `3` Wednesday

        - `4` Thursday

        - `5` Friday

        - `6` Saturday
      items:
        type: integer
        enum:
          - 0
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
    DiscountAmount:
      type: object
      title: Amount
      properties:
        type:
          type: string
          default: AMOUNT
          enum:
            - AMOUNT
          description: Defines the type of the voucher.
        amount_off:
          type: number
          description: >-
            Amount taken off the subtotal of a price. Value is multiplied by 100
            to precisely represent 2 decimal places. For example, a $10 discount
            is written as 1000.
        amount_off_formula:
          type: string
          description: Formula used to dynamically calculate the discount.
        aggregated_amount_limit:
          type: integer
          description: Maximum discount amount per order.
        effect:
          description: Defines how the discount is applied to the customer's order.
          allOf:
            - $ref: '#/components/schemas/DiscountAmountVouchersEffectTypes'
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
      required:
        - type
        - amount_off
    DiscountUnit:
      type: object
      title: Unit
      properties:
        type:
          type: string
          default: UNIT
          enum:
            - UNIT
          description: Discount type.
        unit_off:
          type: integer
          description: Number of units to be granted a full value discount.
        unit_off_formula:
          type: string
          description: Formula used to dynamically calculate the number of units.
        effect:
          description: Defines how the unit is added to the customer's order.
          allOf:
            - $ref: '#/components/schemas/DiscountUnitVouchersEffectTypes'
        unit_type:
          type: string
          description: >-
            The product deemed as free, chosen from product inventory (e.g.
            time, items).
        product:
          description: Contains information about the product.
          allOf:
            - $ref: '#/components/schemas/SimpleProductDiscountUnit'
        sku:
          $ref: '#/components/schemas/SimpleSkuDiscountUnit'
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
      required:
        - type
        - unit_type
    DiscountUnitMultiple:
      type: object
      title: Unit Multiple
      properties:
        type:
          type: string
          default: UNIT
          enum:
            - UNIT
          description: Discount type.
        effect:
          type: string
          default: ADD_MANY_ITEMS
          enum:
            - ADD_MANY_ITEMS
          description: Defines how the discount is applied to the customer's order.
        units:
          type: array
          items:
            $ref: '#/components/schemas/DiscountUnitMultipleOneUnit'
      required:
        - type
        - units
    DiscountPercent:
      type: object
      title: Percent
      properties:
        type:
          type: string
          default: PERCENT
          enum:
            - PERCENT
          description: Defines the type of the voucher.
        percent_off:
          type: number
          description: The percent discount that the customer will receive.
        percent_off_formula:
          type: string
          description: Formula used to dynamically calculate the discount.
        amount_limit:
          type: number
          description: >-
            Upper limit allowed to be applied as a discount. Value is multiplied
            by 100 to precisely represent 2 decimal places. For example, a $6
            maximum discount is written as 600.
        aggregated_amount_limit:
          type: integer
          description: Maximum discount amount per order.
        effect:
          description: Defines how the discount is applied to the customer's order.
          allOf:
            - $ref: '#/components/schemas/DiscountPercentVouchersEffectTypes'
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
      required:
        - type
        - percent_off
    DiscountFixed:
      title: Fixed
      type: object
      properties:
        type:
          type: string
          default: FIXED
          enum:
            - FIXED
          description: Defines the type of the voucher.
        fixed_amount:
          type: number
          description: >-
            Sets a fixed value for an order total or the item price. The value
            is multiplied by 100 to precisely represent 2 decimal places. For
            example, a $10 discount is written as 1000. If the fixed amount is
            calculated by the formula, i.e. the `fixed_amount_formula` parameter
            is present in the fixed amount definition, this value becomes the
            **fallback value**. As a result, if the formula cannot be calculated
            due to missing metadata, for example, this value will be used as the
            fixed value.
        fixed_amount_formula:
          type: string
          description: Formula used to dynamically calculate the discount.
        effect:
          description: Defines how the discount is applied to the customer's order.
          allOf:
            - $ref: '#/components/schemas/DiscountFixedVouchersEffectTypes'
        is_dynamic:
          type: boolean
          description: Flag indicating whether the discount was calculated using a formula.
      required:
        - type
        - fixed_amount
    DiscountAmountVouchersEffectTypes:
      title: Discount Amount Vouchers Effect Types
      enum:
        - APPLY_TO_ORDER
        - APPLY_TO_ITEMS
        - APPLY_TO_ITEMS_PROPORTIONALLY
        - APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY
        - APPLY_TO_ITEMS_BY_QUANTITY
      type: string
    DiscountUnitVouchersEffectTypes:
      title: Discount Unit Vouchers Effect Types
      enum:
        - ADD_MISSING_ITEMS
        - ADD_NEW_ITEMS
        - ADD_MANY_ITEMS
        - ADD_SAME_ITEMS
      type: string
    SimpleProductDiscountUnit:
      type: object
      title: Simple Product Discount Unit
      properties:
        id:
          type: string
          description: Unique product ID, assigned by Voucherify.
        source_id:
          type: string
          description: Product's source ID.
        name:
          type: string
          description: Product name.
      required:
        - id
        - name
    SimpleSkuDiscountUnit:
      type: object
      title: Simple Sku Discount Unit
      properties:
        id:
          type: string
          description: Unique SKU ID, assigned by Voucherify.
        source_id:
          type: string
          description: Product variant's source ID.
        name:
          type: string
          description: Sku name
      required:
        - id
        - name
    DiscountUnitMultipleOneUnit:
      type: object
      title: One Unit
      properties:
        unit_off:
          type: number
          description: Number of units to be granted a full value discount.
        unit_off_formula:
          type: string
          description: Formula used to dynamically calculate the number of units.
        effect:
          type: string
          enum:
            - ADD_NEW_ITEMS
            - ADD_MISSING_ITEMS
          description: |+
            Defines how the unit is added to the customer's order.

        unit_type:
          type: string
          description: >-
            The product deemed as free, chosen from product inventory (e.g.
            time, items).
        product:
          description: Contains information about the product.
          allOf:
            - $ref: '#/components/schemas/SimpleProductDiscountUnit'
        sku:
          description: Contains information about the sku.
          allOf:
            - $ref: '#/components/schemas/SimpleSkuDiscountUnit'
      required:
        - effect
        - unit_type
    DiscountPercentVouchersEffectTypes:
      title: Discount Percent Vouchers Effect Types
      enum:
        - APPLY_TO_ORDER
        - APPLY_TO_ITEMS
      type: string
    DiscountFixedVouchersEffectTypes:
      title: Discount Fixed Vouchers Effect Types
      enum:
        - APPLY_TO_ORDER
        - APPLY_TO_ITEMS
      type: string
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````