3b11e1670d61

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

Preview Order Rewards

Preview everything an order would earn before checkout: the order cashback quote (identical calculation to Calculate Order Cashback) plus a preview of the event-based campaigns the order would trigger (evaluated as the same place_order event a real order submission fires).

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.

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 eventRewards.campaigns[].campaignName. Cashback campaignName values use the campaign's internal name and are not affected by lang.

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

Headers

langstring

Language code for localized campaign names in eventRewards.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

The customer's unique ID. The cashback part works without it (quote for a new customer); the campaigns part requires an existing customer — see customerFound.

emailstring

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

mobilestring

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

totalPaidnumber required

Amount actually paid.

totalPricenumber

Order total before discounts.

totalDiscountnumber

Total discount applied.

totalShippingnumber

Shipping total.

totalTaxnumber

Tax total.

channelstring

Order channel (e.g. web, pos, mobile).

extraobject

Custom key/value attributes — usable in campaign conditions.

Example request

{
  "customerId": "1214",
  "totalPaid": 90,
  "totalPrice": 100,
  "totalDiscount": 10,
  "lineItems": [
    {
      "productId": "P-100",
      "sku": "SKU-100",
      "title": "Running Shoes",
      "quantity": 1,
      "price": 100,
      "discount": 10,
      "category": [
        "shoes"
      ]
    }
  ],
  "channel": "web"
}

Response

Order reward preview calculated successfully

customerIdstring

Echo of the request.

customerFoundboolean

false when the customer does not exist or is inactive. The cashback quote is still returned; eventRewards is null (campaign eligibility can't be evaluated without an existing customer).

totalPointsinteger

Grand total: cashback points + points from event campaigns the order would achieve now.

totalCouponsinteger

Number of coupons the order's event campaigns would grant (one per achievement of a coupon-reward campaign).