Customer Activity Object

Customer Activity

AttributesDescription
id
string

Unique event ID, assigned by Voucherify.

Example:

evcus_0c150c51730c6b60b1

type
string

Event type.

Available values: customer.confirmed, customer.created, customer.updated, customer.deleted, customer.referred, customer.custom_event, customer.segment.entered, customer.segment.left, customer.sms.sent, customer.sms.recovered, customer.sms.failed, customer.email.sent, customer.email.recovered, customer.email.failed, customer.activecampaign.sent, customer.activecampaign.recovered, customer.activecampaign.failed, customer.braze.sent, customer.braze.recovered, customer.braze.failed, customer.mailchimp.sent, customer.mailchimp.recovered, customer.mailchimp.failed, customer.intercom.sent, customer.intercom.recovered, customer.intercom.failed, customer.shopify.sent, customer.shopify.recovered, customer.shopify.failed, customer.klaviyo.sent, customer.klaviyo.recovered, customer.klaviyo.failed, customer.batch.sent, customer.batch.recovered, customer.batch.failed, customer.rewarded, customer.rewarded.loyalty_points, customer.voucher.gift.balance_added, customer.voucher.loyalty_card.points_added, customer.voucher.loyalty_card.points_transferred, customer.voucher.loyalty_card.points_expired, customer.voucher.deleted, customer.publication.succeeded, customer.publication.failed, customer.validation.succeeded, customer.validation.failed, customer.redemption.failed, customer.redemption.succeeded, customer.redemption.rollback.failed, customer.redemption.rollback.succeeded, customer.consents.given, customer.consents.revoked, customer.order.canceled, customer.order.created, customer.order.fulfilled, customer.order.paid, customer.order.processing, customer.order.updated, customer.reward_redemptions.created, customer.reward_redemptions.pending, customer.reward_redemptions.completed, customer.reward_redemptions.rolledback, customer.loyalty.updated, customer.loyalty.tier.upgraded, customer.loyalty.tier.downgraded, customer.loyalty.tier.prolonged, customer.loyalty.tier.expiration.changed, customer.loyalty.tier.joined, customer.loyalty.tier.left
data
object

Contains details about the event. The objects that are returned in the data attribute differ based on the context of the event type.

AttributesDescription
dataSee: Customer Activity Data
event_source
object

Contains the source of the object that initiated the sendout.

AttributesDescription
channel
string

Determines the channel that initiated the sendout.

Available values: USER_PORTAL, API, CLIENT_API, INTERNAL Example:

API

user
object

Defines the user who triggered the event.

AttributesDescription
id
string

Unique identifier of the user.

Example:

user_xyzfghSTprSTUVWXYlk6tuvXYst7FGH7

api_key
object

Determines the API key used to initiate the sendout.

AttributesDescription
name
string

Channel name in the application keys.

app_id
string

Contains the application ID from the Voucherify API key pair.

Example:

1XXXX5XX-0XXX-XXXb-X7XX-XX2XXaXXX6XX

created_at
string

Timestamp representing the date and time when the customer activity occurred in ISO 8601 format.

Example:

2022-08-30T09:14:07.660Z

group_id
string

Unique identifier of the request that caused the event.

Example:

v-1f36113948e50fc4ge

Customer Activity Data

Event data object schema.

One of:

Event Customer Confirmed, Event Customer Created, Event Customer Updated, Event Customer Deleted, Event Customer Referred, Event Customer Custom Event, Event Customer Segment Entered, Event Customer Segment Left, Event Customer SMS Sent, Event Customer SMS Recovered, Event Customer SMS Failed, Event Customer Email Sent, Event Customer Email Recovered, Event Customer Email Failed, Event Customer ActiveCampaign Sent, Event Customer ActiveCampaign Recovered, Event Customer ActiveCampaign Failed, Event Customer Braze Sent, Event Customer Braze Recovered, Event Customer Braze Failed, Event Customer Mailchimp Sent, Event Customer Mailchimp Recovered, Event Customer Mailchimp Failed, Event Customer Intercom Sent, Event Customer Intercom Recovered, Event Customer Intercom Failed, Event Customer Shopify Sent, Event Customer Shopify Recovered, Event Customer Shopify Failed, Event Customer Klaviyo Sent, Event Customer Klaviyo Recovered, Event Customer Klaviyo Failed, Event Customer Batch Sent, Event Customer Batch Recovered, Event Customer Batch Failed, Event Customer Rewarded, Event Customer Rewarded Loyalty Points, Event Customer Gift Voucher Balance Added, Event Customer Loyalty Card Points Added, Event Customer Loyalty Card Points Transferred, Event Customer Loyalty Card Points Expired, Event Customer Voucher Deleted, Event Customer Publication Succeeded, Event Customer Publication Failed, Event Customer Validation Succeeded, Event Customer Validation Failed, Event Customer Redemption Succeeded, Event Customer Redemption Failed, Event Customer Redemption Rollback Succeeded, Event Customer Redemption Rollback Failed, Event Customer Consents Given, Event Customer Consents Revoked, Event Customer Order Canceled, Event Customer Order Created, Event Customer Order Fulfilled, Event Customer Order Paid, Event Customer Order Processing, Event Customer Order Updated, Event Customer Reward Redemptions Created, Event Customer Reward Redemptions Pending, Event Customer Reward Redemptions Completed, Event Customer Reward Redemptions Rolled Back, Event Customer Loyalty Updated, Event Customer Loyalty Tier Upgraded, Event Customer Loyalty Tier Downgraded, Event Customer Loyalty Tier Prolonged, Event Customer Loyalty Tier Expiration Changed, Event Customer Loyalty Tier Joined, Event Customer Loyalty Tier Left

Event Customer Confirmed

AttributesDescription
customerSee: Customer With Summary Loyalty Referrals
unconfirmed_customer
object
AttributesDescription
id
string
Example:

ucust_1qa70mVfYkl11Ab0ZxDPdWNa

Event Customer Created

AttributesDescription
customerSee: Customer With Summary Loyalty Referrals

Event Customer Updated

AttributesDescription
customerSee: Customer With Summary Loyalty Referrals

Event Customer Deleted

AttributesDescription
customerSee: Customer With Summary Loyalty Referrals

Event Customer Referred

AttributesDescription
customerSee: Simple Customer
referrerSee: Simple Customer
campaignSee: Simple Campaign
voucherSee: Simple Voucher
custom_eventSee: Custom Event
redemptionSee: Redemption Internal

Event Customer Custom Event

AttributesDescription
eventSee: Custom Event
event_schemaSee: Simple Custom Event
customerSee: Simple Customer
referral
object, null

Details about the referral.

AttributesDescription
referrer

Details about the referrer.

See: Simple Customer
voucher

Details about the referral code.

See: Simple Voucher
campaign

Details about the referral campaign.

See: Simple Campaign
loyalty
object, null

Details about the loyalty activity.

AttributesDescription
voucher

Details about the loyalty code.

See: Simple Voucher
campaign

Details about the loyalty campaign.

See: Simple Campaign

Event Customer Segment Entered

AttributesDescription
customerSee: Customer With Summary Loyalty Referrals
segmentSee: Simple Segment

Event Customer Segment Left

AttributesDescription
customerSee: Customer With Summary Loyalty Referrals
segmentSee: Simple Segment

Event Customer SMS Sent

Event data object schema for customer.sms.sent.

Event Customer Sent

Event Customer SMS Recovered

Event data object schema for customer.sms.recovered.

Event Customer Recovered

Event Customer SMS Failed

Event data object schema for customer.sms.failed.

Event Customer Failed

Event Customer Email Sent

Event data object schema for customer.email.sent.

Event Customer Sent

Event Customer Email Recovered

Event data object schema for customer.email.recovered.

Event Customer Recovered

Event Customer Email Failed

Event data object schema for customer.email.failed.

Event Customer Failed

Event Customer ActiveCampaign Sent

Event data object schema for customer.activecampaign.sent.

Event Customer Sent

Event Customer ActiveCampaign Recovered

Event data object schema for customer.activecampaign.recovered.

Event Customer Recovered

Event Customer ActiveCampaign Failed

Event data object schema for customer.activecampaign.failed.

Event Customer Failed

Event Customer Braze Sent

Event data object schema for customer.braze.sent.

Event Customer Sent

Event Customer Braze Recovered

Event data object schema for customer.braze.recovered.

Event Customer Recovered

Event Customer Braze Failed

Event data object schema for customer.braze.failed.

Event Customer Failed

Event Customer Mailchimp Sent

Event data object schema for customer.mailchimp.sent.

Event Customer Sent

Event Customer Mailchimp Recovered

Event data object schema for customer.mailchimp.recovered.

Event Customer Recovered

Event Customer Mailchimp Failed

Event data object schema for customer.mailchimp.failed.

Event Customer Failed

Event Customer Intercom Sent

Event data object schema for customer.intercom.sent.

Event Customer Sent

Event Customer Intercom Recovered

Event data object schema for customer.intercom.recovered.

Event Customer Recovered

Event Customer Intercom Failed

Event data object schema for customer.intercom.failed.

Event Customer Failed

Event Customer Shopify Sent

Event data object schema for customer.shopify.sent.

Event Customer Sent

Event Customer Shopify Recovered

Event data object schema for customer.shopify.recovered.

Event Customer Recovered

Event Customer Shopify Failed

Event data object schema for customer.shopify.failed.

