Skip to main content
Example
{
  "external_id": "100",
  "subtotal": 200,
  "grand_total": 230,
  "rewardable_total": 200,
  "external_created_at": "2023-11-19T21:19:30.559Z",
  "external_updated_at": "2023-12-03T11:17:35.159Z",
  "payment_status": "paid",
  "coupons": [
    {
      "code": "5off-j2n5jduwjttj"
    }
  ],
  "customer": {}
}
When sending order events to Smile, the following fields are used to represent and describe the order.
external_id
string
The unique id of the order in your system. This should never change for a given order.
subtotal
number
The order’s subtotal (before tax, discounts, shipping, etc).
grand_total
number
The order’s grand total (including tax, discounts, shipping, etc).
rewardable_total
number
The value of the order that should be rewarded with points. This should be less than or equal to the grand_total. If you have products that should not be rewarded, you can deduct them from the rewardable_total so they are not given points. If we receive a negative value for rewardable_total we will change it to 0 as we don’t support a negative rewardable_total.
external_created_at
string<date-time>
The date the order was created in your system.
external_updated_at
string<date-time>
The date the order was last updated in your system.
payment_status
string
The status of the order’s payment, which determines whether rewards will be issued or revoked. Possible values:
  • paid - The order has been paid and should be rewarded.
  • refunded - The order has been refunded and any rewards should be revoked.
  • null - The order has yet to be paid and should not yet be rewarded.
coupons
array
An array of coupons that were used on the order. Used for tracking referrals and loyalty program ROI metrics. Each coupon object in the array contains a code field (string) representing the coupon code.
customer
object
The customer that placed the order. If the order was placed by a guest, set this value to null. The customer object should contain the customer’s information (see the custom customer object for details).