curl --request POST \
--url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/qualifications \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"customer": {
"source_id": "customerSourceID",
"metadata": {
"reason": "loyaltyQualifications"
}
},
"order": {
"source_id": "ord_113628fa0685537f99",
"metadata": {
"source": "qualifyPoints"
}
}
}
'{
"campaign": {
"id": "camp_6hAtKbSF3iMj8wN8HjlvPuQG",
"name": "Loyalty-campaign",
"object": "campaign"
},
"points_estimation": 51
}Estimates the number of points a customer will receive for a given order in the loyalty campaign under its earning rules.
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.
curl --request POST \
--url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/qualifications \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"customer": {
"source_id": "customerSourceID",
"metadata": {
"reason": "loyaltyQualifications"
}
},
"order": {
"source_id": "ord_113628fa0685537f99",
"metadata": {
"source": "qualifyPoints"
}
}
}
'{
"campaign": {
"id": "camp_6hAtKbSF3iMj8wN8HjlvPuQG",
"name": "Loyalty-campaign",
"object": "campaign"
},
"points_estimation": 51
}Authorizations
Path Parameters
Unique campaign ID of the loyalty program.
"camp_rRsfatlwN7unSeUIJDCYedal"
Body
Provide customer source_id and order source_id.
Response
Returns campaign details and estimated number of points.
Response body schema for estimating loyalty points for an order with POST /loyalties/{campaignId}/qualifications.
Was this page helpful?