Event Customer Failed

Event Customer Klaviyo Sent

Event data object schema for customer.klaviyo.sent.

Event Customer Sent

Event Customer Klaviyo Recovered

Event data object schema for customer.klaviyo.recovered.

Event Customer Recovered

Event Customer Klaviyo Failed

Event data object schema for customer.klaviyo.failed.

Event Customer Failed

Event Customer Batch Sent

Event data object schema for customer.batch.sent.

Event Customer Sent

Event Customer Batch Recovered

Event data object schema for customer.batch.recovered.

Event Customer Recovered

Event Customer Batch Failed

Event data object schema for customer.batch.failed.

Event Customer Failed

Event Customer Rewarded

AttributesDescription
customerSee: Simple Customer
holderSee: Simple Customer
voucherSee: Simple Voucher
campaignSee: Simple Campaign
redemptionSee: Redemption Internal
rewardSee: Simple Redemption Reward Result
referral_tierSee: Simple Referral Tier
balance
object, null

Balance changed by the event.

AttributesDescription
amount
integer
custom_eventSee: Custom Event
customer_event
object

Event Customer Rewarded Loyalty Points

AttributesDescription
customerSee: Simple Customer
holderSee: Simple Customer
voucherSee: Simple Voucher
campaignSee: Simple Campaign
loyalty_tierSee: Loyalty Tier
earning_ruleSee: Earning Rule
balance
integer
orderSee: Order Calculated
event
object

Event Customer Gift Voucher Balance Added

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign
voucherSee: Simple Voucher
balance
integer
transactionSee: Voucher Transaction

Event Customer Loyalty Card Points Added

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign
voucherSee: Simple Voucher
balance
integer
transactionSee: Voucher Transaction

Event Customer Loyalty Card Points Transferred

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign
voucherSee: Simple Voucher
source_voucherSee: Simple Voucher
destination_voucherSee: Simple Voucher
balance
integer
transactionSee: Voucher Transaction

Event Customer Loyalty Card Points Expired

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign
voucherSee: Simple Voucher
points
integer
buckets
array
Array of Voucher Transaction
transactionSee: Voucher Transaction

Event Customer Voucher Deleted

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign
voucherSee: Simple Voucher

Event Customer Publication Succeeded

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign
publicationSee: Valid Single Voucher

Event Customer Publication Failed

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign
publicationSee: Valid Single Voucher

Event Customer Validation Succeeded

AttributesDescription
customerSee: Simple Customer
validationSee: Validation Entity

Event Customer Validation Failed

AttributesDescription
customerSee: Simple Customer
validationSee: Validation Entity

Event Customer Redemption Succeeded

Event data object schema for customer.redemption.succeeded.

Event Customer Redemption

Event Customer Redemption Failed

Event data object schema for customer.redemption.failed.

Event Customer Redemption

Event Customer Redemption Rollback Succeeded

Event data object schema for customer.redemption.rollback.succeeded.

All of:

  1. Event Customer Redemption
  2. AttributesDescription
    redemption_rollbackSee: Simple Redemption

Event Customer Redemption Rollback Failed

Event data object schema for customer.redemption.rollback.failed.

All of:

  1. Event Customer Redemption
  2. AttributesDescription
    redemption_rollbackSee: Simple Redemption

Event Customer Consents Given

Event data object schema for customer.consents.given.

Event Customer Consents

Event Customer Consents Revoked

Event data object schema for customer.consents.revoked.

Event Customer Consents

Event Customer Order Canceled

Event data object schema for customer.order.canceled.

Event Customer Order

Event Customer Order Created

Event data object schema for customer.order.created.

Event Customer Order

Event Customer Order Fulfilled

Event data object schema for customer.order.fulfilled.

Event Customer Order

Event Customer Order Paid

Event data object schema for customer.order.paid.

Event Customer Order

Event Customer Order Processing

Event data object schema for customer.order.processing.

Event Customer Order

Event Customer Order Updated

Event data object schema for customer.order.updated.

Event Customer Order

Event Customer Reward Redemptions Created

Event data object schema for customer.reward_redemptions.created.

Event Customer Reward Redemptions

Event Customer Reward Redemptions Pending

Event data object schema for customer.reward_redemptions.pending.

Event Customer Reward Redemptions

Event Customer Reward Redemptions Completed

Event data object schema for customer.reward_redemptions.completed.

Event Customer Reward Redemptions

Event Customer Reward Redemptions Rolled Back

Event data object schema for customer.reward_redemptions.rolledback.

Event Customer Reward Redemptions

Event Customer Loyalty Updated

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign
loyalty
object
created_at
string
Example:

2022-02-25T13:32:08.734Z

Event Customer Loyalty Tier Upgraded

Event data object schema for customer.loyalty.tier.upgraded.

All of:

  1. Event Customer Loyalty Tier Base
  2. Loyalty Tier Upgraded

    AttributesDescription
    loyalty_tier_fromSee: Loyalty Tier
    loyalty_tier_toSee: Loyalty Tier
    created_at
    string
    Example:

    2022-02-25T13:32:08.734Z

Event Customer Loyalty Tier Downgraded

Event data object schema for customer.loyalty.tier.downgraded.

All of:

  1. Event Customer Loyalty Tier Base
  2. Loyalty Tier Downgraded

    AttributesDescription
    loyalty_tier_fromSee: Loyalty Tier
    loyalty_tier_toSee: Loyalty Tier
    created_at
    string
    Example:

    2022-02-25T13:32:08.734Z

Event Customer Loyalty Tier Prolonged

Event data object schema for customer.loyalty.tier.prolonged.

All of:

  1. Event Customer Loyalty Tier Base
  2. Loyalty Tier Prolonged

    AttributesDescription
    loyalty_tierSee: Loyalty Tier
    created_at
    string
    Example:

    2022-02-25T13:32:08.734Z

Event Customer Loyalty Tier Expiration Changed

Event data object schema for customer.loyalty.tier.expiration.changed.

All of:

  1. Event Customer Loyalty Tier Base
  2. Loyalty Tier Expiration Changed

    AttributesDescription
    loyalty_tierSee: Loyalty Tier
    created_at
    string
    Example:

    2022-02-25T13:32:08.734Z

    expiration_date
    string
    Example:

    2022-02-25T13:32:08.734Z

Event Customer Loyalty Tier Joined

Event data object schema for customer.loyalty.tier.joined.

All of:

  1. Event Customer Loyalty Tier Base
  2. Loyalty Tier Joined

    AttributesDescription
    loyalty_tierSee: Loyalty Tier
    created_at
    string
    Example:

    2022-02-25T13:32:08.734Z

Event Customer Loyalty Tier Left

Event data object schema for customer.loyalty.tier.left.

All of:

  1. Event Customer Loyalty Tier Base
  2. Loyalty Tier Left

    AttributesDescription
    loyalty_tierSee: Loyalty Tier
    created_at
    string
    Example:

    2022-02-25T13:32:08.734Z

Customer With Summary Loyalty Referrals

All of:

  1. Customer Response Data

    AttributesDescription
    id
    string

    The ID of an existing customer that will be linked to redemption in this request.

    source_id
    string

    A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.

    summaryCustomer Summary
    loyaltyCustomer Loyalty
    referralsCustomer Referrals
    system_metadata
    object

    Object used to store system metadata information.

    created_at
    string

    Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format.

    Example:

    2022-08-30T06:32:07.380Z

    updated_at
    string

    Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.

    Example:

    2022-08-31T06:32:07.380Z

    assets
    object

    Contains information about the customer's cockpit.

    AttributesDescription
    cockpit_url
    string

    Customer's cockpit URL address.

    object
    string

    The type of the object represented by JSON.

    Available values: customer
  2. Customer Base

Simple Customer

AttributesDescription
id
string

The ID of an existing customer that will be linked to redemption in this request.

source_id
string

A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.

name
string

Customer's first and last name.

email
string

Customer's email address.

metadata
object

A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.

object
string

The type of the object represented by JSON.

Available values: customer

Simple Campaign

AttributesDescription
id
string

Campaign ID.

name
string

Campaign name.

campaign_type
string

Type of campaign.

type
string

Defines whether the campaign can be updated with new vouchers after campaign creation.

  • AUTO_UPDATE: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method).
  • STATIC: vouchers need to be manually published.
Available values: AUTO_UPDATE, STATIC
is_referral_code
boolean

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

voucher
object
See: Simple Campaign Voucher
lucky_draw
object
Lucky Draw
referral_programSee: Referral Program
auto_join
boolean

Indicates whether customers will be able to auto-join the campaign if any earning rule is fulfilled.

join_once
boolean

If this value is set to true, customers will be able to join the campaign only once.

active
boolean

Indicates whether the campaign is active.

category
string

Unique category name.

category_id

The unique category ID that this campaign belongs to.

categories
array

Contains details about the category.

Array of Category
metadata
object

A set of custom key/value pairs that you can attach to a campaign. The metadata object stores all custom attributes assigned to the campaign.

start_date
string

Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.

Example:

2022-09-20T00:00:00.000Z

expiration_date
string

Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.

Example:

2022-09-30T00:00:00.000Z

description
string

An optional field to keep extra textual information about the campaign such as a campaign description and details.

created_at
string

Timestamp representing the date and time when the campaign was created. Timestamp is presented in the ISO 8601 format.

Example:

