Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 4.32 KB

Voucher.md

File metadata and controls

66 lines (50 loc) · 4.32 KB

Voucher

This is an object representing a voucher.

Properties

Name Type Description
id String Assigned by the Voucherify API, identifies the voucher.
code String A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.
campaign String A unique campaign name, identifies the voucher's parent campaign.
campaignId String Assigned by the Voucherify API, identifies the voucher's parent campaign.
category String Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.
categoryId String Unique category ID assigned by Voucherify.
categories List<Category> Contains details about the category.
type TypeEnum Defines the type of the voucher.
discount Discount
gift CampaignsVouchersCreateCombinedResponseBodyGift
loyaltyCard CampaignsVouchersCreateCombinedResponseBodyLoyaltyCard
startDate OffsetDateTime Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.
expirationDate OffsetDateTime Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.
validityTimeframe ValidityTimeframe
validityDayOfWeek List<ValidityDayOfWeekEnum> 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
validityHours ValidityHours
active Boolean A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an active voucher - `false` indicates an inactive voucher
additionalInfo String An optional field to keep any extra textual information about the code such as a code description and details.
metadata Object The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.
assets VoucherAssets
isReferralCode Boolean Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
createdAt OffsetDateTime Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.
updatedAt OffsetDateTime Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.
holderId String Unique identifier of the customer who owns the voucher.
referrerId String Unique identifier of the referring person.
_object String The type of the object represented by JSON. Default is `voucher`.
validationRulesAssignments ValidationRulesAssignmentsList
publish CampaignsVouchersCreateCombinedResponseBodyPublish
redemption CampaignsVouchersCreateCombinedResponseBodyRedemption

Enum: TypeEnum

Name Value
GIFT_VOUCHER "GIFT_VOUCHER"
DISCOUNT_VOUCHER "DISCOUNT_VOUCHER"
LOYALTY_CARD "LOYALTY_CARD"

Enum: List<ValidityDayOfWeekEnum>

Name Value
NUMBER_0 0
NUMBER_1 1
NUMBER_2 2
NUMBER_3 3
NUMBER_4 4
NUMBER_5 5
NUMBER_6 6