Loyalty Order Schema

This schema defines the comprehensive structure of an order used for loyalty operations (such as program validation or redemption). All currency values are represented as integers in the smallest currency unit (e.g., cents).

1. Order

The primary object representing the entire order.

Field

Type

Nullable

Deprecated

Description

accountId

string

No

No

The unique identifier for the merchant account.

account

string

No

Yes

(DEPRECATED) Use accountId instead.

channelLinkId

string

No

No

The unique identifier linking the channel to the account/location.

locationId

string

No

No

The unique identifier for the specific location/store where the order was placed.

location

string

No

Yes

(DEPRECATED) Use locationId instead.

orderType

integer (enum)

No

No

The type of delivery (e.g., pickup, delivery). Options are:

  • Unknown: 0
  • Pickup: 1
  • Delivery: 2
  • EatIn: 3
  • Curbside: 4

paymentAmount

number

No

No

The final amount paid by the customer.

customer

object

No

No

Details about the customer who placed the order. See Customer.

created

string (datetime)

Yes

No

Timestamp of when the order was created. May be null in some initial API calls (e.g., get programs).

channelOrderDisplayId

string

Yes

No

The order ID displayed to the customer on the channel.

orderId

string

Yes

No

The system's unique identifier for the order.

items

array of objects

No

No

A list of all items included in the order. See GenericLoyaltyOrderItem.

subTotal

number

Yes

No

The total price of all items before taxes and discounts.

taxTotal

number

Yes

No

The total tax applied to the order.

discountTotal

number

Yes

No

The total value of all discounts applied to the order.

discounts

array of objects

No

No

A list of all applied discounts. See Discount.

decimalDigits

number

No

No

The number of decimal places used for currency precision. Default is 2.

Charges

serviceCharge

number

Yes

No

Any service fee applied to the order.

deliveryCost

number

Yes

No

The cost of delivery.

bagFee

number

Yes

No

Any fee applied for packaging or bags.

tip

number

Yes

No

The customer-provided tip.

driverTip

number

Yes

No

The tip specifically allocated for the driver.

smallOrderFee

number

Yes

No

Any 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).
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.