2024-01-01T11:11:11.111Z

updated_at
string

Timestamp representing the date and time when the campaign was updated in the ISO 8601 format.

Example:

2024-01-01T11:11:11.111Z

object
string

The type of the object represented by JSON. This object stores information about the campaign.

Available values: campaign

Simple Voucher

AttributesDescription
id
string

A unique identifier that represents the voucher assigned by Voucherify.

code
string

Voucher code.

gift

Gift object response.

Gift
discountSee: Discount
loyalty_card
object

Defines the loyalty card details.

Simple Loyalty Card
type
string

Type of the voucher.

Available values: DISCOUNT_VOUCHER, LOYALTY_CARD, GIFT_VOUCHER
campaign
string

Campaign name.

campaign_id
string

Campaign unique ID.

is_referral_code
boolean

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

holder_id
string

Unique customer ID of the campaign owner.

Example:

cust_eWgXlBBiY6THFRJwX45Iakv4

referrer_id
string

Unique identifier of the referrer assigned by Voucherify.

Example:

cust_nM4jqPiaXUvQdVSA6vTRUnix

category_id
string, null

Unique identifier of the category that this voucher belongs to.

Example:

cat_0b6152ce12414820dc

categories
array

Contains details about the category.

Array of Category
active
boolean

Shows whether the voucher is on or off. true indicates an active voucher and false indicates an inactive voucher.

created_at
string

Timestamp representing the date and time when the order was created. Timestamp is presented in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

updated_at
string

Timestamp representing the date and time when the voucher was updated in the ISO 8601 format.

Example:

2024-01-01T11:11:11.111Z

redemption
object

Defines the redemption limits on vouchers.

AttributesDescription
quantity
integer, null

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

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

start_date
string

Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.

Example:

2021-12-01T00:00:00.000Z

expiration_date
string

Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.

Example:

2021-12-31T00:00:00.000Z

metadata
object

A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher.

object
string

The type of the object represented by JSON.

Available values: voucher

Custom Event

AttributesDescription
id
string

Unique custom event ID.

object
string

The object represented is an event.

Available values: event
type
string

The event name.

customer

A simple customer object

Customer Object Required Object Type
referral
object

Referral object.

AttributesDescription
referrer_id
string

Unique referrer ID.

Example:

cust_nM4jqPiaXUvQdVSA6vTRUnix

code
string

Voucher code.

id
string

Unique voucher ID.

loyalty
object

Loyalty object.

AttributesDescription
code
string

Loyalty card code.

metadata
object

A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer object.

created_at
string

Timestamp representing the date and time when the custom event was created. Timestamp is presented in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

Redemption Internal

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

object
string

The type of the object represented by the JSON. This object stores information about the redemption.

created_at
string

Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

tracking_id
string

Hashed customer source ID.

metadata
object

The metadata object stores all custom attributes assigned to the redemption.

channel_type
string

The source of the channel for the redemption rollback. A USER corresponds to the Voucherify Dashboard and an API corresponds to the API.

Available values: USER, API
channel_id
string

Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API.

Example:

user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH

failure_code
string

If the result is FAILURE, this parameter will provide a generic reason as to why the redemption failed.

Example:

customer_rules_violated

failure_message
string

If the result is FAILURE, this parameter will provide a more expanded reason as to why the redemption failed.

orderSee: Order Calculated
previous_orderSee: Order Calculated
rewardSee: Redemption Reward Result
amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

Example:

10000

reason
string

System generated cause for the redemption being invalid in the context of the provided parameters.

result
string

Redemption result.

Available values: SUCCESS, FAILURE
status
string

Redemption status.

Available values: SUCCEEDED, FAILED
related_redemptions
object
AttributesDescription
rollbacks
array
Array of:

Redemption Internal Related Redemptions Rollbacks Item

AttributesDescription
id
string

Unique rollback redemption ID.

Example:

rr_0bc92f81a6801f9bca

date
string

Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

redemptions
array
Array of:

Redemption Internal Related Redemptions Item

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

date
string

Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

parent_redemption_id
string

Unique redemption ID of the parent redemption.

Example:

r_0c656311b5878a2031

redemption
string

Unique redemption ID of the parent redemption.

Example:

r_0c656311b5878a2031

customerSee: Simple Customer
customer_id
string, null

Unique customer ID of the redeeming customer.

Example:

cust_i8t5Tt6eiKG5K79KQlJ0Vs64

related_object_type
string

Defines the related object.

Available values: voucher, promotion_tier
related_object_id
string

Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.

related_object_parent_id
string

Unique related parent object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher.

campaign_name
string

Campaign name

voucher

Defines the details of the voucher being redeemed.

All of: 1. Voucher
2. Voucher Holder
promotion_tier

Contains details of the promotion tier and the parent campaign.

Promotion Tier

Simple Custom Event

AttributesDescription
id
string

Unique identifier of the custom event.

name
string

Name of the custom event.

Simple Segment

AttributesDescription
id
string

Unique segment ID.

Example:

seg_DNAOhUtJffvX0f57ajLMFBYR

name
string

Segment name.

object
string

The type of the object represented by the ID.

Available values: segment

Event Customer Sent

AttributesDescription
customerSee: Simple Customer
distribution
object
sent_at
string

Timestamp representing the date and time when the distribution was sent in ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

Event Customer Recovered

AttributesDescription
customerSee: Simple Customer
distribution
object
recovered_at
string

Timestamp representing the date and time when the distribution was recovered in ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

Event Customer Failed

AttributesDescription
customerSee: Simple Customer
distribution
object
failed_at
string

Timestamp representing the date and time when the distribution failed in ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

Simple Redemption Reward Result

AttributesDescription
customerSee: Simple Customer
assignment_id
string

Unique reward assignment ID assigned by Voucherify.

voucher

Defines of the voucher.

Simple Voucher
product

Defines of the product.

Simple Product
sku

Defines of the sku.

Simple Sku
loyalty_tier_id
string

Unique loyalty tier ID assigned by Voucherify.

id
string

Unique reward ID, assigned by Voucherify.

Example:

rew_nIy4gHpQHle2c3pNMwuj7G6j

object
string

The type of the object represented by the JSON. This object stores information about the reward.

Available values: reward
name
string

Reward name.

created_at
string

Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.

Example:

2022-08-11T14:49:22.586Z

updated_at
string, null

Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.

Example:

2022-08-11T16:01:34.885Z

parameters
object

Defines how the reward is generated.

type
string

Reward type.

Available values: CAMPAIGN, COIN, MATERIAL

Simple Referral Tier

AttributesDescription
id
string

Unique referral tier ID.

Example:

seg_DNAOhUtJffvX0f57ajLMFBYR

campaign_id
string

Campaign Id.

banner
string

Text to be displayed to your customers on your website.

parameters
object

Referral tier parameters

Loyalty Tier

All of:

  1. Loyalty Tier Base
  2. AttributesDescription
    id
    string

    Unique loyalty tier ID.

    campaign_id
    string

    Unique parent campaign ID.

    metadata
    object, null

    The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format.

    created_at
    string

    Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.

    updated_at
    string, null

    Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.

    config
    object

    Defines loyalty tier range in points.

    AttributesDescription
    points
    object

    Defines range of loyalty tier in points.

    AttributesDescription
    from
    integer

    Bottom points threshold value.

    to
    integer

    Top points threshold value.

    expirationSee: Loyalty Tier Expiration
    object
    string

    The type of the object represented by JSON. This object stores information about the loyalty.

    Available values: loyalty_tier

Earning Rule

All of:

  1. EarningRuleBase
  2. AttributesDescription
    validation_rule_id
    string, null

    A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance.

    updated_at
    string, null

    Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.

    active
    boolean

    A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date.

    • true indicates an active earning rule
    • false indicates an inactive earning rule

Order Calculated

All of:

  1. Order Response Base
  2. Order Calculated

    AttributesDescription
    customerOne of: Customer Id
    referrerOne of: Referrer Id

Voucher Transaction

AttributesDescription
id
string

Unique transaction ID.

source_id
string, null

The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null.

voucher_id
string

Unique voucher ID.

campaign_id
string

Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes.

source
string, null

The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null.

reason
string, null

Reason why the transaction occurred. In case of a redemption, this value is null.

type

Type of transaction.

LoyaltyCardTransactionsType
details
object

Contains the detailed information about the transaction.

AttributesDescription
balance
object

Contains information on how the balance was affected by the transaction.

AttributesDescription
type
string

The type of voucher whose balance is being adjusted due to the transaction.

Available values: loyalty_card
total
integer

The number of all points accumulated on the card as affected by add or subtract operations.

object
string

The type of the object represented by the JSON.

Available values: balance
points
integer

Points added or subtracted in the transaction.

balance
integer

The available points on the card after the transaction as affected by redemption or rollback.

related_object
object

Defines the resource that is being modified with the values that are returned in the balance object.

AttributesDescription
id
string

Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API.

type
string

The object being modified, i.e. voucher.

Available values: voucher
order
object

Contains information about the original order.

AttributesDescription
id
string

Unique order ID.

source_id
string

The merchant’s order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service.

event
object

Contains information about the event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of event.

earning_rule
object

Contains information about the earning rule.

AttributesDescription
id
string

Unique earning rule ID.

source
object

Contains the custom earning rule name.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

segment
object

Contains information about the segment.

AttributesDescription
id
string
name
string
loyalty_tier
object

Contains information about the loyalty tier.

