Order Object

Order Calculated

All of:

  1. Order Response Base
  2. Order Calculated

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 in 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 object represented by JSON.

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

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 in ISO 8601 format.

    Example:

    2022-08-30T06:32:07.380Z

    updated_at
    string

    Timestamp representing the date and time when the customer was updated in 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 object represented by JSON.

    Available values: customer
  2. Customer Base

Customer Id

AttributesDescription
id
string

A unique identifier of an existing customer.

object
string

The type of object represented by JSON.

Available values: customer

Referrer With Summary Loyalty Referrals

Customer With Summary Loyalty Referrals

Referrer Id

Customer Id

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

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.

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