latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-107844420.7 KB

3b11e1670d61

Events

Preview Event Rewards

Returns the points and coupon rewards a customer would earn if the given event(s) fired now. Intended for custom events (the same events you send to Send Events). For orders, use Preview Order Rewards instead.

This is a read-only quote — no points are awarded, no coupons are generated, nothing appears in the customer activity history, and campaign budgets or frequency limits are not consumed.

Unlike the live events endpoint, the preview never creates the customer — unknown or inactive customers return an error.

Security: Requires apiKey header. secretKey is required on v4.1; on v4.0 required when High Security Mode is enabled.

Localization: Send the optional lang header to localize campaigns[].campaignName.

post/api/v4.0/integrations/events/reward-preview

Headers

langstring

Language code for localized campaign names in campaigns[] (e.g., en, ar, fr). If omitted or not configured in your account, the response falls back to your account's default language.

Request body

customerIdstring required

The customer's unique ID in your system. Must be an existing, active customer.

emailstring

Used only to help locate the customer (channel merge).

mobilestring

Used only to help locate the customer (channel merge).

eventsobject required

One entry per event to preview: the key is the event name, the value is that event's metadata object (or {} / null if none).

Example request

{
  "customerId": "1214",
  "events": {
    "add_review": {
      "rating": 5
    }
  }
}

Response

Event reward preview calculated successfully

customerIdstring

Echo of the request.

totalPointsinteger

Sum of points across all previewed events.