AttributesDescription
id
string
name
string
redemption
object

Contains information about the original redemption.

AttributesDescription
id
string

Unique redemption ID.

rollback
object

Contains information about the redemption rollback.

AttributesDescription
id
string

Unique redemption rollback ID.

custom_event
object

Contains information about the custom event that triggers the point accrual.

AttributesDescription
id
string

Unique event ID.

type
string

Type of custom event.

event_schema
object

Contains information about the custom event metadata schema.

AttributesDescription
id
string

Unique metadata schema ID.

name
string

Type of custom event.

reward
object

Contains information about the pay with points reward.

AttributesDescription
id
string

Unique reward ID.

name
string

Reward name.

source_voucher

Contains information on how the balance on the donor loyalty card was affected by the transaction.

Simple Voucher
destination_voucher

Contains information on how the balance on the receiving loyalty card was affected by the transaction.

Simple Voucher
related_transaction_id
string, null

The related transaction ID on the receiving card.

created_at
string

Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format.

Valid Single Voucher

All of:

  1. List Publications Item Base
  2. AttributesDescription
    result
    string

    Status of the publication attempt.

    Available values: SUCCESS
    voucherSee: List Publications Item Voucher

Validation Entity

AttributesDescription
id
string

Unique validation id.

session_id
string

Unique session id.

status
string

The validation status

Available values: VALID, INVALID
created_at
string

Timestamp representing the date and time when the validation was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

customer_id
string

Unique customer ID of the customer making the purchase.

Example:

cust_7iUa6ICKyU6gH40dBU25kQU1

redeemables
array

Lists validation results of each redeemable.

Array of Applicable Redeemable
skipped_redeemables
array

Lists validation results of each redeemable.

Array of Inapplicable Redeemable
inapplicable_redeemables
array

Lists validation results of each redeemable.

Array of Skipped Redeemable

Event Customer Redemption

AttributesDescription
customerSee: Simple Customer
orderSee: Simple Order
campaignSee: Simple Campaign
voucherSee: Simple Voucher
holderSee: Simple Customer
promotion_tierSee: Simple Promotion Tier
promotion_stackSee: Simple Promotion Stack
redemptionSee: Simple Redemption

Simple Redemption

AttributesDescription
id
string

Unique redemption ID.

Example:

r_0bc92f81a6801f9bca

customer_id
string, null

Unique customer ID of the redeeming customer.

Example:

cust_i8t5Tt6eiKG5K79KQlJ0Vs64

tracking_id
string

Hashed customer source ID.

date
string

Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

Example:

10000

orderSee: Simple Order
rewardSee: Simple Redemption Reward Result
customerSee: Simple Customer
result
string

Redemption result.

Available values: SUCCESS, FAILURE
voucher

Defines the details of the voucher being redeemed.

Simple Voucher
promotion_tierSee: Simple Promotion Tier
redemption
string

Unique redemption ID of the parent redemption.

Example:

r_0c656311b5878a2031

object
string

The type of the object represented by the JSON. This object stores information about the redemption.

Event Customer Consents

AttributesDescription
customerSee: Simple Customer
consents
array
Array of Simple Consent

Event Customer Order

AttributesDescription
customerSee: Simple Customer
referrerSee: Simple Customer
orderSee: Order Calculated
redemptionSee: Redemption Internal

Event Customer Reward Redemptions

AttributesDescription
customerSee: Simple Customer
holderSee: Simple Customer
voucherSee: Simple Voucher
campaignSee: Simple Campaign
reward_redemption
object
rewardSee: Simple Redemption Reward Result
reward_assignmentSee: Reward Assignment
source
string
balance
integer

Event Customer Loyalty Tier Base

AttributesDescription
customerSee: Simple Customer
campaignSee: Simple Campaign

Customer Summary

AttributesDescription
redemptionsSee: Customer Summary Redemptions
ordersSee: Customer Summary Orders

Customer Loyalty

AttributesDescription
points
integer

Customer's loyalty points.

referred_customers
integer

Total number of customers referred by the customer.

campaigns
object

Contains campaigns with details about point balances and how many customers were referred by the customer.

AttributesDescription
[propertyName]
object

Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.

AttributesDescription
points
integer

Remaining point balance in campaign.

loyalty_tier
string

Customer's loyalty tier within the campaign.

Example:

ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x

referred_customers
integer

Number of customers referred by the customer in campaign.

Customer Referrals

AttributesDescription
total
integer

Total number of times this customer received a referral, i.e. was referred by another customer.

campaigns
array

Contains an array of campaigns that served as the source of a referral for the customer.

Array of:

Customer Referrals Campaigns Item

AttributesDescription
campaign_id
string

Unique campaign ID, assigned by Voucherify.

Example:

camp_rRsfatlwN7unSeUIJDCYedal

referrer_id
string

Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer.

Example:

cust_sehkNIi8Uq2qQuRqSr7xn4Zi

related_object_id
string

Related object id

Example:

r_0b9d4cc4aa164dd073

related_object_type
string

Related object type, i.e. redemption.

date
string

Timestamp representing the date and time when the customer was referred in ISO 8601 format.

Example:

2022-08-30T10:19:39.196Z

Customer Base

AttributesDescription
name
string

Customer's first and last name.

description
string

An arbitrary string that you can attach to a customer object.

email
string

Customer's email address.

phone
string

Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.

birthday
string

Deprecated. Customer's birthdate; format YYYY-MM-DD.

birthdate
string

Customer's birthdate; format YYYY-MM-DD.

address
object, null

Customer's address.

AttributesDescription
city
string

City

state
string

State

line_1
string

First line of address.

line_2
string

Second line of address.

country
string

Country.

postal_code
string

Postal code.

metadata
object

A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.

Simple Campaign Voucher

AttributesDescription
type
string

Type of the voucher.

Available values: DISCOUNT_VOUCHER, LOYALTY_CARD, GIFT_VOUCHER
discount

Defines the voucher discount type and details.

Discount
gift

Defines the voucher gift details.

Gift
loyalty_card

Defines the voucher loyalty card details.

Campaign Loyalty Card
redemption
object

Defines the redemption limits on vouchers.

AttributesDescription
quantity
integer, null

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

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

code_configSee: Code Config Required Length Charset Pattern

Lucky Draw

AttributesDescription
winners_count
string

It represents the total number of winners in a lucky draw.

unique_winners_per_draw
string

It indicates whether each winner in a draw is unique or not.

unique_winners
string

Specifies whether each participant can win only once across multiple draws.

Referral Program

AttributesDescription
conversion_event_type
string

Define how a referral is triggered.

Available values: redemption, custom_event
custom_event
object

Contains details about the custom event.

AttributesDescription
id
string

Unique custom event ID.

Example:

ms_Ll9enAm2BCN0M1s4VxWobLFM

name
string

Custom event name.

referee_reward
object

Defines the referee reward.

AttributesDescription
related_object_parent
object

Details of the resource from which the reward originates.

AttributesDescription
id
string

Unique ID of the reward source.

Example:

camp_kdxp3vf1clQ9CFs1jpqv3tZe

name
string

Name of the reward source.

object
string

Type of resource represented by the source of the reward.

Available values: CAMPAIGN
type
string

Type of reward.

Available values: DISCOUNT_VOUCHER, LOYALTY_CARD, GIFT_VOUCHER, LUCKY_DRAW_CODE
amount
string

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.

Category

AttributesDescription
id
string

Unique category ID assigned by Voucherify.

name
string

Category name.

hierarchy
integer

Category hierarchy.

object
string

The type of the object represented by the JSON. This object stores information about the category.

Available values: category
created_at
string

Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.

Example:

2022-07-14T10:45:13.156Z

updated_at
string

Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.

Example:

2022-08-16T10:52:08.094Z

stacking_rules_type
string

The type of the stacking rule eligibility.

Available values: JOINT, EXCLUSIVE

Gift

AttributesDescription
amount
number

Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

balance
number

Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS

Discount

Contains information about discount.

One of:

Amount, Unit, Unit Multiple, Percent, Fixed

Simple Loyalty Card

AttributesDescription
points
integer

Total points incurred over lifespan of loyalty card.

balance
integer

Points available for reward redemption.

next_expiration_date
string

The next closest date when the next set of points are due to expire.

next_expiration_points
integer

The amount of points that are set to expire next.

Customer Object Required Object Type

AttributesDescription
id
string

The unique ID of a customer that is assigned by Voucherify.

Example:

cust_CSnYd37MXmrbS19XCrghjBsv

source_id
string

The merchant’s customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service.

name
string

Customer's first and last name.

email
string

Customer's email address.

metadata
object

A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.

object
string

The type of the object represented by the JSON. This object stores information about the customer.

Redemption Reward Result

AttributesDescription
customerSimple Customer
assignment_id
string, null

Unique reward assignment ID assigned by Voucherify.

voucher

Defines of the voucher.

Voucher
product

Defines of the product.

Product
sku

Defines of the sku.

SKU Object
loyalty_tier_id
string, null

Unique loyalty tier ID assigned by Voucherify.

id
string

Unique reward ID.

Example:

rew_0bc92f81a6801f9bca

name
string

Name of the reward.

Example:

Reward Name

object
string

The type of the object represented by the JSON

Available values: reward
created_at
string

Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

updated_at
string

Timestamp in ISO 8601 format indicating when the reward was updated.

Example:

2022-10-03T12:24:58.008Z

