Skip to main content
POST
/
v1
/
loyalties
/
{campaignId}
/
qualifications
Estimate loyalty points
curl --request POST \
  --url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/qualifications \
  --header 'Authorization: Bearer <token>' \
  --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

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

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

campaignId
string
required

Unique campaign ID of the loyalty program.

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.

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 loyalty campaign's earning rules.

Last modified on December 15, 2025