Vincent is here! Just say the word, and Vincent will build the campaigns for you! Get early access.
curl --request POST \
--url https://api.voucherify.io/v2/loyalties/examine \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"event": "customer.order.paid",
"customer_identification": {
"type": "customer_id",
"customer_id": "<string>",
"customer_source_id": "<string>",
"member_id": "<string>"
},
"customer_order_paid": {
"customer": {
"metadata": {}
},
"member": {
"metadata": {}
},
"order": {
"amount": 123,
"initial_amount": 123,
"discount_amount": 123,
"metadata": {},
"items": [
{
"id": "<string>",
"source_id": "<string>",
"product_id": "<string>",
"sku_id": "<string>",
"related_object": "product",
"amount": 123,
"discount_amount": 123,
"quantity": 123,
"price": 123,
"product": {
"id": "<string>",
"source_id": "<string>",
"price": 123
},
"sku": {
"id": "<string>",
"source_id": "<string>",
"price": 123
},
"metadata": {}
}
]
}
}
}
'{
"event": "<string>",
"memberships": [
{
"member": {
"id": "<string>",
"customer_id": "<string>",
"program_id": "<string>",
"status": "ACTIVE",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"program": {
"id": "<string>",
"name": "<string>",
"status": "DRAFT",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"cards": [
{
"card": {
"id": "<string>",
"card_definition_id": "<string>",
"card_type": "<string>",
"code": "<string>",
"object": "<string>"
},
"points_estimation": 123
}
],
"incentives": [
{
"id": "<string>",
"name": "<string>",
"type": "DIGITAL",
"status": "<string>",
"object": "incentive"
}
],
"object": "member_earning_opportunity"
}
],
"object": "earnings_examine_result"
}⚠️ BETA endpoint
This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.
Performs a dry-run estimation of points and incentives a customer (or member) would earn for a given event, without actually triggering any earning rule processing or modifying balances.
curl --request POST \
--url https://api.voucherify.io/v2/loyalties/examine \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"event": "customer.order.paid",
"customer_identification": {
"type": "customer_id",
"customer_id": "<string>",
"customer_source_id": "<string>",
"member_id": "<string>"
},
"customer_order_paid": {
"customer": {
"metadata": {}
},
"member": {
"metadata": {}
},
"order": {
"amount": 123,
"initial_amount": 123,
"discount_amount": 123,
"metadata": {},
"items": [
{
"id": "<string>",
"source_id": "<string>",
"product_id": "<string>",
"sku_id": "<string>",
"related_object": "product",
"amount": 123,
"discount_amount": 123,
"quantity": 123,
"price": 123,
"product": {
"id": "<string>",
"source_id": "<string>",
"price": 123
},
"sku": {
"id": "<string>",
"source_id": "<string>",
"price": 123
},
"metadata": {}
}
]
}
}
}
'{
"event": "<string>",
"memberships": [
{
"member": {
"id": "<string>",
"customer_id": "<string>",
"program_id": "<string>",
"status": "ACTIVE",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"program": {
"id": "<string>",
"name": "<string>",
"status": "DRAFT",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"cards": [
{
"card": {
"id": "<string>",
"card_definition_id": "<string>",
"card_type": "<string>",
"code": "<string>",
"object": "<string>"
},
"points_estimation": 123
}
],
"incentives": [
{
"id": "<string>",
"name": "<string>",
"type": "DIGITAL",
"status": "<string>",
"object": "incentive"
}
],
"object": "member_earning_opportunity"
}
],
"object": "earnings_examine_result"
}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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Trigger event. Currently supported: customer.order.paid or order.paid.
"customer.order.paid"
Discriminated union identifying who is being evaluated.
Show child attributes
Event-specific payload for customer.order.paid containing context for rule evaluation.
Show child attributes
Was this page helpful?