parameters
object

These are parameters representing a material reward.

AttributesDescription
campaign
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Campaign unique ID.

Example:

camp_13BbZ0kQsNinhqsX3wUts2UP

balance
integer

Points available for reward redemption.

type
string

Defines the type of the campaign.

product
object

Defines the product redeemed as a reward.

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

Example:

prod_0b7d7dfb05cbe5c616

sku_id
string

A unique SKU ID assigned by Voucherify.

Example:

sku_0a41e31c7b41c28358

coin
object

Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.

AttributesDescription
exchange_ratio
integer

The cash equivalent of the points defined in the points_ratio property.

points_ratio
integer

The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property.

type
string

Reward type.

Available values: CAMPAIGN, COIN, MATERIAL

Voucher

AttributesDescription
id
string

Assigned by the Voucherify API, identifies the voucher.

Example:

v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV

code
string

A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters.

Example:

WVPblOYX

campaign
string

A unique campaign name, identifies the voucher's parent campaign.

Example:

Gift Card Campaign

campaign_id
string

Assigned by the Voucherify API, identifies the voucher's parent campaign.

Example:

camp_FNYR4jhqZBM9xTptxDGgeNBV

category
string

Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint.

category_id
string

Unique category ID assigned by Voucherify.

Example:

cat_0bb343dee3cdb5ec0c

categories
array

Contains details about the category.

Array of Category
type
string

Defines the type of the voucher.

Available values: GIFT_VOUCHER, DISCOUNT_VOUCHER, LOYALTY_CARD
discountSee: Discount
gift
object

Object representing gift parameters. Child attributes are present only if type is GIFT_VOUCHER. Defaults to null.

AttributesDescription
amount
integer

Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

Example:

10000

balance
integer

Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.

Example:

500

effect
string

Defines how the credits are applied to the customer's order.

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS
loyalty_card
object

Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD. Defaults to null.

AttributesDescription
points
integer

Total points incurred over lifespan of loyalty card.

Example:

7000

balance
integer

Points available for reward redemption.

Example:

6970

next_expiration_date
string

The next closest date when the next set of points are due to expire.

Example:

2023-05-30

next_expiration_points
integer

The amount of points that are set to expire next.

start_date
string

Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.

Example:

2021-12-01T00:00:00.000Z

expiration_date
string

Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.

Example:

2021-12-31T00:00:00.000Z

validity_timeframe
object

Set recurrent time periods when the voucher is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.

AttributesDescription
duration
string

Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a duration of PT1H will be valid for a duration of one hour.

Example:

PT1H

interval
string

Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an interval of P2D will be active every other day.

Example:

P2D

validity_day_of_week
array

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_hoursSee: Validity Hours
active
boolean, null

A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date.

  • true indicates an active voucher
  • false indicates an inactive voucher
additional_info
string

An optional field to keep any extra textual information about the code such as a code description and details.

metadata
object

The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format.

assetsSee: Voucher Assets
is_referral_code
boolean, null

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

created_at
string

Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

updated_at
string

Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.

Example:

2021-12-22T10:14:45.316Z

holder_id
string

Unique identifier of the customer who owns the voucher.

Example:

cust_eWgXlBBiY6THFRJwX45Iakv4

referrer_id
string

Unique identifier of the referring person.

Example:

cust_Vzck5i8U3OhcEUFY6MKhN9Rv

object
string

The type of the object represented by JSON. Default is voucher.

validation_rules_assignmentsSee: Validation Rules Assignments List
publish
object

This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event. A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or publish voucher API method.

RequiredOptional
type:LOYALTY_CARDtype:DISCOUNT_VOUCHER
is_referral_code:truetype:GIFT_VOUCHER
AttributesDescription
object
string

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

count
integer

Publication events counter.

Example:

0

url
string

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

Example:

/v1/vouchers/WVPblOYX/publications?page=1&limit=10

redemption
object

Stores a summary of redemptions that have been applied to the voucher.

AttributesDescription
quantity
integer

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

redeemed_quantity
integer

How many times a voucher has already been redeemed.

Example:

1

redeemed_points
integer

Total loyalty points redeemed.

Example:

100000

object
string

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

url
string

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

Example:

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

Voucher Holder

AttributesDescription
holderSee: Simple Customer

Promotion Tier

AttributesDescription
id
string

Unique promotion tier ID.

Example:

promo_63fYCt81Aw0h7lzyRkrGZh9p

created_at
string

Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format.

Example:

2021-12-15T11:34:01.333Z

updated_at
string

Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format.

Example:

2022-02-09T09:20:05.603Z

name
string

Name of the promotion tier.

banner
string

Text to be displayed to your customers on your website.

action
object

Contains details about the discount applied by the promotion tier.

AttributesDescription
discountSee: Discount
metadata
object

The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format.

hierarchy
integer

The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy.

promotion_id
string

Promotion unique ID.

campaign
object

Contains details about promotion tier's parent campaign.

AttributesDescription
id
string

Unique campaign ID.

start_date
string

Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive before this date.

Example:

2022-09-22T00:00:00.000Z

expiration_date
string

Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is inactive after this date.

Example:

2022-09-30T00:00:00.000Z

validity_timeframe
object

Recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.

AttributesDescription
interval
string

Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an interval of P2D will be active every other day.

duration
string

Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a duration of P1D will be valid for a duration of one day.

validity_day_of_week
array

Integer array corresponding to the particular days of the week in which the campaign is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
validity_hoursSee: Validity Hours
active
boolean

A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the start_date and expiration_date using the Disable Campaign endpoint.

  • true indicates an active campaign
  • false indicates an inactive campaign
category_id
string

Unique category ID that this campaign belongs to.

Example:

cat_0b688929a2476386a6

object
string

The type of the object represented by the campaign object. This object stores information about the campaign.

campaign_id
string

Promotion tier's parent campaign's unique ID.

active
boolean

A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the start_date and expiration_date.

  • true indicates an active promotion tier
  • false indicates an inactive promotion tier
start_date
string

Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is inactive before this date.

Example:

2022-09-23T00:00:00.000Z

expiration_date
string

Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is inactive after this date.

Example:

2022-09-26T00:00:00.000Z

validity_timeframe
object

Set recurrent time periods when the promotion tier is valid. For example, valid for 1 hour every other day.start_date required when including the validity_timeframe.

AttributesDescription
interval
string

Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an interval of P2D will be active every other day.

duration
string

Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a duration of P1D will be valid for a duration of one day.

validity_day_of_week
array

Integer array corresponding to the particular days of the week in which the promotion tier is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
validity_hoursSee: Validity Hours
summary
object

Contains statistics about promotion tier redemptions and orders.

AttributesDescription
redemptions
object

Contains statistics about promotion tier redemptions.

AttributesDescription
total_redeemed
integer

Number of times the promotion tier was redeemed.

orders
object

Contains statistics about orders related to the promotion tier.

AttributesDescription
total_amount
integer

Sum of order totals.

total_discount_amount
integer

Sum of total discount applied using the promotion tier.

object
string

The type of the object represented by JSON. This object stores information about the promotion tier.

validation_rule_assignmentsSee: Validation Rule Assignments List
category_id
string

Promotion tier category ID.

Example:

cat_0c9da30e7116ba6bba

categories
array
Array of Category

Simple Product

AttributesDescription
id
string

Unique product ID.

source_id
string

Product source id.

name
string

Product name.

Simple Sku

AttributesDescription
id
string

Unique sku ID.

source_id
string

Sku source id.

sku
string

Sku name.

Loyalty Tier Base

AttributesDescription
name
string

Loyalty Tier name.

earning_rules
object

Contains a list of earning rule IDs and their points mapping for the given earning rule.

AttributesDescription
[propertyName]See: MappingPoints
rewards
object

Contains a list of reward IDs and their points mapping for the given reward.

AttributesDescription
[propertyName]See: MappingPoints
points
object

Defines range of loyalty tier in points.

AttributesDescription
from
integer

Bottom points threshold value.

to
integer

Top points threshold value.

Loyalty Tier Expiration

AttributesDescription
customer_id
string

Unique customer ID of the customer making the purchase.

Example:

cust_7iUa6ICKyU6gH40dBU25kQU1

campaign_id
string

Unique campaign ID, assigned by Voucherify.

Example:

camp_rRsfatlwN7unSeUIJDCYedal

tier_id
string

Unique tier ID, assigned by Voucherify.

start_date
string

Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date.

expiration_date
string

Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date.

created_at
string

Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

updated_at
string

Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

EarningRuleBase

AttributesDescription
id
string

Assigned by the Voucherify API, identifies the earning rule object.

created_at
string

Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format.

loyaltyOne of: Define fixed amount of points, Calculate points proportionally
event

Defines the event which triggers the earning rule to add points to a loyalty card.

Earning Rule Event
custom_event
object
AttributesDescription
schema_id
string
segment
object

Contains the ID of a customer segment. Required for the customer.segment.entered option in event.

AttributesDescription
id
string

Contains a unique identifier of a customer segment. Assigned by the Voucherify API.

source
object

Contains the custom earning rule name and parent campaign.

AttributesDescription
banner
string

Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard.

object_id
string

A unique campaign identifier assigned by the Voucherify API.

object_type
string

Defines the object associated with the earning rule. Defaults to campaign.

Available values: campaign
object
string

The type of the object represented by JSON. Default is earning_rule.

Available values: earning_rule
automation_id
string

For internal use by Voucherify.

