Skip to main content
curl --request POST \
  --url https://api.smile.io/v1/events/ \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer {token}' \
  --data '
{
  "event": {
    "topic": "order/updated",
    "data": {
      "external_id": "100",
      "subtotal": 200,
      "grand_total": 230,
      "rewardable_total": 200,
      "external_created_at": "2015-11-19T21:19:30.559Z",
      "external_updated_at": "2015-12-03T11:17:35.159Z",
      "payment_status": "paid",
      "coupons": [
        {
          "code": "5off-j2n5jduwjttj"
        },
        {
          "code": "SUMMER_SHIPPING_16"
        }
      ],
      "customer": {
        "external_id": "100",
        "first_name": "Wayne",
        "last_name": "Rooney",
        "email": "[email protected]",
        "external_created_at": "2015-11-19T21:19:30.559Z",
        "external_updated_at": "2015-11-19T21:19:30.559Z"
      }
    }
  }
}'
Send this event any time an order is created or updated. This would include when an order has been shipped, refunded, cancelled, etc. All order properties should be filled when sending this type of event. When sending orders for guest customers, specify the customer as null.
It’s important that you send order events for both logged-in and guest orders, as Smile’s system requires this data to accurately track referrals and other ROI and loyalty metrics.
This endpoint requires the scope.