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

# Overview

## Voucher

This is an object representing a voucher with categories and validation rules assignments.

All of:

1. [Voucher Base](#voucher-base)

2. | Attributes                     | Description                                                                  |
   | ------------------------------ | ---------------------------------------------------------------------------- |
   | categories`array`              | Contains details about the category.Array of [Category](#category)           |
   | validation\_rules\_assignments | See: [Validation Rules Assignments List](#validation-rules-assignments-list) |

## Voucher Base

| Attributes               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id`string`               | Assigned by the Voucherify API, identifies the voucher.**Example:**v\_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| code`string`             | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.**Example:**WVPblOYX                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| campaign`string`         | A unique campaign name, identifies the voucher's parent campaign.**Example:**Gift Card Campaign                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| campaign\_id`string`     | Assigned by the Voucherify API, identifies the voucher's parent campaign.**Example:**camp\_FNYR4jhqZBM9xTptxDGgeNBV                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| category`string`         | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| category\_id`string`     | Unique category ID assigned by Voucherify.**Example:**cat\_0bb343dee3cdb5ec0c                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| type`string`             | Defines the type of the voucher.Available values: `GIFT_VOUCHER`, `DISCOUNT_VOUCHER`, `LOYALTY_CARD`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| discount                 | See: [Discount](#discount)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| gift`object`             | Object representing gift parameters. Child attributes are present only if `type` is `GIFT_VOUCHER`. Defaults to `null`.Attributes	Descriptionamountinteger&#xA;&#xA;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.&#xA;&#xA;Example:&#xA;&#xA;10000&#xA;&#xA;&#xA;subtracted\_amountinteger	&#xA;&#xA;Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for $100.00.&#xA;&#xA;&#xA;balanceinteger	&#xA;&#xA;Available funds. The value is multiplied by 100 to represent 2 decimal places. For example 10000 cents for \$100.00.&#xA;&#xA;Example:&#xA;&#xA;500&#xA;&#xA;&#xA;effectstring	&#xA;&#xA;Defines how the credits are applied to the customer's order.&#xA;&#xA;Available values: APPLY\_TO\_ORDER, APPLY\_TO\_ITEMS                                                                                                                                                                                                                                                                                                  |
| loyalty\_card`object`    | Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.Attributes	Descriptionpointsinteger&#xA;&#xA;Total number of points added to the loyalty card over its lifespan.&#xA;&#xA;Example:&#xA;&#xA;7000&#xA;&#xA;&#xA;balanceinteger	&#xA;&#xA;Points available for reward redemption. This is calculated as follows: balance = points - expired\_points - subtracted\_points - redemption.redeemed\_points.&#xA;&#xA;Example:&#xA;&#xA;6970&#xA;&#xA;&#xA;next\_expiration\_datestring	&#xA;&#xA;The next closest date when the next set of points are due to expire.&#xA;&#xA;Example:&#xA;&#xA;2023-05-30&#xA;&#xA;&#xA;next\_expiration\_pointsinteger	&#xA;&#xA;The amount of points that are set to expire next.&#xA;&#xA;&#xA;pending\_pointsinteger	&#xA;&#xA;Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually.&#xA;&#xA;&#xA;expired\_pointsinteger	&#xA;&#xA;Shows the total number of expired points over the lifetime of the loyalty card.&#xA;&#xA;&#xA;subtracted\_pointsinteger	&#xA;&#xA;Shows the total number of subtracted points over the lifetime of the loyalty card. |
| start\_date`string`      | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date.**Example:**2021-12-01T00:00:00.000Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| expiration\_date`string` | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date.**Example:**2021-12-31T00:00:00.000Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| validity\_timeframe      | See: [Validity Timeframe](#validity-timeframe)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| validity\_day\_of\_week  | See: [Validity Day Of Week](#validity-day-of-week)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| validity\_hours          | See: [Validity Hours](#validity-hours)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| active`boolean`, `null`  | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`.- `true` indicates an *active* voucher                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

* `false` indicates an *inactive* voucher                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  \| additional\_info`string`            | An optional field to keep any extra textual information about the code such as a code description and details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  \| metadata`object`                    | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  \| assets                              | See: [Voucher Assets](#voucher-assets)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
  \| is\_referral\_code`boolean`, `null` | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
  \| created\_at`string`                 | Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.**Example:**2021-12-22T10:13:06.487Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  \| updated\_at`string`                 | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.**Example:**2021-12-22T10:14:45.316Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  \| holder\_id`string`                  | Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify.**Example:**cust\_eWgXlBBiY6THFRJwX45Iakv4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  \| referrer\_id`string`                | Unique identifier of the referring person.**Example:**cust\_Vzck5i8U3OhcEUFY6MKhN9Rv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
  \| object`string`                      | The type of the object represented by JSON. Default is `voucher`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  \| publish`object`                     | Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.Attributes	Descriptionobjectstring

  The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

  countinteger&#x9;

  Publication events counter.

  Example:

  0

  urlstring&#x9;

  The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/\{voucher\_code}/publications

  Example:

  /v1/vouchers/WVPblOYX/publications?page=1\&limit=10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
  \| redemption`object`                  | Stores a summary of redemptions that have been applied to the voucher.Attributes	Descriptionquantityinteger

  How many times a voucher can be redeemed. A null value means unlimited.

  redeemed\_quantityinteger&#x9;

  How many times a voucher has already been redeemed.

  Example:

  1

  redeemed\_pointsinteger&#x9;

  Total loyalty points redeemed.

  Example:

  100000

  objectstring&#x9;

  The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute.

  urlstring&#x9;

  The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/\{voucher\_code}/redemptions

  Example:

  /v1/vouchers/WVPblOYX/redemptions?page=1\&limit=10                                                                                                                                                                                                                                                                                                                                                                |

## Category

| Attributes          | Description                                                                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id`string`          | Unique category ID assigned by Voucherify.                                                                                                             |
| name`string`        | Category name.                                                                                                                                         |
| hierarchy`integer`  | Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.                                       |
| object`string`      | The type of the object represented by the JSON. This object stores information about the category.Available values: `category`                         |
| created\_at`string` | Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.**Example:**2022-07-14T10:45:13.156Z |
| updated\_at`string` | Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.**Example:**2022-08-16T10:52:08.094Z |

## Validation Rules Assignments List

| Attributes        | Description                                                                                                                            |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| object`string`    | The type of the object represented by JSON. This object stores information about validation rules assignments.Available values: `list` |
| data\_ref`string` | Identifies the name of the attribute that contains the array of validation rules assignments.Available values: `data`                  |
| data`array`       | Contains array of validation rules assignments.Array of [Business Validation Rule Assignment](#business-validation-rule-assignment)    |
| total`integer`    | Total number of validation rules assignments.                                                                                          |

## Discount

Contains information about discount.

One of:

[Amount](#amount), [Unit](#unit), [Unit Multiple](#unit-multiple), [Percent](#percent), [Fixed](#fixed)

## Validity Timeframe

| Attributes       | Description                                                                                                                                                                                              |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| duration`string` | 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`string` | 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 |

## Validity Day Of Week

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

## Validity Hours

| Attributes   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| daily`array` | Defines the reccuring period(s) when the resource is active. The periods should not overlap.Array of:Attributes	Descriptionstart\_timestring&#xA;&#xA;Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.&#xA;&#xA;Example:&#xA;&#xA;12:00&#xA;&#xA;&#xA;days\_of\_weekarray	&#xA;&#xA;Integer array corresponding to the particular days of the week in which the resource is valid.&#xA;&#xA;0 Sunday&#xA;1 Monday&#xA;2 Tuesday&#xA;3 Wednesday&#xA;4 Thursday&#xA;5 Friday&#xA;6 Saturday&#xA;&#xA;expiration\_timestring	&#xA;&#xA;Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.&#xA;&#xA;Example:&#xA;&#xA;14:00 |

## Voucher Assets

| Attributes      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| qr`object`      | Stores Quick Response (QR) representation of encrypted code.Attributes	Descriptionidstring&#xA;&#xA;Encrypted voucher code ID.&#xA;&#xA;Example:&#xA;&#xA;U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==&#xA;&#xA;&#xA;urlstring	&#xA;&#xA;URL to QR code&#xA;&#xA;Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.&#xA;&#xA;size: integer value from 1 to 100&#xA;format: string, either png (default) or svg&#xA;Example:&#xA;&#xA;[https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D](https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D)   |
| barcode`object` | Stores barcode representation of encrypted code.Attributes	Descriptionidstring&#xA;&#xA;Encrypted voucher code ID.&#xA;&#xA;Example:&#xA;&#xA;U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==&#xA;&#xA;&#xA;urlstring	&#xA;&#xA;URL to barcode&#xA;&#xA;Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.&#xA;&#xA;size: integer value from 1 to 100&#xA;format: string, either png (default) or svg&#xA;Example:&#xA;&#xA;[https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D](https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D) |

## Business Validation Rule Assignment

| Attributes                        | Description                                                                                                                                          |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| id`string`                        | The unique identifier for a assignment                                                                                                               |
| rule\_id`string`                  | The unique identifier for a rule                                                                                                                     |
| related\_object\_id`string`       | The unique identifier for a related object                                                                                                           |
| related\_object\_type`string`     | The type of related object                                                                                                                           |
| created\_at`string`               | Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.**Example:**2022-03-09T11:19:04.819Z |
| updated\_at`string`               | Timestamp representing the date and time when the object was last updated in ISO 8601 format.**Example:**2022-03-09T11:19:04.819Z                    |
| object`string`                    | The type of the object represented by JSON.Available values: `validation_rules_assignment`                                                           |
| validation\_status`string`        | The validation status of the assignmentAvailable values: `VALID`, `PARTIALLY_VALID`, `INVALID`                                                       |
| validation\_omitted\_rules`array` | The list of omitted rules                                                                                                                            |

## Amount

| Attributes                         | Description                                                                                                                                                    |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type`string`                       | Defines the type of the voucher.Available values: `AMOUNT`                                                                                                     |
| amount\_off`number`                | 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`string`       | Formula used to dynamically calculate the discount.                                                                                                            |
| aggregated\_amount\_limit`integer` | Maximum discount amount per order.                                                                                                                             |
| effect                             | Defines how the discount is applied to the customer's order.[Discount Amount Vouchers Effect Types](#discount-amount-vouchers-effect-types)                    |
| is\_dynamic`boolean`               | Flag indicating whether the discount was calculated using a formula.                                                                                           |

## Unit

| Attributes                 | Description                                                                                                                       |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| type`string`               | Discount type.Available values: `UNIT`                                                                                            |
| unit\_off`integer`         | Number of units to be granted a full value discount.                                                                              |
| unit\_off\_formula`string` | Formula used to dynamically calculate the number of units.                                                                        |
| effect                     | Defines how the unit is added to the customer's order.[Discount Unit Vouchers Effect Types](#discount-unit-vouchers-effect-types) |
| unit\_type`string`         | The product deemed as free, chosen from product inventory (e.g. time, items).                                                     |
| product                    | Contains information about the product.[Simple Product Discount Unit](#simple-product-discount-unit)                              |
| sku                        | See: [Simple Sku Discount Unit](#simple-sku-discount-unit)                                                                        |
| is\_dynamic`boolean`       | Flag indicating whether the discount was calculated using a formula.                                                              |

## Unit Multiple

| Attributes     | Description                                                                                    |
| -------------- | ---------------------------------------------------------------------------------------------- |
| type`string`   | Discount type.Available values: `UNIT`                                                         |
| effect`string` | Defines how the discount is applied to the customer's order.Available values: `ADD_MANY_ITEMS` |
| units`array`   | Array of [One Unit](#one-unit)                                                                 |

## Percent

| Attributes                         | Description                                                                                                                                                                 |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type`string`                       | Defines the type of the voucher.Available values: `PERCENT`                                                                                                                 |
| percent\_off`number`               | The percent discount that the customer will receive.                                                                                                                        |
| percent\_off\_formula`string`      | Formula used to dynamically calculate the discount.                                                                                                                         |
| amount\_limit`number`              | 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`integer` | Maximum discount amount per order.                                                                                                                                          |
| effect                             | Defines how the discount is applied to the customer's order.[Discount Percent Vouchers Effect Types](#discount-percent-vouchers-effect-types)                               |
| is\_dynamic`boolean`               | Flag indicating whether the discount was calculated using a formula.                                                                                                        |

## Fixed

| Attributes                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| type`string`                   | Defines the type of the voucher.Available values: `FIXED`                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| fixed\_amount`number`          | 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`string` | Formula used to dynamically calculate the discount.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| effect                         | Defines how the discount is applied to the customer's order.[Discount Fixed Vouchers Effect Types](#discount-fixed-vouchers-effect-types)                                                                                                                                                                                                                                                                                                                                                              |
| is\_dynamic`boolean`           | Flag indicating whether the discount was calculated using a formula.                                                                                                                                                                                                                                                                                                                                                                                                                                   |

## Discount Amount Vouchers Effect Types

Available values: `APPLY_TO_ORDER`, `APPLY_TO_ITEMS`, `APPLY_TO_ITEMS_PROPORTIONALLY`, `APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY`, `APPLY_TO_ITEMS_BY_QUANTITY`

## Discount Unit Vouchers Effect Types

Available values: `ADD_MISSING_ITEMS`, `ADD_NEW_ITEMS`, `ADD_MANY_ITEMS`

## Simple Product Discount Unit

| Attributes         | Description                                |
| ------------------ | ------------------------------------------ |
| id`string`         | Unique product ID, assigned by Voucherify. |
| source\_id`string` | Product's source ID.                       |
| name`string`       | Product name.                              |

## Simple Sku Discount Unit

| Attributes         | Description                            |
| ------------------ | -------------------------------------- |
| id`string`         | Unique SKU ID, assigned by Voucherify. |
| source\_id`string` | Product variant's source ID.           |
| name`string`       | Sku name                               |

## One Unit

| Attributes                 | Description                                                                                                  |
| -------------------------- | ------------------------------------------------------------------------------------------------------------ |
| unit\_off`number`          | Number of units to be granted a full value discount.                                                         |
| unit\_off\_formula`string` | Formula used to dynamically calculate the number of units.                                                   |
| effect`string`             | Defines how the unit is added to the customer's order.Available values: `ADD_NEW_ITEMS`, `ADD_MISSING_ITEMS` |
| unit\_type`string`         | The product deemed as free, chosen from product inventory (e.g. time, items).                                |
| product                    | Contains information about the product.[Simple Product Discount Unit](#simple-product-discount-unit)         |
| sku                        | Contains information about the sku.[Simple Sku Discount Unit](#simple-sku-discount-unit)                     |

## Discount Percent Vouchers Effect Types

Available values: `APPLY_TO_ORDER`, `APPLY_TO_ITEMS`

## Discount Fixed Vouchers Effect Types

Available values: `APPLY_TO_ORDER`, `APPLY_TO_ITEMS`