start_date
string

Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default.

expiration_date
string

Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default.

validity_timeframe
object

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.

AttributesDescription
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
array

Integer array corresponding to the particular days of the week in which the earning rule is valid.

  • 0 Sunday
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
validity_hoursSee: Validity Hours
metadata
object

The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format.

Order Response Base

AttributesDescription
id
string

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

source_id
string, null

Unique source ID of an existing order that will be linked to the redemption of this request.

created_at
string

Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.

Example:

2021-12-22T10:13:06.487Z

updated_at
string, null

Timestamp representing the date and time when the order was last updated in ISO 8601 format.

Example:

2021-12-22T10:14:45.316Z

status
string

The order status.

Available values: CREATED, PAID, CANCELED, FULFILLED
amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

initial_amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

discount_amount
integer

Sum of all order-level discounts applied to the order.

items_discount_amount
integer

Sum of all product-specific discounts applied to the order.

total_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied to the order.

total_amount
integer

Order amount after undoing all the discounts through the rollback redemption.

applied_discount_amount
integer

This field shows the order-level discount applied.

items_applied_discount_amount
integer

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

total_applied_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

items
array

Array of items applied to the order.

Array of Order Item Calculated
metadata
object

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.

customer_id
string, null

Unique customer ID of the customer making the purchase.

Example:

cust_7iUa6ICKyU6gH40dBU25kQU1

referrer_id
string, null

Unique referrer ID.

Example:

cust_nM4jqPiaXUvQdVSA6vTRUnix

object
string

The type of the object represented by JSON.

Available values: order
redemptions
object
AttributesDescription
[propertyName]See: Order Redemptions

Customer Id

AttributesDescription
id
string

A unique identifier of an existing customer.

object
string

The type of the object represented by JSON.

Available values: customer

Referrer Id

Customer Id

LoyaltyCardTransactionsType

Available values: POINTS_ACCRUAL, POINTS_CANCELLATION, POINTS_REDEMPTION, POINTS_REFUND, POINTS_ADDITION, POINTS_REMOVAL, POINTS_EXPIRATION, POINTS_TRANSFER_IN, POINTS_TRANSFER_OUT

List Publications Item Base

AttributesDescription
id
string

Unique publication ID, assigned by Voucherify.

Example:

pub_BbjAXnmm8e0SIm3zG8qvvFCP0KuLywtp

object
string

The type of the object represented by the JSON. This object stores information about the publication.

Available values: publication
created_at
string

Timestamp representing the date and time when the publication was created. The value is shown in the ISO 8601 format.

Example:

2022-09-23T09:57:00.434Z

customer_id
string

Unique customer ID of the customer receiving the publication.

Example:

cust_eWgXlBBiY6THFRJwX45Iakv4

tracking_id
string

Customer's source_id.

metadata
object

The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format.

AttributesDescription
source_type
string

Defines the type of the distribution source.

source_id
string

Unique identifier of the distribution source.

distribution_id
string

Unique identifier of the distribution.

channel
string

How the publication was originated. It can be your own custom channel or an example value provided here.

source_id
string, null

The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service.

customerSee: Customer With Summary Loyalty Referrals
vouchers_id
array

Contains the unique internal voucher ID that was assigned by Voucherify.

List Publications Item Voucher

AttributesDescription
code
string

Voucher code.

object
string

The type of the object represented by JSON.

Available values: voucher
campaign
string

Campaign name

gift

Gift object response

Gift
loyalty_card
object

Defines the loyalty card details.

discountSee: Discount
is_referral_code
boolean

Flag indicating whether this voucher is a referral code; true for campaign type REFERRAL_PROGRAM.

Applicable Redeemable

AttributesDescription
status
string

Indicates whether the redeemable can be applied or not applied based on the validation rules.

Available values: APPLICABLE
id
string

Redeemable ID, i.e. the voucher code.

object
string

Redeemable's object type.

Available values: voucher, promotion_tier
orderSee: Order Calculated
applicable_toSee: Applicable To Result List
inapplicable_toSee: Inapplicable To Result List
result

Specifies the redeemable's end effect on the order. This object is unique to each type of redeemable.

One of: Coupon Code, Gift Card, Loyalty Card, Redeemable Result Promotion Tier, Promotion Stack
metadata
object

The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable.

categories
array
Array of Category

Inapplicable Redeemable

AttributesDescription
status
string

Indicates whether the redeemable can be applied or not applied based on the validation rules.

Available values: INAPPLICABLE
id
string

Redeemable ID, i.e. the voucher code.

object
string

Redeemable's object type.

Available values: voucher, promotion_tier
result
object
AttributesDescription
errorSee: Error Object

Skipped Redeemable

AttributesDescription
status
string

Indicates whether the redeemable can be applied or not applied based on the validation rules.

Available values: SKIPPED
id
string

Redeemable ID, i.e. the voucher code.

object
string

Redeemable's object type.

Available values: voucher, promotion_tier
result
object
AttributesDescription

Simple Order

AttributesDescription
id
string

Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.

source_id
string

Unique source ID of an existing order that will be linked to the redemption of this request.

status
string

The order status.

Available values: CREATED, PAID, CANCELED, FULFILLED
customer_id
string, null

Unique customer ID of the customer making the purchase.

Example:

cust_7iUa6ICKyU6gH40dBU25kQU1

referrer_id
string, null

Unique referrer ID.

Example:

cust_nM4jqPiaXUvQdVSA6vTRUnix

amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

discount_amount
integer

Sum of all order-level discounts applied to the order.

applied_discount_amount
integer

This field shows the order-level discount applied.

items_discount_amount
integer

Sum of all product-specific discounts applied to the order.

items_applied_discount_amount
integer

Sum of all product-specific discounts applied in a particular request.
sum(items, i => i.applied_discount_amount)

total_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied to the order.

total_applied_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

total_amount
integer

Order amount after undoing all the discounts through the rollback redemption.

items
array

Array of items applied to the order.

Array of Simple Order Item
metadata
object

A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.

object
string

The type of the object represented by JSON.

Available values: order

Simple Promotion Tier

AttributesDescription
id
string

Unique promotion tier ID.

Example:

promo_63fYCt81Aw0h7lzyRkrGZh9p

name
string

Name of the promotion tier.

banner
string

Text to be displayed to your customers on your website.

campaign
object

Contains details about promotion tier's parent campaign.

AttributesDescription
id
string

Unique campaign ID.

metadata
object

A set of custom key/value pairs that you can attach to a promotion tier. The metadata object stores all custom attributes assigned to the promotion tier.

Simple Promotion Stack

AttributesDescription
id
string

Unique identifier of the promotion stack.

name
string

Name of the promotion stack.

category_id
string

Unique identifier of the category of the promotion stack.

campaign
object

Represents simplified promotion stack campaign data.

AttributesDescription
id
string

Unique identifier of the campaign.

tiers
object

Contains the tier configuration.

AttributesDescription
ids
array

Contains the list of tiers in a pre-defined sequence.

hierarchy_mode
string
Available values: MANUAL

Simple Consent

AttributesDescription
id
string
name
string
object
string
Available values: consent

Reward Assignment

All of:

  1. Reward Assignment Base
  2. Digital or Material Reward - Parameters

Customer Summary Redemptions

AttributesDescription
total_redeemed
integer

Total number of redemptions made by the customer.

total_failed
integer

Total number of redemptions that failed.

total_succeeded
integer

Total number of redemptions that succeeded.

total_rolled_back
integer

Total number of redemptions that were rolled back for the customer.

total_rollback_failed
integer

Total number of redemption rollbacks that failed.

total_rollback_succeeded
integer

Total number of redemption rollbacks that succeeded.

gift
object

Summary of gift card credits.

AttributesDescription
redeemed_amount
integer

Total amount of gift card credits redeemed by customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

amount_to_go
integer

Remaining gift card balance across all gift cards. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

loyalty_card
object

Summary of loyalty points.

AttributesDescription
redeemed_points
integer

Total number of loyalty points redeemed by the customer.

points_to_go
integer

Sum of remaining available point balance across all loyalty cards.

Customer Summary Orders

AttributesDescription
total_amount
integer

The total amount spent by the customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

total_count
integer

Total number of orders made by the customer.

average_amount
integer

Average amount spent on orders. total_amount ÷ total_count. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

last_order_amount
integer

Amount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

last_order_date
string

Timestamp representing the date and time of the customer's last order in ISO 8601 format.

Example:

2022-08-30T11:51:08.029Z

Campaign Loyalty Card

AttributesDescription
points
integer

The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card.

expiration_rules
object
AttributesDescription
period_type
string

Type of period

period_value
integer

Value of the period

rounding_type
string

Type of rounding

rounding_value
integer

Value of rounding

Code Config Required Length Charset Pattern

Code Config

Amount

AttributesDescription
type
string

Defines the type of the voucher.

Available values: AMOUNT
amount_off
number

Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000.

amount_off_formula
string
aggregated_amount_limit
integer

Maximum discount amount per order.

effect

Defines how the discount is applied to the customer's order.

Discount Amount Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Unit

AttributesDescription
type
string

Discount type.

Available values: UNIT
unit_off
integer

Number of units to be granted a full value discount.

unit_off_formula
string
effect

Defines how the unit is added to the customer's order.

Discount Unit Vouchers Effect Types
unit_type
string

The product deemed as free, chosen from product inventory (e.g. time, items).

product

