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 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.
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
}Documentation Index
Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Path Parameters
Unique campaign ID of the loyalty program.
"camp_rRsfatlwN7unSeUIJDCYedal"
Body
Provide customer source_id and order source_id.
Request body schema for estimating loyalty points for an order with POST /loyalties/{campaignId}/qualifications.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
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?

