This schema defines the comprehensive structure of an order used for loyalty operations (such as program validation or redemption).
1. Order
OrderThe 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:
|
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
CustomerDetails about the customer placing the order.
| Field | Type | Nullable | Description |
|---|---|---|---|
email | string | Yes | The customer's email address. |
phoneNumber | string | Yes | The customer's phone number. |
loyaltyProviderCustomerId | string | Yes | The customer's unique identifier within the loyalty provider's system. |
name | string | Yes | The customer's full name. |
3. Item
ItemDetails for individual items within the order. This schema is recursive, supporting nested items (e.g., modifiers).
| Field | Type | Nullable | Description |
|---|---|---|---|
plu | string | No | The Product Look-Up code for the item. |
name | string | No | The display name of the item. |
price | number | No | The 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. |
quantity | number | No | The quantity of the item in the order. |
subItems | array of objects | No | A list of child items or modifiers (recursive Item structure). |
4. Discount
DiscountDetails for discounts applied to the entire order or specific items.
| Field | Type | Nullable | Description |
|---|---|---|---|
name | string | No | The name or title of the discount for display purposes. |
programId | string | No | The ID of the loyalty program that generated this discount. |
type | string (enum) | No | The classification of the discount. See Supported Discount Types bellow. |
amount | number | Yes | The 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 Type | Value | Category | Description |
|---|---|---|---|
| Order Percentage Off | order_percent_off | Order-Level | A percentage discount applied to the subtotal of the entire order. |
| Order Flat Off | order_flat_off | Order-Level | A fixed monetary amount discount applied to the subtotal of the entire order. |
| Item Percentage Off | item_percent_off | Item-Level | A percentage discount applied to a specific item or group of items in the basket. |
| Item Flat Off | item_flat_off | Item-Level | A fixed monetary amount discount applied to a specific item or group of items in the basket. |
| Item Buy One Get One Free | item_bogof | Item-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 Free | item_free | Item-Level (Promotional) | A discount used to set the price of a specific item to zero (a free item). |
| Wallet Cash | wallet_cash | Source-Specific | A discount generated by redeeming the customer's cash or stored value balance from their loyalty wallet. |
| Compensation Card | compensation_card | Source-Specific | A discount generated from a compensation, gift, or store credit card. |
