Loyalties

Estimate loyalty points

Estimates the number of points a customer will receive for a given order in the loyalty campaign under its earning rules. This endpoint also returns point estimation for created transactions (orders with status PAID)

This endpoint returns only an estimation, not a precise point value.

Also, this estimation works only for the Order paid earning rules. If a campaign includes tiers, mappings, and multiple earning rules, the calculation becomes more complex. During final calculation, a customer may change tiers and earn more or fewer points depending on other factors.

post/v1/loyalties/{campaignId}/qualifications

Request

  • Base URL
    https://api.voucherify.io
  • URL
    https://api.voucherify.io/v1/loyalties/{campaignId}/qualifications
  • Auth
    • API key in header X-App-Id and API key in header X-App-Token
    • or OAuth 2
      Implicit: https://api.voucherify.io/v1/oauth/token
      Scopes: api, loyalties

Request body

Example request

{
  "order": {
    "customer_id": "cust_7iUa6ICKyU6gH40dBU25kQU1",
    "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
  }
}

Response

Returns campaign details and estimated number of points.

points_estimationinteger required

The calculated estimation of points based on the order data and loyalty campaign's earning rules.

Changes

No recorded changes to this operation across all 1 revision of this API.