Loyalty Order Schema

This schema defines the comprehensive structure of an order used for loyalty operations (such as program validation or redemption).

1. Order

The primary object representing the entire order.

FieldTypeNullableDeprecatedDescription
accountIdstringNoNoThe unique identifier for the merchant account.
accountstringNoYes(DEPRECATED) Use accountId instead.
channelLinkIdstringNoNoThe unique identifier linking the channel to the account/location.
locationIdstringNoNoThe unique identifier for the specific location/store where the order was placed.
locationstringNoYes(DEPRECATED) Use locationId instead.
orderTypeinteger (enum)NoNoThe type of delivery (e.g., pickup, delivery). Options are:
  • Unknown: 0
  • Pickup: 1
  • Delivery: 2
  • EatIn: 3
  • Curbside: 4
paymentAmountnumberNoNoThe final amount paid by the customer.
customerobjectNoNoDetails about the customer who placed the order. See Customer.
createdstring (datetime)YesNoTimestamp of when the order was created. May be null in some initial API calls (e.g., get programs).
channelOrderDisplayIdstringYesNoThe order ID displayed to the customer on the channel.
orderIdstringYesNoThe system's unique identifier for the order.
itemsarray of objectsNoNoA list of all items included in the order. See GenericLoyaltyOrderItem.
subTotalnumberYesNoThe total price of all items before taxes and discounts.
taxTotalnumberYesNoThe total tax applied to the order.
discountTotalnumberYesNoThe total value of all discounts applied to the order.
discountsarray of objectsNoNoA list of all applied discounts. See Discount.
decimalDigitsnumberNoNoThe number of decimal places used for currency precision. Default is 2.
Charges
serviceChargenumberYesNoAny service fee applied to the order.
deliveryCostnumberYesNoThe cost of delivery.
bagFeenumberYesNoAny fee applied for packaging or bags.
tipnumberYesNoThe customer-provided tip.
driverTipnumberYesNoThe tip specifically allocated for the driver.
smallOrderFeenumberYesNoAny fee applied for not meeting a minimum order threshold.

2. Customer

Details about the customer placing the order.

FieldTypeNullableDescription
emailstringYesThe customer's email address.
phoneNumberstringYesThe customer's phone number.
loyaltyProviderCustomerIdstringYesThe customer's unique identifier within the loyalty provider's system.
namestringYesThe customer's full name.

3. Item

Details for individual items within the order. This schema is recursive, supporting nested items (e.g., modifiers).

FieldTypeNullableDescription
plustringNoThe Product Look-Up code for the item.
namestringNoThe display name of the item.
pricenumberNoThe base price of the item (before any item-specific discounts) It will be sent as an integer with 2 decimal digits e.g. 1 euro would be sent as 100.
quantitynumberNoThe quantity of the item in the order.
subItemsarray of objectsNoA list of child items or modifiers (recursive Item structure).

4. Discount

Details for discounts applied to the entire order or specific items.

FieldTypeNullableDescription
namestringNoThe name or title of the discount for display purposes.
programIdstringNoThe ID of the loyalty program that generated this discount.
typestring (enum)NoThe classification of the discount. See Supported Discount Types bellow.
amountnumberYesThe monetary value of the discount (in the smallest currency unit). For percentage discounts, the value 3033 represents a percent discount of 30.33%

4.1 Supported Discount Types

The following table lists the supported DiscountType values used across the loyalty system, categorized by the level at which the discount is applied.

Discount TypeValueCategoryDescription
Order Percentage Offorder_percent_offOrder-LevelA percentage discount applied to the subtotal of the entire order.
Order Flat Offorder_flat_offOrder-LevelA fixed monetary amount discount applied to the subtotal of the entire order.
Item Percentage Offitem_percent_offItem-LevelA percentage discount applied to a specific item or group of items in the basket.
Item Flat Offitem_flat_offItem-LevelA fixed monetary amount discount applied to a specific item or group of items in the basket.
Item Buy One Get One Freeitem_bogofItem-Level (Promotional)A promotional discount where the price of one or more items is reduced, typically to zero, based on the purchase of other items.
Item Freeitem_freeItem-Level (Promotional)A discount used to set the price of a specific item to zero (a free item).
Wallet Cashwallet_cashSource-SpecificA discount generated by redeeming the customer's cash or stored value balance from their loyalty wallet.
Compensation Cardcompensation_cardSource-SpecificA discount generated from a compensation, gift, or store credit card.