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

## Campaign

All of:

1. [Campaign Base](#campaign-base)

2. ### Campaign Additional Data

   | Attributes                     | Description                                                                  |
   | ------------------------------ | ---------------------------------------------------------------------------- |
   | promotion                      | See: [Promotion Tiers](#promotion-tiers)                                     |
   | validation\_rules\_assignments | See: [Validation Rules Assignments List](#validation-rules-assignments-list) |

## Campaign Base

| Attributes             | Description                                                                                                                                                                                                                                     |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id`string`             | Unique campaign ID, assigned by Voucherify.**Example:**camp\_f7fBbQxUuTN7dI7tGOo5XMDA                                                                                                                                                           |
| name`string`           | Campaign name.                                                                                                                                                                                                                                  |
| description`string`    | An optional field to keep any extra textual information about the campaign such as a campaign description and details.                                                                                                                          |
| campaign\_type`string` | Type of campaign.Available values: `LOYALTY_PROGRAM`, `GIFT_VOUCHERS`, `DISCOUNT_COUPONS`, `PROMOTION`, `REFERRAL_PROGRAM`                                                                                                                      |
| type`string`           | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) voucherss.- `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria |

* `STATIC`: vouchers need to be manually published
* `STANDALONE`: campaign for single vouchersAvailable values: `AUTO_UPDATE`, `STATIC`, `STANDALONE` |
  \| voucher                                       | See: [Campaign Voucher](#campaign-voucher)                                                                                                                                                                                                                                                                                                                                                             |
  \| auto\_join`boolean`                           | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.                                                                                                                                                                                                                                                                                             |
  \| join\_once`boolean`                           | If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns and it cannot be changed in them.                                                                                                                                  |
  \| use\_voucher\_metadata\_schema`boolean`       | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.                                                                                                                                                                                                                                                                                  |
  \| 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)                                                                                                                                                                                                                                                                                                                                                                 |
  \| activity\_duration\_after\_publishing`string` | Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days.                                                                                                                                                                                             |
  \| vouchers\_count`integer`                      | Total number of unique vouchers in campaign.                                                                                                                                                                                                                                                                                                                                                           |
  \| start\_date`string`                           | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.**Example:**2022-09-20T00:00:00.000Z                                                                                                                                                                                                                               |
  \| expiration\_date`string`                      | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.**Example:**2022-09-30T00:00:00.000Z                                                                                                                                                                                                                                            |
  \| active`boolean`                               | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`.- `true` indicates an *active* campaign
* `false` indicates an *inactive* campaign                                                                                                                                                     |
  \| metadata`object`                              | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.                                                                                                                                                           |
  \| created\_at`string`                           | Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.**Example:**2021-12-01T08:00:50.038Z                                                                                                                                                                                                                                            |
  \| updated\_at`string`                           | Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.**Example:**2022-09-20T09:18:19.623Z                                                                                                                                                                                                                                                               |
  \| category`string`                              | Unique category name.                                                                                                                                                                                                                                                                                                                                                                                  |
  \| creation\_status`string`                      | Indicates the status of the campaign creation.Available values: `DONE`, `IN_PROGRESS`, `FAILED`, `DRAFT`, `MODIFYING`                                                                                                                                                                                                                                                                                  |
  \| vouchers\_generation\_status`string`          | Indicates the status of the campaign's voucher generation.Available values: `DONE`, `IN_PROGRESS`, `FAILED`, `DRAFT`, `MODIFYING`                                                                                                                                                                                                                                                                      |
  \| readonly`boolean`                             | Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles. It is also not returned for restricted users who use the [GET Campaign summary](/reference/campaign-summary) endpoint.                                                                |
  \| protected`boolean`                            | Indicates whether the resource can be deleted.                                                                                                                                                                                                                                                                                                                                                         |
  \| category\_id`string`, `null`                  | Unique category ID that this campaign belongs to.**Example:**cat\_0b688929a2476386a7                                                                                                                                                                                                                                                                                                              |
  \| categories`array`                             | Contains details about the campaign category. For the GET [List campaigns](/reference/list-campaigns) endpoint, this is returned only if the `expand=category` query parameter is passed in the request. Otherwise, it is returned as an empty array. For GET [Campaign summary](/reference/get-campaign-summary) endpoint, it is always returned as an empty array.Array of [Category](#category)     |
  \| object`string`                                | The type of the object represented by JSON. This object stores information about the campaign.                                                                                                                                                                                                                                                                                                         |
  \| referral\_program                             | See: [Referral Program](#referral-program)                                                                                                                                                                                                                                                                                                                                                             |
  \| loyalty\_tiers\_expiration                    | See: [Loyalty Tiers Expiration](#loyalty-tiers-expiration)                                                                                                                                                                                                                                                                                                                                             |
  \| access\_settings\_assignments                 | See: [Access Settings Campaign Assignments List](#access-settings-campaign-assignments-list)                                                                                                                                                                                                                                                                                                           |

## Promotion Tiers

| Attributes         | Description                                                                                                                                                                                                                                       |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| object`string`     | The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary.                                                                                                                                 |
| data\_ref`string`  | Identifies the name of the attribute that contains the array of promotion tier objects.                                                                                                                                                           |
| tiers`array`       | Contains array of promotion tier objects.Array of [Promotion Tier](#promotion-tier)                                                                                                                                                               |
| total`integer`     | Total number of promotion tiers.                                                                                                                                                                                                                  |
| has\_more`boolean` | As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results. |

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

## Campaign Voucher

| Attributes                  | Description                                                                                                                                                            |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type`string`                | Type of voucher.                                                                                                                                                       |
| discount                    | Defines the voucher discount type and details.[Discount](#discount)                                                                                                    |
| gift                        | Defines the voucher gift details.[Gift](#gift)                                                                                                                         |
| loyalty\_card               | Defines the voucher loyalty card details.[Campaign Loyalty Card](#campaign-loyalty-card)                                                                               |
| redemption`object`          | Defines the redemption limits on vouchers.Attributes	Descriptionquantityinteger, null&#xA;&#xA;How many times a voucher can be redeemed. A null value means unlimited. |
| code\_config                | [Code Config](#code-config)                                                                                                                                            |
| is\_referral\_code`boolean` | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.                                                                  |
| start\_date`string`         | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.**Example:**2022-09-20T00:00:00.000Z    |
| expiration\_date`string`    | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.**Example:**2022-09-30T00:00:00.000Z                 |
| validity\_timeframe         | 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)                                                                                                                                 |

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

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

## Referral Program

| Attributes                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| conversion\_event\_type`string` | Define how a referral is triggered.Available values: `redemption`, `custom_event`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| custom\_event`object`           | Contains details about the custom event.Attributes	Descriptionidstring&#xA;&#xA;Unique custom event ID.&#xA;&#xA;Example:&#xA;&#xA;ms\_Ll9enAm2BCN0M1s4VxWobLFM&#xA;&#xA;&#xA;namestring	&#xA;&#xA;Custom event name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| referee\_reward`object`         | Defines the referee reward.Attributes	Descriptionrelated\_object\_parentobject&#xA;&#xA;Details of the resource from which the reward originates.&#xA;&#xA;Attributes	Descriptionidstring	&#xA;&#xA;Unique ID of the reward source.&#xA;&#xA;Example:&#xA;&#xA;camp\_kdxp3vf1clQ9CFs1jpqv3tZe&#xA;&#xA;&#xA;namestring	&#xA;&#xA;Name of the reward source.&#xA;&#xA;&#xA;objectstring	&#xA;&#xA;Type of resource represented by the source of the reward.&#xA;&#xA;Available values: CAMPAIGN&#xA;&#xA;typestring	&#xA;&#xA;Type of reward.&#xA;&#xA;Available values: LOYALTY\_CARD, GIFT\_VOUCHER&#xA;amountstring	&#xA;&#xA;Define the number of points to add to a loyalty card or credits to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, \$100 amount is written as 10000. |

## Loyalty Tiers Expiration

| Attributes                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| qualification\_type`string`   | Tier qualification.`BALANCE`: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier.`POINTS_IN_PERIOD`: A customer qualifies for the tier only if the sum of the accumulated points in a **defined time interval** reaches the tier threshold.Available values: `BALANCE`, `POINTS_IN_PERIOD`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| qualification\_period`string` | Customers can qualify for the tier if they collected enough points in a given time period. So, in addition to the customer having to reach a points range, they also need to have collected the points within a set time period.Period	DefinitionCalendar Month	Points collected in one calendar monthJanuary, February, March, etc.&#xA;Calendar Quarter	Points collected in the quarter- January - March- April - June- July - September- October - December&#xA;Calendar Half-year	Points collected in the half-year- January - June- July - December&#xA;Calendar Year	Points collected in one calendar yearJanuary - DecemberAvailable values: `MONTH`, `QUARTER`, `HALF_YEAR`, `YEAR`                                                                                                                                                                                                                                                                                                                                                                                  |
| start\_date`object`           | Defines the conditions for the start date of the tier.Attributes	Descriptiontypestring&#xA;&#xA;What triggers the tier to be valid for a customer.IMMEDIATE: After reaching the minimum required points.NEXT\_PERIOD: When the next qualification period starts.&#xA;&#xA;Available values: IMMEDIATE, NEXT\_PERIOD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| expiration\_date`object`      | Defines the conditions for the expiration date of a tier.Attributes	Descriptiontypestring&#xA;&#xA;What triggers the tier to expire for a customer.END\_OF\_PERIOD: Expire tier at the end of the period.END\_OF\_NEXT\_PERIOD: Expire tier at the end of the next period.BALANCE\_DROP: Tier expires when the points balance drops below the required range of the tier.CUSTOM: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier.&#xA;&#xA;Available values: END\_OF\_PERIOD, END\_OF\_NEXT\_PERIOD, BALANCE\_DROP, CUSTOM&#xA;extendstring	&#xA;&#xA;Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of P3M will be valid for an additional duration of 3 months and a tier with a duration of P1D will be valid for an additional duration of 1 day.&#xA;&#xA;&#xA;rounding	&#xA;&#xA;Defines the rounding mechanism for tier expiration. |

## Access Settings Campaign Assignments List

| Attributes        | Description                                                                                                                                                          |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| object`string`    | The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and storesAvailable values: `list` |
| data\_ref`string` | Identifies the name of the attribute that contains the array of campaign assignments.Available values: `data`                                                        |
| data`array`       | Contains an array of campaign assignments.Array of [Areas and Stores Campain Assignment](#areas-and-stores-campain-assignment)                                       |
| total`integer`    | Total number of areas and stores to which the campaign is assigned.                                                                                                  |

## Promotion Tier

| Attributes            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id`string`            | Unique promotion tier ID.**Example:**promo\_63fYCt81Aw0h7lzyRkrGZh9p                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| created\_at`string`   | Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.**Example:**2021-12-15T11:34:01.333Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| updated\_at`string`   | Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.**Example:**2022-02-09T09:20:05.603Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| name`string`          | Name of the promotion tier.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| banner`string`        | Text to be displayed to your customers on your website.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| action`object`        | Contains details about the discount applied by the promotion tier.Attributes	Descriptiondiscount	See: Discount                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| metadata`object`      | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| hierarchy`integer`    | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| promotion\_id`string` | Promotion unique ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| campaign`object`      | Contains details about promotion tier's parent campaign.Attributes	Descriptionidstring&#xA;&#xA;Unique campaign ID.&#xA;&#xA;&#xA;start\_datestring	&#xA;&#xA;Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.&#xA;&#xA;Example:&#xA;&#xA;2022-09-22T00:00:00.000Z&#xA;&#xA;&#xA;expiration\_datestring	&#xA;&#xA;Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.&#xA;&#xA;Example:&#xA;&#xA;2022-09-30T00:00:00.000Z&#xA;&#xA;&#xA;validity\_timeframe	See: Validity Timeframe&#xA;validity\_day\_of\_week	See: Validity Day Of Week&#xA;validity\_hours	See: Validity Hours&#xA;activeboolean	&#xA;&#xA;A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the start\_date and expiration\_date using the Disable Campaign endpoint.&#xA;&#xA;true indicates an active campaign&#xA;false indicates an inactive campaign&#xA;&#xA;category\_idstring	&#xA;&#xA;Unique category ID that this campaign belongs to.&#xA;&#xA;Example:&#xA;&#xA;cat\_0b688929a2476386a6&#xA;&#xA;&#xA;objectstring	&#xA;&#xA;The type of the object represented by the campaign object. This object stores information about the campaign. |
| campaign\_id`string`  | Promotion tier's parent campaign's unique ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| active`boolean`       | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`.- `true` indicates an *active* promotion tier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

* `false` indicates an *inactive* promotion tier                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
  \| start\_date`string`           | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date.**Example:**2022-09-23T00:00:00.000Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
  \| expiration\_date`string`      | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date.**Example:**2022-09-26T00: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)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
  \| summary`object`               | Contains statistics about promotion tier redemptions and orders.Attributes	Descriptionredemptionsobject

  Contains statistics about promotion tier redemptions.

  Attributes	Descriptiontotal\_redeemedinteger&#x9;

  Number of times the promotion tier was redeemed.

  ordersobject&#x9;

  Contains statistics about orders related to the promotion tier.

  Attributes	Descriptiontotal\_amountinteger&#x9;

  Sum of order totals.

  total\_discount\_amountinteger&#x9;

  Sum of total discount applied using the promotion tier.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
  \| object`string`                | The type of the object represented by JSON. This object stores information about the promotion tier.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
  \| validation\_rule\_assignments | See: [Validation Rule Assignments List](#validation-rule-assignments-list)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
  \| category\_id`string`          | Promotion tier category ID.**Example:**cat\_0c9da30e7116ba6bba                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  \| categories`array`             | Array of [Category](#category)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

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

## Discount

Contains information about discount.

One of:

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

## Gift

| Attributes                  | Description                                                                                                                                                                                        |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount`number`              | 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`integer` | Total amount of subtracted credits over the gift card lifetime.                                                                                                                                    |
| balance`number`             | 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`string`              | Defines how the credits are applied to the customer's order.Available values: `APPLY_TO_ORDER`, `APPLY_TO_ITEMS`                                                                                   |

## Campaign Loyalty Card

| Attributes                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| points`integer`           | The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| expiration\_rules`object` | Defines the loyalty point expiration rule. This expiration rule applies when there are no `expiration_rules` defined for an earning rule.Attributes	Descriptionperiod\_typestring&#xA;&#xA;Type of period. Can be set for MONTH or FIXED\_DAY\_OF\_YEAR. MONTH requires the period\_value field. FIXED\_DAY\_OF\_YEAR requires the fixed\_month and fixed\_day fields.&#xA;&#xA;Available values: FIXED\_DAY\_OF\_YEAR, MONTH&#xA;period\_valueinteger	&#xA;&#xA;Value of the period. Required for the period\_type: MONTH.&#xA;&#xA;&#xA;rounding\_typestring	&#xA;&#xA;Type of rounding of the expiration period. Optional for the period\_type: MONTH.&#xA;&#xA;Available values: END\_OF\_MONTH, END\_OF\_QUARTER, END\_OF\_HALF\_YEAR, END\_OF\_YEAR, PARTICULAR\_MONTH&#xA;rounding\_valueinteger	&#xA;&#xA;Value of rounding of the expiration period. Required for the rounding\_type.&#xA;&#xA;&#xA;fixed\_monthinteger	&#xA;&#xA;Determines the month when the points expire; 1 is January, 2 is February, and so on. Required for the period\_type: FIXED\_DAY\_OF\_YEAR.&#xA;&#xA;&#xA;fixed\_dayinteger	&#xA;&#xA;Determines the day of the month when the points expire. Required for the period\_type: FIXED\_DAY\_OF\_YEAR. |

## Code Config

| Attributes      | Description                                                                                                                      |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| length`number`  | Number of characters in a generated code (excluding prefix and postfix).                                                         |
| charset`string` | Characters that can appear in the code.Examples:- Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` |

* Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`
* Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz`
* Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ`
* Numbers: `0123456789`
* Custom: a custom character set |
  \| prefix`string`          | A text appended before the code.                                                                                                                                                                                                                                                                                                                                         |
  \| postfix`string`         | A text appended after the code.                                                                                                                                                                                                                                                                                                                                          |
  \| pattern`string`         | A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`.                                                                                                                                                                                                                                                                        |
  \| initial\_count`integer` | Internal value, does not change anything if provided.                                                                                                                                                                                                                                                                                                                    |

## Areas and Stores Campain Assignment

| Attributes              | Description                                                                                                                                                                    |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id`string`              | Unique identifier of the campaign assignment.**Example:**arsca\_0ef5ee192117ae2416                                                                                             |
| area\_id`string`        | Unique identifier of the area to which the campaign is assigned.**Example:**ar\_0ea6cd7b781b8f857f                                                                             |
| all\_stores`boolean`    | Determines if the campaign is assigned to all of the stores in the area, i.e. if an area ID is passed in the `access_settings.assign.area_all_stores_ids` in the request.      |
| area\_store\_id`string` | Unique identifier of the store to which the campaign is assigned.**Example:**ars\_0ec347e2016bed85f4                                                                           |
| created\_at`string`     | Date and time when the assignment was made. The value is shown in the ISO 8601 format.**Example:**2024-06-25T19:04:16.260Z                                                     |
| object`string`          | The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.Available values: `area_store_campaign_assignment` |

## Validation Rule Assignments List

| Attributes        | Description                                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| object`string`    | The type of the object represented by JSON. This object stores information about validation rule assignments.                         |
| data\_ref`string` | Identifies the name of the JSON property that contains the array of validation rule assignments.                                      |
| data`array`       | A dictionary that contains an array of validation rule assignments.Array of [Validation Rule Assignment](#validation-rule-assignment) |
| total`integer`    | Total number of validation rule assignments.                                                                                          |

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

## Validation Rule Assignment

| Attributes                    | Description                                                                                                                                                                   |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id`string`                    | Validation rule assignment ID.**Example:**asgm\_74F7QZoYbUoljwQO                                                                                                              |
| rule\_id`string`              | Validation rule ID.**Example:**val\_4j7DCRm2IS59                                                                                                                              |
| related\_object\_id`string`   | The resource ID to which the validation rule was assigned.**Example:**v\_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT                                                                     |
| related\_object\_type`string` | The type of resource to which the validation rule was assigned.Available values: `voucher`, `campaign`, `earning_rule`, `reward_assignment`, `promotion_tier`, `distribution` |
| created\_at`string`           | Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.**Example:**2022-02-17T08:18:15.085Z      |
| object`string`                | The type of the object represented by the ID.Available values: `validation_rules_assignment`                                                                                  |

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