Contains information about the product.

Simple Product Discount Unit
skuSee: Simple Sku Discount Unit
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Unit Multiple

AttributesDescription
type
string

Discount type.

Available values: UNIT
effect
string

Defines how the discount is applied to the customer's order.

Available values: ADD_MANY_ITEMS
units
array
Array of One Unit

Percent

AttributesDescription
type
string

Defines the type of the voucher.

Available values: PERCENT
percent_off
number

The percent discount that the customer will receive.

percent_off_formula
string
amount_limit
number

Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.

aggregated_amount_limit
integer

Maximum discount amount per order.

effect

Defines how the discount is applied to the customer's order.

Discount Percent Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Fixed

AttributesDescription
type
string

Defines the type of the voucher.

Available values: FIXED
fixed_amount
number

Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the fixed_amount_formula parameter is present in the fixed amount definition, this value becomes the fallback value. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value.

fixed_amount_formula
string
effect

Defines how the discount is applied to the customer's order.

Discount Fixed Vouchers Effect Types
is_dynamic
boolean

Flag indicating whether the discount was calculated using a formula.

Product

This is an object representing a product.

This entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.

All of:

  1. Product without Skus Object
  2. AttributesDescription
    skusSee: Skus List For Product

SKU Object

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

Example:

sku_0b1621b319d248b79f

source_id
string, null

A unique SKU identifier from your inventory system.

Example:

sku_source_id_4

product_id
string

The parent product's unique ID.

Example:

prod_0b15f6b9f650c16990

sku
string, null

Unique user-defined SKU name.

Example:

Large Pink Shirt

price
integer, null

Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000.

currency
string, null

SKU price currency.

Example:

USD

attributes
object

The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.

image_url
string, null

The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.

metadata
object

The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format.

created_at
string

Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.

Example:

2022-05-17T10:36:30.187Z

updated_at
string, null

Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.

Example:

2022-05-17T10:55:09.137Z

object
string

The type of the object represented by JSON. This object stores information about the SKU.

Available values: sku

Validity Hours

AttributesDescription
daily
array

Defines the reccuring period(s) when the resource is active. The periods should not overlap.

Array of:
AttributesDescription
start_time
string

Defines the starting hour of validity in the HH:mm format. The resource is inactive before this time.

Example:

12:00

days_of_week
array

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

Defines the ending hour of validity in the HH:mm format. The resource is inactive after this time.

Example:

14:00

Voucher Assets

AttributesDescription
qr
object

Stores Quick Response (QR) representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==

url
string

URL to QR code

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D

barcode
object

Stores barcode representation of encrypted code.

AttributesDescription
id
string

Encrypted voucher code ID.

Example:

U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==

url
string

URL to barcode

Optional: Attach query parameters to base URL to customize the image of the encrypted voucher code.

  • size: integer value from 1 to 100
  • format: string, either png (default) or svg
Example:

https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D

Validation Rules Assignments List

AttributesDescription
object
string

The type of the object represented by JSON. This object stores information about validation rules assignments.

Available values: list
data_ref
string

Identifies the name of the attribute that contains the array of validation rules assignments.

Available values: data
data
array

Contains array of validation rules assignments.

Array of Business Validation Rule Assignment
total
integer

Total number of validation rules assignments.

Validation Rule Assignments List

AttributesDescription
object
string

The type of the object represented by JSON. This object stores information about validation rule assignments.

data_ref
string

Identifies the name of the JSON property that contains the array of validation rule assignments.

data
array

A dictionary that contains an array of validation rule assignments.

Array of Validation Rule Assignment
total
integer

Total number of validation rule assignments.

MappingPoints

One of:

MappingMultiply, MappingFixed

Define fixed amount of points

AttributesDescription
type
string

The number of points to be added to the loyalty card.

Available values: FIXED
points
integer

Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points.

Calculate points proportionally

One of:

Order, Order Items, Customer Metadata, Earning Rule Proportional Custom Event

Earning Rule Event

Available values: order.paid, customer.segment.entered, custom_event, customer.loyalty.tier.upgraded, customer.loyalty.tier.downgraded, customer.loyalty.tier.prolonged, customer.loyalty.tier.joined, customer.loyalty.tier.left

Order Item Calculated

AttributesDescription
sku_id
string

A unique SKU ID assigned by Voucherify.

product_id
string

A unique product ID assigned by Voucherify.

related_object
string

Used along with the source_id property, can be set to either sku or product.

Available values: product, sku
source_id
string

The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

quantity
integer

The quantity of the particular item in the cart.

discount_quantity
integer

Number of dicounted items.

initial_quantity
integer

A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.

amount
integer

The total amount of the order item (price * quantity).

discount_amount
integer

Sum of all order-item-level discounts applied to the order.

applied_discount_amount
integer

This field shows the order-level discount applied.

initial_amount
integer

A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.

total_applied_discount_amount
integer

Sum of all order-level AND all product-specific discounts applied in a particular request.
total_applied_discount_amount = applied_discount_amount + items_applied_discount_amount

price
integer

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

subtotal_amount
integer

Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the amount.
subtotal_amount=amount-applied_discount_amount

product
object

An object containing details of the related product.

AttributesDescription
id
string

A unique identifier that represents the product and is assigned by Voucherify.

source_id
string

The merchant’s product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

name
string

Product name.

metadata
object

A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format.

price
number

Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

sku
object

An object containing details of the related SKU.

AttributesDescription
id
string

A unique identifier that represents the SKU and is assigned by Voucherify.

source_id
string

The merchant’s SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.

override
boolean

The override set to true is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system.

sku
string

The SKU name.

price
number

SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).

object
string

The type of the object represented by JSON.

Available values: order_item
metadata
object

A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format.

Order Redemptions

AttributesDescription
date
string

Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.

Example:

2022-09-02T17:06:56.649Z

rollback_id
string

Unique ID of the redemption rollback.

Example:

rr_0c63c84eb78ee0a6c0

rollback_date
string

Timestamp representing the date and tiem when the redemption rollback was created. The value is shown in the ISO 8601 format.

Example:

2023-01-31T14:18:37.150Z

related_object_type
string

The source of the incentive.

related_object_id
string

Unique ID of the parent redemption.

Example:

r_0ba186c4824e4881e1

related_object_parent_id
string

Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign.

stacked
array

Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.

rollback_stacked
array

Lists the rollback redemption IDs of the particular child redemptions.

Applicable To Result List

AttributesDescription
data
array

Contains array of items to which the discount can apply.

Array of Applicable To
total
integer

Total number of objects defining included products, SKUs, or product collections.

object
string

The type of the object represented by JSON.

Available values: list
data_ref
string

The type of the object represented by JSON.

Available values: data

Inapplicable To Result List

AttributesDescription
data
array

Contains array of items to which the discount cannot apply.

Array of Inapplicable To
total
integer

Total number of objects defining included products, SKUs, or product collections.

object
string

The type of the object represented by JSON.

Available values: list
data_ref
string

The type of the object represented by JSON.

Available values: data

Coupon Code

AttributesDescription
discount

Discount details about the type of discount to be applied for the redeemable.

One of: Amount, Unit, Unit Multiple, Percent, Fixed

Gift Card

AttributesDescription
gift
object

Stores the amount of gift card credits to be applied in the redemption.

AttributesDescription
credits
integer

Total number of gift card credits to be applied in the redemption expressed as the smallest currency unit (e.g. 100 cents for $1.00).

Loyalty Card

AttributesDescription
loyalty_card
object

Stores the amount of loyalty card points to be applied in the redemption.

AttributesDescription
points
integer

Total number of loyalty points to be applied in the redemption.

Redeemable Result Promotion Tier

AttributesDescription
discount

Discount details about the type of discount to be applied for the redeemable.

One of: Amount, Unit, Unit Multiple, Percent, Fixed

Promotion Stack

AttributesDescription
loyalty_card
object

Stores the amount of loyalty card points to be applied in the redemption.

AttributesDescription
points
integer

Total number of loyalty points to be applied in the redemption.

Error Object

AttributesDescription
code
integer

Error's HTTP status code.

key
string

Short string describing the kind of error which occurred.

message
string

A human-readable message providing a short description about the error.

details
string

A human-readable message providing more details about the error.

request_id
string

This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team.

Example:

v-0a885062c80375740f

resource_id
string

Unique resource ID that can be used in another endpoint to get more details.

Example:

rf_0c5d710a87c8a31f86

resource_type
string

The resource type.

Example:

voucher

Simple Order Item

AttributesDescription
object
string

The type of the object represented by JSON. This object stores information about the order_item.

Available values: order_item
source_id
string

The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.

related_object
string

Used along with the source_id property, can be set to either sku or product.

Available values: product, sku
product_id
string

A unique product ID assigned by Voucherify.

sku_id
string

A unique SKU ID assigned by Voucherify.

quantity
integer

The quantity of the particular item in the cart.

discount_quantity
integer

Number of dicounted items.

amount
integer

The total amount of the order item (price * quantity).

discount_amount
integer

Sum of all order-item-level discounts applied to the order.

applied_discount_amount
integer

This field shows the order-level discount applied.

price
integer

Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example 10000 cents for $100.00.

Reward Assignment Base

AttributesDescription
id
string

Unique reward assignment ID, assigned by Voucherify.

Example:

rewa_PbIRoMXpwe5QhobW4JKu0VjH

reward_id
string

Associated reward ID.

Example:

