---
title: "Get Campaign Summary"
method: GET
path: "/v1/campaigns/{campaignId}/summary"
tags: ["Campaigns"]
---

# Get Campaign Summary

`GET /v1/campaigns/{campaignId}/summary`

Returns data for campaign analytics, covering validations, redemptions, publications, and other details specific to a given campaign type.

Use `start_date` and `end_date` to narrow down the data to specific periods.

>🚧 Campaigns created before 17 June 2025
>
>This endpoint returns analytics data for campaigns that were created after 17 June 2025. Older campaigns return empty data.

## Query parameters

- `start_date` string, date
- `end_date` string, date

## Response `200`

Returns campaign analytics data. Returns different data depending on the campaign type.

- union — Response body schema for **GET** `/v1/campaigns/{campaignId}/summary`.
  - object — Contains the basic information about any type of campaign.
    - `object` 'campaign_summary', required — The type of the object, which is `campaign_summary`.
    - `campaign` CampaignBase, required — This is an object representing a campaign.
      - `id` string, required — Unique campaign ID, assigned by Voucherify.
      - `name` string, required — 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` 'LOYALTY_PROGRAM' | 'GIFT_VOUCHERS' | 'DISCOUNT_COUPONS' | 'PROMOTION' | 'REFERRAL_PROGRAM', required — Type of campaign.
      - `type` 'AUTO_UPDATE' | 'STATIC' | 'STANDALONE', required — Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) vouchers. - `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 vouchers
      - `voucher` CampaignVoucher — Schema model for a campaign voucher.
        - `type` string, required — Type of voucher.
        - `discount` union — Contains information about discount.
          - object
            - `type` 'AMOUNT', required — Defines the type of the voucher.
            - `amount_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `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` 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS' | 'ADD_SAME_ITEMS'
            - `unit_type` string, required — The product deemed as free, chosen from product inventory (e.g. time, items).
            - `product` SimpleProductDiscountUnit
              - …
            - `sku` SimpleSkuDiscountUnit
              - …
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `effect` 'ADD_MANY_ITEMS' — Defines how the discount is applied to the customer's order.
            - `units` DiscountUnitMultipleOneUnit[], required
              - …
          - object
            - `type` 'PERCENT', required — Defines the type of the voucher.
            - `percent_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'FIXED', required — Defines the type of the voucher.
            - `fixed_amount` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
        - `gift` Gift — Contains current gift card balance information.
          - `amount` number, required — 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, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' — Defines how the credits are applied to the customer's order.
        - `loyalty_card` CampaignLoyaltyCard — Schema model for a campaign loyalty card.
          - `points` integer, required — 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.
            - `period_type` 'FIXED_DAY_OF_YEAR' | 'MONTH', required — 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.
            - `period_value` integer — Value of the period. Required for the `period_type: MONTH`.
            - `rounding_type` 'END_OF_MONTH' | 'END_OF_QUARTER' | 'END_OF_HALF_YEAR' | 'END_OF_YEAR' | 'PARTICULAR_MONTH' — Type of rounding of the expiration period. Optional for the `period_type: MONTH`.
            - `rounding_value` integer — Value of rounding of the expiration period. Required for the `rounding_type`.
            - `fixed_month` integer — 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`.
            - `fixed_day` integer — Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.
        - `redemption` object, required — Defines the redemption limits on vouchers.
          - `quantity` integer, nullable, required — How many times a voucher can be redeemed. A `null` value means unlimited.
        - `code_config` CodeConfig, required — Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, length, charset, etc).
          - `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.
        - `is_referral_code` boolean, required — Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
        - `start_date` string, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
        - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
        - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
          - `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.
          - `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.
        - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
          - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
            - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
            - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
            - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `auto_join` boolean, required — Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
      - `join_once` boolean, required — 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, required — Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
      - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
        - `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.
        - `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.
      - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
        - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
          - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
          - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
          - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `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, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
      - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
      - `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, date-time, required — Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
      - `updated_at` string, date-time — Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.
      - `category` string — Unique category name.
      - `creation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign creation.
      - `vouchers_generation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign's voucher generation.
      - `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](/api-reference/campaigns/get-campaign-summary) endpoint.
      - `protected` boolean, required — Indicates whether the resource can be deleted.
      - `category_id` string, nullable, required — Unique category ID that this campaign belongs to.
      - `categories` Category[], required — Contains details about the campaign category. For the GET [List campaigns](/api-reference/campaigns/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](/api-reference/campaigns/get-campaign-summary) endpoint, it is always returned as an empty array.
        - `id` string, required — Unique category ID assigned by Voucherify.
        - `name` string, required — Category name.
        - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
        - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
        - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
        - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
      - `object` string, required — The type of the object represented by JSON. This object stores information about the campaign.
      - `referral_program` ReferralProgram — Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.
        - `conversion_event_type` 'redemption' | 'custom_event' — Define how a referral is triggered.
        - `custom_event` object — Contains details about the custom event.
          - `id` string — Unique custom event ID.
          - `name` string — Custom event name.
        - `referee_reward` object — Defines the referee reward.
          - `related_object_parent` object — Details of the resource from which the reward originates.
            - `id` string — Unique ID of the reward source.
            - `name` string — Name of the reward source.
            - `object` 'CAMPAIGN' — Type of resource represented by the source of the reward.
          - `type` 'LOYALTY_CARD' | 'GIFT_VOUCHER' — Type of reward.
          - `amount` integer — 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` LoyaltyTiersExpirationAll — Defines the Loyalty Tiers Expiration.
        - `qualification_type` 'BALANCE' | 'POINTS_IN_PERIOD', required — 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.
        - `qualification_period` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' — 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** | **Definition** | |:---|:---| | **Calendar Month** | Points collected in one calendar month<br />January, February, March, etc. | | **Calendar Quarter** | Points collected in the quarter<br />- January - March<br />- April - June<br />- July - September<br />- October - December | | **Calendar Half-year** | Points collected in the half-year<br />- January - June<br />- July - December | | **Calendar Year** | Points collected in one calendar year<br />January - December |
        - `start_date` object, required — Defines the conditions for the start date of the tier.
          - `type` 'IMMEDIATE' | 'NEXT_PERIOD', required — 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.
        - `expiration_date` object, required — Defines the conditions for the expiration date of a tier.
          - `type` 'END_OF_PERIOD' | 'END_OF_NEXT_PERIOD' | 'BALANCE_DROP' | 'CUSTOM', required — 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.
          - `extend` string, required — 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.
          - `rounding` object — Defines the rounding mechanism for tier expiration.
            - `type` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' | 'CUSTOM' — This mechanism describes a custom rounding for the expiration date.
            - `strategy` 'START' | 'END' — This mechanism describes a rounding strategy for the expiration date.
            - `unit` 'MONTH' — Defines the type of unit of time in which the rounding period is counted.
            - `value` integer — Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter. - `0`: January - `1`: February - `2`: March - `3`: April - `4`: May - `5`: June - `6`: July - `7`: August - `8`: September - `9`: October - `10`: November - `11`: December
      - `access_settings_assignments` AccessSettingsCampaignAssignmentsList — Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](/api-reference/campaigns/list-campaigns), this is returned if the `expand=access_settings_assignments` query parameter is passed in the request. This object is not returned for the [GET Campaign summary endpoint](/api-reference/campaigns/get-campaign-summary). **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
        - `object` 'list', required — The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores
        - `data_ref` 'data', required — Identifies the name of the attribute that contains the array of campaign assignments.
        - `data` AreaStoreCampaignAssignment[], required — Contains an array of campaign assignments.
          - `id` string, required — Unique identifier of the campaign assignment.
          - `area_id` string, required — Unique identifier of the area to which the campaign is assigned.
          - `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.
          - `created_at` string, date-time, required — Date and time when the assignment was made. The value is shown in the ISO 8601 format.
          - `object` 'area_store_campaign_assignment', required — The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.
        - `total` integer, required — Total number of areas and stores to which the campaign is assigned.
    - `redemptions` integer, required — Total number of redemptions, which includes successful and failed redemptions.
    - `redemptions_succeeded` integer, required — Total number of successful redemptions.
    - `redemptions_failed` integer, required — Total number of failed redemptions.
    - `rollbacks` integer, required — Total number of rollbacks, which includes successful and failed rollbacks.
    - `rollbacks_succeeded` integer, required — Total number of successful rollbacks.
    - `rollbacks_failed` integer, required — Total number of failed rollbacks.
    - `validations` integer, required — Total number of validations, which includes successful and failed validations.
    - `validations_succeeded` integer, required — Total number of successful validations.
    - `validations_failed` integer, required — Total number of failed validations.
    - `orders_amount` integer, required — Total amount of orders related to the campaign. This amount is not reduced by `orders_rolledback_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `orders_rolledback_amount` integer, required — Total amount of orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `vouchers_created` integer, required — Total number of vouchers created within the campaign. Includes vouchers generated when the campaign was created, vouchers added manually, or vouchers generated automatically when a new customer joined the campaign.
    - `vouchers_deleted` integer, required — Total number of vouchers deleted within the campaign. Includes vouchers moved to the bin and vouchers deleted permanently. Vouchers moved to the bin and then deleted permanently are counted once.
    - `publications` integer, required — Total number of publications, which includes successful and failed publications.
    - `publications_succeeded` integer, required — Total number of successful publications.
    - `publications_failed` integer, required — Total number of failed publications.
    - `discounted_amount` integer, required — Total amount of discounts related to the campaign. This amount is not reduced by the `rolledback_discounted_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `rolledback_discounted_amount` integer, required — Total amount of discounts orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
  - object — Contains the basic information about any type of campaign.
    - `object` 'campaign_summary', required — The type of the object, which is `campaign_summary`.
    - `campaign` CampaignBase, required — This is an object representing a campaign.
      - `id` string, required — Unique campaign ID, assigned by Voucherify.
      - `name` string, required — 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` 'LOYALTY_PROGRAM' | 'GIFT_VOUCHERS' | 'DISCOUNT_COUPONS' | 'PROMOTION' | 'REFERRAL_PROGRAM', required — Type of campaign.
      - `type` 'AUTO_UPDATE' | 'STATIC' | 'STANDALONE', required — Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) vouchers. - `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 vouchers
      - `voucher` CampaignVoucher — Schema model for a campaign voucher.
        - `type` string, required — Type of voucher.
        - `discount` union — Contains information about discount.
          - object
            - `type` 'AMOUNT', required — Defines the type of the voucher.
            - `amount_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `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` 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS' | 'ADD_SAME_ITEMS'
            - `unit_type` string, required — The product deemed as free, chosen from product inventory (e.g. time, items).
            - `product` SimpleProductDiscountUnit
              - …
            - `sku` SimpleSkuDiscountUnit
              - …
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `effect` 'ADD_MANY_ITEMS' — Defines how the discount is applied to the customer's order.
            - `units` DiscountUnitMultipleOneUnit[], required
              - …
          - object
            - `type` 'PERCENT', required — Defines the type of the voucher.
            - `percent_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'FIXED', required — Defines the type of the voucher.
            - `fixed_amount` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
        - `gift` Gift — Contains current gift card balance information.
          - `amount` number, required — 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, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' — Defines how the credits are applied to the customer's order.
        - `loyalty_card` CampaignLoyaltyCard — Schema model for a campaign loyalty card.
          - `points` integer, required — 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.
            - `period_type` 'FIXED_DAY_OF_YEAR' | 'MONTH', required — 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.
            - `period_value` integer — Value of the period. Required for the `period_type: MONTH`.
            - `rounding_type` 'END_OF_MONTH' | 'END_OF_QUARTER' | 'END_OF_HALF_YEAR' | 'END_OF_YEAR' | 'PARTICULAR_MONTH' — Type of rounding of the expiration period. Optional for the `period_type: MONTH`.
            - `rounding_value` integer — Value of rounding of the expiration period. Required for the `rounding_type`.
            - `fixed_month` integer — 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`.
            - `fixed_day` integer — Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.
        - `redemption` object, required — Defines the redemption limits on vouchers.
          - `quantity` integer, nullable, required — How many times a voucher can be redeemed. A `null` value means unlimited.
        - `code_config` CodeConfig, required — Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, length, charset, etc).
          - `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.
        - `is_referral_code` boolean, required — Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
        - `start_date` string, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
        - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
        - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
          - `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.
          - `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.
        - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
          - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
            - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
            - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
            - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `auto_join` boolean, required — Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
      - `join_once` boolean, required — 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, required — Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
      - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
        - `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.
        - `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.
      - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
        - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
          - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
          - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
          - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `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, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
      - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
      - `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, date-time, required — Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
      - `updated_at` string, date-time — Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.
      - `category` string — Unique category name.
      - `creation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign creation.
      - `vouchers_generation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign's voucher generation.
      - `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](/api-reference/campaigns/get-campaign-summary) endpoint.
      - `protected` boolean, required — Indicates whether the resource can be deleted.
      - `category_id` string, nullable, required — Unique category ID that this campaign belongs to.
      - `categories` Category[], required — Contains details about the campaign category. For the GET [List campaigns](/api-reference/campaigns/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](/api-reference/campaigns/get-campaign-summary) endpoint, it is always returned as an empty array.
        - `id` string, required — Unique category ID assigned by Voucherify.
        - `name` string, required — Category name.
        - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
        - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
        - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
        - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
      - `object` string, required — The type of the object represented by JSON. This object stores information about the campaign.
      - `referral_program` ReferralProgram — Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.
        - `conversion_event_type` 'redemption' | 'custom_event' — Define how a referral is triggered.
        - `custom_event` object — Contains details about the custom event.
          - `id` string — Unique custom event ID.
          - `name` string — Custom event name.
        - `referee_reward` object — Defines the referee reward.
          - `related_object_parent` object — Details of the resource from which the reward originates.
            - `id` string — Unique ID of the reward source.
            - `name` string — Name of the reward source.
            - `object` 'CAMPAIGN' — Type of resource represented by the source of the reward.
          - `type` 'LOYALTY_CARD' | 'GIFT_VOUCHER' — Type of reward.
          - `amount` integer — 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` LoyaltyTiersExpirationAll — Defines the Loyalty Tiers Expiration.
        - `qualification_type` 'BALANCE' | 'POINTS_IN_PERIOD', required — 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.
        - `qualification_period` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' — 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** | **Definition** | |:---|:---| | **Calendar Month** | Points collected in one calendar month<br />January, February, March, etc. | | **Calendar Quarter** | Points collected in the quarter<br />- January - March<br />- April - June<br />- July - September<br />- October - December | | **Calendar Half-year** | Points collected in the half-year<br />- January - June<br />- July - December | | **Calendar Year** | Points collected in one calendar year<br />January - December |
        - `start_date` object, required — Defines the conditions for the start date of the tier.
          - `type` 'IMMEDIATE' | 'NEXT_PERIOD', required — 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.
        - `expiration_date` object, required — Defines the conditions for the expiration date of a tier.
          - `type` 'END_OF_PERIOD' | 'END_OF_NEXT_PERIOD' | 'BALANCE_DROP' | 'CUSTOM', required — 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.
          - `extend` string, required — 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.
          - `rounding` object — Defines the rounding mechanism for tier expiration.
            - `type` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' | 'CUSTOM' — This mechanism describes a custom rounding for the expiration date.
            - `strategy` 'START' | 'END' — This mechanism describes a rounding strategy for the expiration date.
            - `unit` 'MONTH' — Defines the type of unit of time in which the rounding period is counted.
            - `value` integer — Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter. - `0`: January - `1`: February - `2`: March - `3`: April - `4`: May - `5`: June - `6`: July - `7`: August - `8`: September - `9`: October - `10`: November - `11`: December
      - `access_settings_assignments` AccessSettingsCampaignAssignmentsList — Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](/api-reference/campaigns/list-campaigns), this is returned if the `expand=access_settings_assignments` query parameter is passed in the request. This object is not returned for the [GET Campaign summary endpoint](/api-reference/campaigns/get-campaign-summary). **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
        - `object` 'list', required — The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores
        - `data_ref` 'data', required — Identifies the name of the attribute that contains the array of campaign assignments.
        - `data` AreaStoreCampaignAssignment[], required — Contains an array of campaign assignments.
          - `id` string, required — Unique identifier of the campaign assignment.
          - `area_id` string, required — Unique identifier of the area to which the campaign is assigned.
          - `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.
          - `created_at` string, date-time, required — Date and time when the assignment was made. The value is shown in the ISO 8601 format.
          - `object` 'area_store_campaign_assignment', required — The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.
        - `total` integer, required — Total number of areas and stores to which the campaign is assigned.
    - `redemptions` integer, required — Total number of redemptions, which includes successful and failed redemptions.
    - `redemptions_succeeded` integer, required — Total number of successful redemptions.
    - `redemptions_failed` integer, required — Total number of failed redemptions.
    - `rollbacks` integer, required — Total number of rollbacks, which includes successful and failed rollbacks.
    - `rollbacks_succeeded` integer, required — Total number of successful rollbacks.
    - `rollbacks_failed` integer, required — Total number of failed rollbacks.
    - `validations` integer, required — Total number of validations, which includes successful and failed validations.
    - `validations_succeeded` integer, required — Total number of successful validations.
    - `validations_failed` integer, required — Total number of failed validations.
    - `orders_amount` integer, required — Total amount of orders related to the campaign. This amount is not reduced by `orders_rolledback_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `orders_rolledback_amount` integer, required — Total amount of orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `discounted_amount` integer, required — Total amount of discounts related to the campaign. This amount is not reduced by the `rolledback_discounted_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `rolledback_discounted_amount` integer, required — Total amount of discounts orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
  - object
    - `object` 'campaign_summary', required — The type of the object, which is `campaign_summary`.
    - `campaign` CampaignBase, required — This is an object representing a campaign.
      - `id` string, required — Unique campaign ID, assigned by Voucherify.
      - `name` string, required — 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` 'LOYALTY_PROGRAM' | 'GIFT_VOUCHERS' | 'DISCOUNT_COUPONS' | 'PROMOTION' | 'REFERRAL_PROGRAM', required — Type of campaign.
      - `type` 'AUTO_UPDATE' | 'STATIC' | 'STANDALONE', required — Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) vouchers. - `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 vouchers
      - `voucher` CampaignVoucher — Schema model for a campaign voucher.
        - `type` string, required — Type of voucher.
        - `discount` union — Contains information about discount.
          - object
            - `type` 'AMOUNT', required — Defines the type of the voucher.
            - `amount_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `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` 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS' | 'ADD_SAME_ITEMS'
            - `unit_type` string, required — The product deemed as free, chosen from product inventory (e.g. time, items).
            - `product` SimpleProductDiscountUnit
              - …
            - `sku` SimpleSkuDiscountUnit
              - …
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `effect` 'ADD_MANY_ITEMS' — Defines how the discount is applied to the customer's order.
            - `units` DiscountUnitMultipleOneUnit[], required
              - …
          - object
            - `type` 'PERCENT', required — Defines the type of the voucher.
            - `percent_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'FIXED', required — Defines the type of the voucher.
            - `fixed_amount` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
        - `gift` Gift — Contains current gift card balance information.
          - `amount` number, required — 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, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' — Defines how the credits are applied to the customer's order.
        - `loyalty_card` CampaignLoyaltyCard — Schema model for a campaign loyalty card.
          - `points` integer, required — 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.
            - `period_type` 'FIXED_DAY_OF_YEAR' | 'MONTH', required — 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.
            - `period_value` integer — Value of the period. Required for the `period_type: MONTH`.
            - `rounding_type` 'END_OF_MONTH' | 'END_OF_QUARTER' | 'END_OF_HALF_YEAR' | 'END_OF_YEAR' | 'PARTICULAR_MONTH' — Type of rounding of the expiration period. Optional for the `period_type: MONTH`.
            - `rounding_value` integer — Value of rounding of the expiration period. Required for the `rounding_type`.
            - `fixed_month` integer — 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`.
            - `fixed_day` integer — Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.
        - `redemption` object, required — Defines the redemption limits on vouchers.
          - `quantity` integer, nullable, required — How many times a voucher can be redeemed. A `null` value means unlimited.
        - `code_config` CodeConfig, required — Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, length, charset, etc).
          - `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.
        - `is_referral_code` boolean, required — Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
        - `start_date` string, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
        - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
        - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
          - `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.
          - `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.
        - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
          - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
            - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
            - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
            - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `auto_join` boolean, required — Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
      - `join_once` boolean, required — 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, required — Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
      - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
        - `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.
        - `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.
      - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
        - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
          - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
          - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
          - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `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, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
      - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
      - `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, date-time, required — Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
      - `updated_at` string, date-time — Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.
      - `category` string — Unique category name.
      - `creation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign creation.
      - `vouchers_generation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign's voucher generation.
      - `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](/api-reference/campaigns/get-campaign-summary) endpoint.
      - `protected` boolean, required — Indicates whether the resource can be deleted.
      - `category_id` string, nullable, required — Unique category ID that this campaign belongs to.
      - `categories` Category[], required — Contains details about the campaign category. For the GET [List campaigns](/api-reference/campaigns/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](/api-reference/campaigns/get-campaign-summary) endpoint, it is always returned as an empty array.
        - `id` string, required — Unique category ID assigned by Voucherify.
        - `name` string, required — Category name.
        - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
        - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
        - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
        - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
      - `object` string, required — The type of the object represented by JSON. This object stores information about the campaign.
      - `referral_program` ReferralProgram — Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.
        - `conversion_event_type` 'redemption' | 'custom_event' — Define how a referral is triggered.
        - `custom_event` object — Contains details about the custom event.
          - `id` string — Unique custom event ID.
          - `name` string — Custom event name.
        - `referee_reward` object — Defines the referee reward.
          - `related_object_parent` object — Details of the resource from which the reward originates.
            - `id` string — Unique ID of the reward source.
            - `name` string — Name of the reward source.
            - `object` 'CAMPAIGN' — Type of resource represented by the source of the reward.
          - `type` 'LOYALTY_CARD' | 'GIFT_VOUCHER' — Type of reward.
          - `amount` integer — 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` LoyaltyTiersExpirationAll — Defines the Loyalty Tiers Expiration.
        - `qualification_type` 'BALANCE' | 'POINTS_IN_PERIOD', required — 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.
        - `qualification_period` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' — 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** | **Definition** | |:---|:---| | **Calendar Month** | Points collected in one calendar month<br />January, February, March, etc. | | **Calendar Quarter** | Points collected in the quarter<br />- January - March<br />- April - June<br />- July - September<br />- October - December | | **Calendar Half-year** | Points collected in the half-year<br />- January - June<br />- July - December | | **Calendar Year** | Points collected in one calendar year<br />January - December |
        - `start_date` object, required — Defines the conditions for the start date of the tier.
          - `type` 'IMMEDIATE' | 'NEXT_PERIOD', required — 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.
        - `expiration_date` object, required — Defines the conditions for the expiration date of a tier.
          - `type` 'END_OF_PERIOD' | 'END_OF_NEXT_PERIOD' | 'BALANCE_DROP' | 'CUSTOM', required — 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.
          - `extend` string, required — 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.
          - `rounding` object — Defines the rounding mechanism for tier expiration.
            - `type` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' | 'CUSTOM' — This mechanism describes a custom rounding for the expiration date.
            - `strategy` 'START' | 'END' — This mechanism describes a rounding strategy for the expiration date.
            - `unit` 'MONTH' — Defines the type of unit of time in which the rounding period is counted.
            - `value` integer — Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter. - `0`: January - `1`: February - `2`: March - `3`: April - `4`: May - `5`: June - `6`: July - `7`: August - `8`: September - `9`: October - `10`: November - `11`: December
      - `access_settings_assignments` AccessSettingsCampaignAssignmentsList — Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](/api-reference/campaigns/list-campaigns), this is returned if the `expand=access_settings_assignments` query parameter is passed in the request. This object is not returned for the [GET Campaign summary endpoint](/api-reference/campaigns/get-campaign-summary). **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
        - `object` 'list', required — The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores
        - `data_ref` 'data', required — Identifies the name of the attribute that contains the array of campaign assignments.
        - `data` AreaStoreCampaignAssignment[], required — Contains an array of campaign assignments.
          - `id` string, required — Unique identifier of the campaign assignment.
          - `area_id` string, required — Unique identifier of the area to which the campaign is assigned.
          - `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.
          - `created_at` string, date-time, required — Date and time when the assignment was made. The value is shown in the ISO 8601 format.
          - `object` 'area_store_campaign_assignment', required — The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.
        - `total` integer, required — Total number of areas and stores to which the campaign is assigned.
    - `redemptions` integer, required — Total number of redemptions, which includes successful and failed redemptions.
    - `redemptions_succeeded` integer, required — Total number of successful redemptions.
    - `redemptions_failed` integer, required — Total number of failed redemptions.
    - `rollbacks` integer, required — Total number of rollbacks, which includes successful and failed rollbacks.
    - `rollbacks_succeeded` integer, required — Total number of successful rollbacks.
    - `rollbacks_failed` integer, required — Total number of failed rollbacks.
    - `validations` integer, required — Total number of validations, which includes successful and failed validations.
    - `validations_succeeded` integer, required — Total number of successful validations.
    - `validations_failed` integer, required — Total number of failed validations.
    - `orders_amount` integer, required — Total amount of orders related to the campaign. This amount is not reduced by `orders_rolledback_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `orders_rolledback_amount` integer, required — Total amount of orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `vouchers_created` integer, required — Total number of vouchers created within the campaign. Includes vouchers generated when the campaign was created, vouchers added manually, or vouchers generated automatically when a new customer joined the campaign.
    - `vouchers_deleted` integer, required — Total number of vouchers deleted within the campaign. Includes vouchers moved to the bin and vouchers deleted permanently. Vouchers moved to the bin and then deleted permanently are counted once.
    - `publications` integer, required — Total number of publications, which includes successful and failed publications.
    - `publications_succeeded` integer, required — Total number of successful publications.
    - `publications_failed` integer, required — Total number of failed publications.
    - `created_vouchers_amount` integer, required — The total credit amount for all created gift cards. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `amount_added` integer, required — The total credit amount that was added. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `amount_deleted` integer, required — The total credit amount that was deleted by deleting gift cards. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `amount_redeemed` integer, required — The total credit amount that was redeemed. This amount is not reduced by the `amount_rolledback`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `amount_rolledback` integer, required — The total credit amount that was rolled back. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `amount_subtracted` integer, required — The total credit amount that was subtracted. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
  - object — Contains the basic information about any type of campaign.
    - `object` 'campaign_summary', required — The type of the object, which is `campaign_summary`.
    - `campaign` CampaignBase, required — This is an object representing a campaign.
      - `id` string, required — Unique campaign ID, assigned by Voucherify.
      - `name` string, required — 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` 'LOYALTY_PROGRAM' | 'GIFT_VOUCHERS' | 'DISCOUNT_COUPONS' | 'PROMOTION' | 'REFERRAL_PROGRAM', required — Type of campaign.
      - `type` 'AUTO_UPDATE' | 'STATIC' | 'STANDALONE', required — Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) vouchers. - `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 vouchers
      - `voucher` CampaignVoucher — Schema model for a campaign voucher.
        - `type` string, required — Type of voucher.
        - `discount` union — Contains information about discount.
          - object
            - `type` 'AMOUNT', required — Defines the type of the voucher.
            - `amount_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `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` 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS' | 'ADD_SAME_ITEMS'
            - `unit_type` string, required — The product deemed as free, chosen from product inventory (e.g. time, items).
            - `product` SimpleProductDiscountUnit
              - …
            - `sku` SimpleSkuDiscountUnit
              - …
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `effect` 'ADD_MANY_ITEMS' — Defines how the discount is applied to the customer's order.
            - `units` DiscountUnitMultipleOneUnit[], required
              - …
          - object
            - `type` 'PERCENT', required — Defines the type of the voucher.
            - `percent_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'FIXED', required — Defines the type of the voucher.
            - `fixed_amount` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
        - `gift` Gift — Contains current gift card balance information.
          - `amount` number, required — 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, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' — Defines how the credits are applied to the customer's order.
        - `loyalty_card` CampaignLoyaltyCard — Schema model for a campaign loyalty card.
          - `points` integer, required — 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.
            - `period_type` 'FIXED_DAY_OF_YEAR' | 'MONTH', required — 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.
            - `period_value` integer — Value of the period. Required for the `period_type: MONTH`.
            - `rounding_type` 'END_OF_MONTH' | 'END_OF_QUARTER' | 'END_OF_HALF_YEAR' | 'END_OF_YEAR' | 'PARTICULAR_MONTH' — Type of rounding of the expiration period. Optional for the `period_type: MONTH`.
            - `rounding_value` integer — Value of rounding of the expiration period. Required for the `rounding_type`.
            - `fixed_month` integer — 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`.
            - `fixed_day` integer — Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.
        - `redemption` object, required — Defines the redemption limits on vouchers.
          - `quantity` integer, nullable, required — How many times a voucher can be redeemed. A `null` value means unlimited.
        - `code_config` CodeConfig, required — Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, length, charset, etc).
          - `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.
        - `is_referral_code` boolean, required — Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
        - `start_date` string, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
        - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
        - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
          - `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.
          - `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.
        - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
          - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
            - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
            - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
            - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `auto_join` boolean, required — Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
      - `join_once` boolean, required — 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, required — Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
      - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
        - `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.
        - `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.
      - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
        - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
          - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
          - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
          - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `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, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
      - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
      - `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, date-time, required — Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
      - `updated_at` string, date-time — Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.
      - `category` string — Unique category name.
      - `creation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign creation.
      - `vouchers_generation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign's voucher generation.
      - `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](/api-reference/campaigns/get-campaign-summary) endpoint.
      - `protected` boolean, required — Indicates whether the resource can be deleted.
      - `category_id` string, nullable, required — Unique category ID that this campaign belongs to.
      - `categories` Category[], required — Contains details about the campaign category. For the GET [List campaigns](/api-reference/campaigns/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](/api-reference/campaigns/get-campaign-summary) endpoint, it is always returned as an empty array.
        - `id` string, required — Unique category ID assigned by Voucherify.
        - `name` string, required — Category name.
        - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
        - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
        - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
        - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
      - `object` string, required — The type of the object represented by JSON. This object stores information about the campaign.
      - `referral_program` ReferralProgram — Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.
        - `conversion_event_type` 'redemption' | 'custom_event' — Define how a referral is triggered.
        - `custom_event` object — Contains details about the custom event.
          - `id` string — Unique custom event ID.
          - `name` string — Custom event name.
        - `referee_reward` object — Defines the referee reward.
          - `related_object_parent` object — Details of the resource from which the reward originates.
            - `id` string — Unique ID of the reward source.
            - `name` string — Name of the reward source.
            - `object` 'CAMPAIGN' — Type of resource represented by the source of the reward.
          - `type` 'LOYALTY_CARD' | 'GIFT_VOUCHER' — Type of reward.
          - `amount` integer — 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` LoyaltyTiersExpirationAll — Defines the Loyalty Tiers Expiration.
        - `qualification_type` 'BALANCE' | 'POINTS_IN_PERIOD', required — 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.
        - `qualification_period` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' — 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** | **Definition** | |:---|:---| | **Calendar Month** | Points collected in one calendar month<br />January, February, March, etc. | | **Calendar Quarter** | Points collected in the quarter<br />- January - March<br />- April - June<br />- July - September<br />- October - December | | **Calendar Half-year** | Points collected in the half-year<br />- January - June<br />- July - December | | **Calendar Year** | Points collected in one calendar year<br />January - December |
        - `start_date` object, required — Defines the conditions for the start date of the tier.
          - `type` 'IMMEDIATE' | 'NEXT_PERIOD', required — 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.
        - `expiration_date` object, required — Defines the conditions for the expiration date of a tier.
          - `type` 'END_OF_PERIOD' | 'END_OF_NEXT_PERIOD' | 'BALANCE_DROP' | 'CUSTOM', required — 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.
          - `extend` string, required — 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.
          - `rounding` object — Defines the rounding mechanism for tier expiration.
            - `type` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' | 'CUSTOM' — This mechanism describes a custom rounding for the expiration date.
            - `strategy` 'START' | 'END' — This mechanism describes a rounding strategy for the expiration date.
            - `unit` 'MONTH' — Defines the type of unit of time in which the rounding period is counted.
            - `value` integer — Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter. - `0`: January - `1`: February - `2`: March - `3`: April - `4`: May - `5`: June - `6`: July - `7`: August - `8`: September - `9`: October - `10`: November - `11`: December
      - `access_settings_assignments` AccessSettingsCampaignAssignmentsList — Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](/api-reference/campaigns/list-campaigns), this is returned if the `expand=access_settings_assignments` query parameter is passed in the request. This object is not returned for the [GET Campaign summary endpoint](/api-reference/campaigns/get-campaign-summary). **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
        - `object` 'list', required — The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores
        - `data_ref` 'data', required — Identifies the name of the attribute that contains the array of campaign assignments.
        - `data` AreaStoreCampaignAssignment[], required — Contains an array of campaign assignments.
          - `id` string, required — Unique identifier of the campaign assignment.
          - `area_id` string, required — Unique identifier of the area to which the campaign is assigned.
          - `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.
          - `created_at` string, date-time, required — Date and time when the assignment was made. The value is shown in the ISO 8601 format.
          - `object` 'area_store_campaign_assignment', required — The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.
        - `total` integer, required — Total number of areas and stores to which the campaign is assigned.
    - `redemptions` integer, required — Total number of redemptions, which includes successful and failed redemptions.
    - `redemptions_succeeded` integer, required — Total number of successful redemptions.
    - `redemptions_failed` integer, required — Total number of failed redemptions.
    - `rollbacks` integer, required — Total number of rollbacks, which includes successful and failed rollbacks.
    - `rollbacks_succeeded` integer, required — Total number of successful rollbacks.
    - `rollbacks_failed` integer, required — Total number of failed rollbacks.
    - `validations` integer, required — Total number of validations, which includes successful and failed validations.
    - `validations_succeeded` integer, required — Total number of successful validations.
    - `validations_failed` integer, required — Total number of failed validations.
    - `orders_amount` integer, required — Total amount of orders related to the campaign. This amount is not reduced by `orders_rolledback_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `orders_rolledback_amount` integer, required — Total amount of orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `vouchers_created` integer, required — Total number of vouchers created within the campaign. Includes vouchers generated when the campaign was created, vouchers added manually, or vouchers generated automatically when a new customer joined the campaign.
    - `vouchers_deleted` integer, required — Total number of vouchers deleted within the campaign. Includes vouchers moved to the bin and vouchers deleted permanently. Vouchers moved to the bin and then deleted permanently are counted once.
    - `publications` integer, required — Total number of publications, which includes successful and failed publications.
    - `publications_succeeded` integer, required — Total number of successful publications.
    - `publications_failed` integer, required — Total number of failed publications.
    - `created_vouchers_points` integer, required — Total number of points added to newly created loyalty cards. This also counts points added for the loyalty cards which are created by importing a CSV file to a campaign.
    - `points_deleted` integer, required — Total number of points that were deleted.
    - `points_subtracted` integer, required — Total number of points that were subtracted.
    - `points_added` integer, required — Total number of points that were added. This includes points added manually or automatically by redeeming a reward that adds loyalty points to cards in this campaign.
    - `points_rewarded` integer, required — Total number of points that were rewarded to loyalty cards through earning rules. This includes pending points that were activated.
    - `points_redeemed` integer, required — Total number of points that were redeemed for rewards.
    - `points_rolledback` integer, required — Total number of points that were rolled back for reward redemptions.
    - `points_expired` integer, required — Total number of points that have expired.
    - `points_transferred_out` integer, required — Total number of points transferred out of loyalty cards covered by the campaign.
    - `points_transferred_in` integer, required — Total number of points transferred into loyalty cards covered by the campaign.
    - `pending_points_added` integer, required — Total number of pending points that were added either as part of earning rules or added manually to an existing pending point bucket. Pending points that were activated manually or automatically or that were canceled do not affect this number.
    - `pending_points_subtracted` integer, required — Total number of pending points that were subtracted from existing pending point buckets.
    - `pending_points_activated` integer, required — Total number of pending points that were activated manually or automatically.
    - `pending_points_canceled` integer, required — Total number of pending points that were canceled.
  - object — Contains the basic information about any type of campaign.
    - `object` 'campaign_summary', required — The type of the object, which is `campaign_summary`.
    - `campaign` CampaignBase, required — This is an object representing a campaign.
      - `id` string, required — Unique campaign ID, assigned by Voucherify.
      - `name` string, required — 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` 'LOYALTY_PROGRAM' | 'GIFT_VOUCHERS' | 'DISCOUNT_COUPONS' | 'PROMOTION' | 'REFERRAL_PROGRAM', required — Type of campaign.
      - `type` 'AUTO_UPDATE' | 'STATIC' | 'STANDALONE', required — Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) vouchers. - `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 vouchers
      - `voucher` CampaignVoucher — Schema model for a campaign voucher.
        - `type` string, required — Type of voucher.
        - `discount` union — Contains information about discount.
          - object
            - `type` 'AMOUNT', required — Defines the type of the voucher.
            - `amount_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `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` 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS' | 'ADD_SAME_ITEMS'
            - `unit_type` string, required — The product deemed as free, chosen from product inventory (e.g. time, items).
            - `product` SimpleProductDiscountUnit
              - …
            - `sku` SimpleSkuDiscountUnit
              - …
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'UNIT', required — Discount type.
            - `effect` 'ADD_MANY_ITEMS' — Defines how the discount is applied to the customer's order.
            - `units` DiscountUnitMultipleOneUnit[], required
              - …
          - object
            - `type` 'PERCENT', required — Defines the type of the voucher.
            - `percent_off` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
          - object
            - `type` 'FIXED', required — Defines the type of the voucher.
            - `fixed_amount` number, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS'
            - `is_dynamic` boolean — Flag indicating whether the discount was calculated using a formula.
        - `gift` Gift — Contains current gift card balance information.
          - `amount` number, required — 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, required — 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` 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' — Defines how the credits are applied to the customer's order.
        - `loyalty_card` CampaignLoyaltyCard — Schema model for a campaign loyalty card.
          - `points` integer, required — 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.
            - `period_type` 'FIXED_DAY_OF_YEAR' | 'MONTH', required — 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.
            - `period_value` integer — Value of the period. Required for the `period_type: MONTH`.
            - `rounding_type` 'END_OF_MONTH' | 'END_OF_QUARTER' | 'END_OF_HALF_YEAR' | 'END_OF_YEAR' | 'PARTICULAR_MONTH' — Type of rounding of the expiration period. Optional for the `period_type: MONTH`.
            - `rounding_value` integer — Value of rounding of the expiration period. Required for the `rounding_type`.
            - `fixed_month` integer — 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`.
            - `fixed_day` integer — Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.
        - `redemption` object, required — Defines the redemption limits on vouchers.
          - `quantity` integer, nullable, required — How many times a voucher can be redeemed. A `null` value means unlimited.
        - `code_config` CodeConfig, required — Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, length, charset, etc).
          - `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.
        - `is_referral_code` boolean, required — Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
        - `start_date` string, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
        - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
        - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
          - `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.
          - `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.
        - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
          - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
            - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
            - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
            - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `auto_join` boolean, required — Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
      - `join_once` boolean, required — 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, required — Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
      - `validity_timeframe` ValidityTimeframe — Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
        - `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.
        - `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.
      - `validity_day_of_week` integer[] — 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` ValidityHours — Determines the hours of validity, e.g. to create a happy hours scenario.
        - `daily` object[] — Defines the recurring period(s) when the resource is active. The periods should not overlap.
          - `start_time` string, time — Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.
          - `days_of_week` integer[] — Integer array corresponding to the particular days of the week in which the resource is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
          - `expiration_time` string, time — Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.
      - `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, date-time — Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
      - `expiration_date` string, date-time — Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
      - `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, date-time, required — Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.
      - `updated_at` string, date-time — Timestamp representing the date and time when the campaign was last updated in ISO 8601 format.
      - `category` string — Unique category name.
      - `creation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign creation.
      - `vouchers_generation_status` 'DONE' | 'IN_PROGRESS' | 'FAILED' | 'DRAFT' | 'MODIFYING', required — Indicates the status of the campaign's voucher generation.
      - `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](/api-reference/campaigns/get-campaign-summary) endpoint.
      - `protected` boolean, required — Indicates whether the resource can be deleted.
      - `category_id` string, nullable, required — Unique category ID that this campaign belongs to.
      - `categories` Category[], required — Contains details about the campaign category. For the GET [List campaigns](/api-reference/campaigns/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](/api-reference/campaigns/get-campaign-summary) endpoint, it is always returned as an empty array.
        - `id` string, required — Unique category ID assigned by Voucherify.
        - `name` string, required — Category name.
        - `hierarchy` integer, required — Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.
        - `object` 'category', required — The type of the object represented by the JSON. This object stores information about the category.
        - `created_at` string, date-time, required — Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.
        - `updated_at` string, date-time — Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.
      - `object` string, required — The type of the object represented by JSON. This object stores information about the campaign.
      - `referral_program` ReferralProgram — Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.
        - `conversion_event_type` 'redemption' | 'custom_event' — Define how a referral is triggered.
        - `custom_event` object — Contains details about the custom event.
          - `id` string — Unique custom event ID.
          - `name` string — Custom event name.
        - `referee_reward` object — Defines the referee reward.
          - `related_object_parent` object — Details of the resource from which the reward originates.
            - `id` string — Unique ID of the reward source.
            - `name` string — Name of the reward source.
            - `object` 'CAMPAIGN' — Type of resource represented by the source of the reward.
          - `type` 'LOYALTY_CARD' | 'GIFT_VOUCHER' — Type of reward.
          - `amount` integer — 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` LoyaltyTiersExpirationAll — Defines the Loyalty Tiers Expiration.
        - `qualification_type` 'BALANCE' | 'POINTS_IN_PERIOD', required — 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.
        - `qualification_period` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' — 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** | **Definition** | |:---|:---| | **Calendar Month** | Points collected in one calendar month<br />January, February, March, etc. | | **Calendar Quarter** | Points collected in the quarter<br />- January - March<br />- April - June<br />- July - September<br />- October - December | | **Calendar Half-year** | Points collected in the half-year<br />- January - June<br />- July - December | | **Calendar Year** | Points collected in one calendar year<br />January - December |
        - `start_date` object, required — Defines the conditions for the start date of the tier.
          - `type` 'IMMEDIATE' | 'NEXT_PERIOD', required — 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.
        - `expiration_date` object, required — Defines the conditions for the expiration date of a tier.
          - `type` 'END_OF_PERIOD' | 'END_OF_NEXT_PERIOD' | 'BALANCE_DROP' | 'CUSTOM', required — 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.
          - `extend` string, required — 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.
          - `rounding` object — Defines the rounding mechanism for tier expiration.
            - `type` 'MONTH' | 'QUARTER' | 'HALF_YEAR' | 'YEAR' | 'CUSTOM' — This mechanism describes a custom rounding for the expiration date.
            - `strategy` 'START' | 'END' — This mechanism describes a rounding strategy for the expiration date.
            - `unit` 'MONTH' — Defines the type of unit of time in which the rounding period is counted.
            - `value` integer — Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter. - `0`: January - `1`: February - `2`: March - `3`: April - `4`: May - `5`: June - `6`: July - `7`: August - `8`: September - `9`: October - `10`: November - `11`: December
      - `access_settings_assignments` AccessSettingsCampaignAssignmentsList — Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](/api-reference/campaigns/list-campaigns), this is returned if the `expand=access_settings_assignments` query parameter is passed in the request. This object is not returned for the [GET Campaign summary endpoint](/api-reference/campaigns/get-campaign-summary). **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
        - `object` 'list', required — The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores
        - `data_ref` 'data', required — Identifies the name of the attribute that contains the array of campaign assignments.
        - `data` AreaStoreCampaignAssignment[], required — Contains an array of campaign assignments.
          - `id` string, required — Unique identifier of the campaign assignment.
          - `area_id` string, required — Unique identifier of the area to which the campaign is assigned.
          - `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.
          - `created_at` string, date-time, required — Date and time when the assignment was made. The value is shown in the ISO 8601 format.
          - `object` 'area_store_campaign_assignment', required — The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.
        - `total` integer, required — Total number of areas and stores to which the campaign is assigned.
    - `redemptions` integer, required — Total number of redemptions, which includes successful and failed redemptions.
    - `redemptions_succeeded` integer, required — Total number of successful redemptions.
    - `redemptions_failed` integer, required — Total number of failed redemptions.
    - `rollbacks` integer, required — Total number of rollbacks, which includes successful and failed rollbacks.
    - `rollbacks_succeeded` integer, required — Total number of successful rollbacks.
    - `rollbacks_failed` integer, required — Total number of failed rollbacks.
    - `validations` integer, required — Total number of validations, which includes successful and failed validations.
    - `validations_succeeded` integer, required — Total number of successful validations.
    - `validations_failed` integer, required — Total number of failed validations.
    - `orders_amount` integer, required — Total amount of orders related to the campaign. This amount is not reduced by `orders_rolledback_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `orders_rolledback_amount` integer, required — Total amount of orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`.
    - `vouchers_created` integer, required — Total number of vouchers created within the campaign. Includes vouchers generated when the campaign was created, vouchers added manually, or vouchers generated automatically when a new customer joined the campaign.
    - `vouchers_deleted` integer, required — Total number of vouchers deleted within the campaign. Includes vouchers moved to the bin and vouchers deleted permanently. Vouchers moved to the bin and then deleted permanently are counted once.
    - `publications` integer, required — Total number of publications, which includes successful and failed publications.
    - `publications_succeeded` integer, required — Total number of successful publications.
    - `publications_failed` integer, required — Total number of failed publications.
    - `referred_customers` integer, required — Total number of all referred customers.

## Other responses

- `404` — Returns an error if a campaign is not found.

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-api-async-actions/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-api-async-actions/versions/4982266e0494/schema)
