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
OrderThe primary object representing the entire order.
Field | Type | Nullable | Deprecated | Description |
|---|---|---|---|---|
|
| No | No | The unique identifier for the merchant account. |
|
| No | Yes | (DEPRECATED) Use |
|
| No | No | The unique identifier linking the channel to the account/location. |
|
| No | No | The unique identifier for the specific location/store where the order was placed. |
|
| No | Yes | (DEPRECATED) Use |
|
| No | No | The type of delivery (e.g., pickup, delivery). Options are:
|
|
| No | No | The final amount paid by the customer. |
|
| No | No | Details about the customer who placed the order. See |
|
| Yes | No | Timestamp of when the order was created. May be |
|
| Yes | No | The order ID displayed to the customer on the channel. |
|
| Yes | No | The system's unique identifier for the order. |
|
| No | No | A list of all items included in the order. See |
|
| Yes | No | The total price of all items before taxes and discounts. |
|
| Yes | No | The total tax applied to the order. |
|
| Yes | No | The total value of all discounts applied to the order. |
|
| No | No | A list of all applied discounts. See |
|
| No | No | The number of decimal places used for currency precision. Default is |
Charges | ||||
|
| Yes | No | Any service fee applied to the order. |
|
| Yes | No | The cost of delivery. |
|
| Yes | No | Any fee applied for packaging or bags. |
|
| Yes | No | The customer-provided tip. |
|
| Yes | No | The tip specifically allocated for the driver. |
|
| 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). |
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. |