rew_C7wS9eHFDN4CIbXI5PpLSkGY

created_at
string

Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format.

Example:

2022-08-11T14:49:22.586Z

updated_at
string, null

Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format.

Example:

2022-08-11T16:01:34.885Z

object
string

The type of the object represented by the JSON. This object stores information about the reward assignment.

Available values: reward_assignment
related_object_id
string

Related object ID to which the reward was assigned.

Example:

camp_wciTvaOfYmAa3EmIIW3QpXXZ

related_object_type
string

Related object type to which the reward was assigned.

Available values: campaign

Digital or Material Reward - Parameters

AttributesDescription
parameters
object

Defines the cost of the reward.

AttributesDescription
loyalty
object

Defines the equivalent points value of the reward.

AttributesDescription
points
integer

The number of points required to redeem the reward.

Code Config

AttributesDescription
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

The initial count

Discount Amount Vouchers Effect Types

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

Discount Unit Vouchers Effect Types

Available values: ADD_MISSING_ITEMS, ADD_NEW_ITEMS, ADD_MANY_ITEMS

Simple Product Discount Unit

AttributesDescription
id
string

Unique product ID, assigned by Voucherify.

source_id
string

Product's source ID.

name
string

Product name.

Simple Sku Discount Unit

AttributesDescription
id
string

Unique SKU ID, assigned by Voucherify.

source_id
string

Product variant's source ID.

name
string

Sku name

One Unit

AttributesDescription
unit_off
number

Number of units to be granted a full value discount.

unit_off_formula
string
effect
string

Defines how the unit is added to the customer's order.

Available values: ADD_NEW_ITEMS, ADD_MISSING_ITEMS
unit_type
string

The product deemed as free, chosen from product inventory (e.g. time, items).

product

Contains information about the product.

Simple Product Discount Unit
sku

Contains information about the sku.

Simple Sku Discount Unit

Discount Percent Vouchers Effect Types

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS

Discount Fixed Vouchers Effect Types

Available values: APPLY_TO_ORDER, APPLY_TO_ITEMS

Product without Skus Object

AttributesDescription
id
string

Unique product ID assigned by Voucherify.

Example:

prod_0b1da8105693710357

source_id
string, null

Unique product source ID.

Example:

productSourceID16

name
string, null

Unique user-defined product name.

Example:

T-shirt

price
integer, null

Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as $100.00 being expressed as 10000.

attributes
array

A list of product attributes whose values you can customize for given SKUs: ["color","size","ranking"]. Each child SKU can have a unique value for a given attribute.

metadata
object

The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.

image_url
string, null

The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.

Example:

https://images.com/original.jpg

created_at
string

Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.

Example:

2022-05-23T06:52:55.008Z

updated_at
string, null

Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.

Example:

2022-05-23T09:24:07.405Z

object
string

The type of the object represented by JSON. This object stores information about the product.

Available values: product

Skus List For Product

AttributesDescription
object
string

The type of the object represented by JSON. This object stores information about SKUs.

data_ref
string

Identifies the name of the JSON property that contains the array of SKUs.

data
array

A dictionary that contains an array of SKUs.

Array of SKU Object
total
integer

Total number of SKUs in the product.

Business Validation Rule Assignment

AttributesDescription
id
string

The unique identifier for a assignment

rule_id
string

The unique identifier for a rule

related_object_id
string

The unique identifier for a related object

related_object_type
string

The type of related object

created_at
string

Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.

Example:

2022-03-09T11:19:04.819Z

updated_at
string

Timestamp representing the date and time when the object was last updated in ISO 8601 format.

Example:

2022-03-09T11:19:04.819Z

object
string

The type of the object represented by JSON.

Available values: validation_rules_assignment
validation_status
string

The validation status of the assignment

Available values: VALID, PARTIALLY_VALID, INVALID
validation_omitted_rules
array

The list of omitted rules

Validation Rule Assignment

AttributesDescription
id
string

Validation rule assignment ID.

Example:

asgm_74F7QZoYbUoljwQO

rule_id
string

Validation rule ID.

Example:

val_4j7DCRm2IS59

related_object_id
string

The resource ID to which the validation rule was assigned.

Example:

v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT

related_object_type
string

The type of resource to which the validation rule was assigned.

Available values: voucher, campaign, earning_rule, reward_assignment, promotion_tier, distribution
created_at
string

Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.

Example:

2022-02-17T08:18:15.085Z

object
string

The type of the object represented by the ID.

Available values: validation_rules_assignment

MappingMultiply

AttributesDescription
type
string

Type of calculation.

Available values: MULTIPLY
multiplier
number

Multiplication factor used to multiply the points to obtain the mapped points.

MappingFixed

AttributesDescription
type
string

Type of calculation.

Available values: CUSTOM
points
integer

Fixed number of points to be applied.

Order

One of:

Order Amount, Order Total Amount, Order Metadata

Order Items

One of:

Order Items Quantity, Order Items Amount, Order Items Subtotal Amount

Customer Metadata

AttributesDescription
type
string

Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.

Available values: PROPORTIONAL
calculation_type
string

CUSTOMER_METADATA: Customer Metadata (X points for every Y in metadata attribute, defined in the property key under the customer.metadata object)

Available values: CUSTOMER_METADATA
customer
object
AttributesDescription
metadata
object

Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.

AttributesDescription
every
integer

For how many increments of the customer metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Customer metadata property.

Earning Rule Proportional Custom Event

AttributesDescription
type
string

Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.

Available values: PROPORTIONAL
calculation_type
string

CUSTOM_EVENT_METADATA: Custom event metadata (X points for every Y in metadata attribute).

Available values: CUSTOM_EVENT_METADATA
custom_event
object
AttributesDescription
metadata
object

Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.

AttributesDescription
every
integer

For how many increments of the customer metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Custom event metadata property.

Applicable To

AttributesDescription
object
string

This object stores information about the product collection.

Available values: product, sku, products_collection
id
string

Unique product collection ID assigned by Voucherify.

source_id
string

The source ID from your inventory system.

product_id
string

Parent product's unique ID assigned by Voucherify.

product_source_id
string

Parent product's source ID from your inventory system.

strict
boolean
price
number

New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price.

price_formula
number

Formula used to calculate the discounted price of an item.

effect

Defines how the discount is applied to the customer's order.

Applicable To Effect
quantity_limit
integer

The maximum number of units allowed to be discounted per order line item.

aggregated_quantity_limit
integer

The maximum number of units allowed to be discounted combined across all matched order line items.

amount_limit
integer

Upper limit allowed to be applied as a discount per order line item. 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. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:

  • APPLY_TO_ITEMS (each item subtotal is discounted equally)
  • APPLY_TO_ITEMS_BY_QUANTITY (each unit of matched products has the same discount value)
order_item_indices
array

Inapplicable To

Applicable To

Order Amount

AttributesDescription
type
string

Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.

Available values: PROPORTIONAL
calculation_type
string

ORDER_AMOUNT: Pre-discount order amount (X points for every Y spent excluding discounts)

Available values: ORDER_AMOUNT
order
object
AttributesDescription
amount
object

Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

Order Total Amount

AttributesDescription
type
string

Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.

Available values: PROPORTIONAL
calculation_type
string

ORDER_TOTAL_AMOUNT: Total order amount (X points for every Y spent including discount)

Available values: ORDER_TOTAL_AMOUNT
order
object
AttributesDescription
total_amount
object

Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

Order Metadata

AttributesDescription
type
string

Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.

Available values: PROPORTIONAL
calculation_type
string

ORDER_METADATA: Order Metadata (X points for every Y in metadata attribute, defined in the property key under the order.metadata object)

Available values: ORDER_METADATA
order
object

Defines the formula for calculating points proportionally.

AttributesDescription
metadata
object

Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.

AttributesDescription
every
integer

For how many increments of the order metadata property to grant points for.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

property
string

Order metadata property.

Order Items Quantity

AttributesDescription
type
string

Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.

Available values: PROPORTIONAL
calculation_type
string

ORDER_ITEMS_QUANTITY: Quantity of items defined in order_items.quantity.object & .id (X points for every Y items excluding free items)

Available values: ORDER_ITEMS_QUANTITY
order_items
object
AttributesDescription
quantity
object

Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

Order Items Amount

AttributesDescription
type
string

Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.

Available values: PROPORTIONAL
calculation_type
string

ORDER_ITEMS_AMOUNT; Pre-discount amount spent on items defined in the order_items.amount.object & .id (X points for every Y spent on items excluding discounts)

Available values: ORDER_ITEMS_AMOUNT
order_items
object
AttributesDescription
amount
object

Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

Order Items Subtotal Amount

AttributesDescription
type
string

Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio.

Available values: PROPORTIONAL
calculation_type
string

ORDER_ITEMS_SUBTOTAL_AMOUNT; Amount spent on items defined in the order_items.subtotal_amount.object & .id (X points for every Y spent on items including discounts)

Available values: ORDER_ITEMS_SUBTOTAL_AMOUNT
order_items
object
AttributesDescription
subtotal_amount
object

Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.

AttributesDescription
every
integer

Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000.

points
integer

Number of points to be awarded, i.e. how many points to be added to the loyalty card.

object
string

Type of object taken under consideration.

Available values: products_collection, product, sku
id
string

Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619.

Applicable To Effect

Available values: APPLY_TO_EVERY, APPLY_TO_CHEAPEST, APPLY_TO_MOST_EXPENSIVE