Skip to main content
POST
Estimate loyalty points

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required

Scopes

api

Gives access to whole server-side API.

loyalties

Gives access to all endpoints and methods starting with /v1/loyalties.

Path Parameters

campaignId
string
required

Unique campaign ID of the legacy loyalty campaign.

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

Body

application/json

Provide customer source_id and order source_id.

Request body schema for estimating loyalty points for an order with POST /loyalties/{campaignId}/qualifications.

customer
Customer · object
required
order
object
required

Details regarding the order being processed. You can provide either source_id of an existing order or an inline order/cart object (for example amount, items, or metadata). When both are provided, inline order data takes precedence.

Response

Returns campaign details and estimated number of points.

Response body schema for estimating loyalty points for an order with POST /loyalties/{campaignId}/qualifications.

campaign
object
required

Details about the campaign associated with the estimation.

points_estimation
integer
required

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