curl --request POST \
--url https://{cluster}.voucherify.io/v1/campaigns/qualification \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"customer": {
"source_id": "source-id",
"metadata": {
"key": "value"
}
},
"order": {
"amount": 10000,
"items": [
{
"product_id": "product-id",
"quantity": "1",
"price": 10000,
"related_object": "product",
"product": {
"metadata": {
"key": "value"
}
}
}
]
},
"metadata": {
"key": "value"
}
}
'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
"name": "<string>",
"description": "<string>",
"campaign_type": "GIFT_VOUCHERS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 100,
"amount_off_formula": "<string>",
"aggregated_amount_limit": 123,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": 123
},
"code_config": {
"length": "<string>",
"charset": "<string>",
"prefix": "<string>",
"postfix": "<string>",
"pattern": "<string>"
},
"is_referral_code": true
},
"auto_join": true,
"join_once": true,
"use_voucher_metadata_schema": true,
"validity_timeframe": {
"duration": "PT1H",
"interval": "P2D"
},
"validity_day_of_week": [
0
],
"validity_hours": {
"daily": [
{
"start_time": "12:00",
"days_of_week": [
0
],
"expiration_time": "14:00"
}
]
},
"activity_duration_after_publishing": "<string>",
"vouchers_count": 123,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"active": true,
"metadata": {},
"created_at": "2021-12-01T08:00:50.038Z",
"updated_at": "2022-09-20T09:18:19.623Z",
"category": "<string>",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": true,
"validation_rules_assignments": {
"object": "list",
"data_ref": "data",
"data": [
{
"id": "asgm_N7t39epaQR2SkQcW",
"rule_id": "val_ssbxf1L9aKri",
"related_object_id": "camp_AaP9MC1Y0GpBII84UTIuasvb",
"related_object_type": "campaign",
"created_at": "2022-02-14T15:12:06.817Z",
"object": "validation_rules_assignment",
"rule": {}
}
],
"total": 123
},
"category_id": "cat_0b688929a2476386a7",
"categories": {
"id": "<string>",
"name": "<string>",
"hierarchy": 1,
"object": "category",
"created_at": "2022-07-14T10:45:13.156Z",
"updated_at": "2022-08-16T10:52:08.094Z"
},
"object": "campaign",
"referral_program": {
"conversion_event_type": "redemption",
"custom_event": {
"id": "ms_fi47Dcu5T0m3v3nT5ch3ma",
"name": "<string>"
},
"referee_reward": {
"related_object_parent": {
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"type": "LOYALTY_CARD",
"amount": "<string>"
}
}
}
],
"total": 123,
"id": "qfl_dNZ3gWfKVNa8Zw15hn30uqdU",
"created_at": "2023-04-04T13:13:03.119Z",
"tracking_id": "<string>"
}Examine Campaign Qualification
This endpoint represents the deprecated version of the API responsible for qualification, and we do not recommend using it. The new Qualifications API introduces additional features and improvements while maintaining backward compatibility. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.
The method can be used for sending a request to display all campaigns qualified to the given customer and context (e.g., order).
The maximum number of returned campaigns is 50.
What campaign types are included in the response?
DISCOUNT_COUPONSGIFT_VOUCHERSREFERRAL_PROGRAM
What’s excluded?
A checking logic will be run only among campaigns and will ignore generic (standalone) vouchers. For generic (standalone) vouchers, you should run a dedicated endpoint for searching and identifing vouchers.
Subsequent Steps
As a recommended subsequent step after selecting a qualified campaign is to publish a voucher code from that campaign. The API method for publishing will return a unique code which will belong to a given customer.
Sample use case
As a sample use case, you can imagine a requirement of displaying coupons (grouped in campaigns) that a customer is eligible to use. The customer should get assigned to the particular voucher from the campaign and then may redeem that particular code when he/she places an order.
Read about Qualification API limits before you start.
curl --request POST \
--url https://{cluster}.voucherify.io/v1/campaigns/qualification \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"customer": {
"source_id": "source-id",
"metadata": {
"key": "value"
}
},
"order": {
"amount": 10000,
"items": [
{
"product_id": "product-id",
"quantity": "1",
"price": 10000,
"related_object": "product",
"product": {
"metadata": {
"key": "value"
}
}
}
]
},
"metadata": {
"key": "value"
}
}
'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
"name": "<string>",
"description": "<string>",
"campaign_type": "GIFT_VOUCHERS",
"type": "AUTO_UPDATE",
"voucher": {
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "AMOUNT",
"amount_off": 100,
"amount_off_formula": "<string>",
"aggregated_amount_limit": 123,
"effect": "APPLY_TO_ORDER"
},
"redemption": {
"quantity": 123
},
"code_config": {
"length": "<string>",
"charset": "<string>",
"prefix": "<string>",
"postfix": "<string>",
"pattern": "<string>"
},
"is_referral_code": true
},
"auto_join": true,
"join_once": true,
"use_voucher_metadata_schema": true,
"validity_timeframe": {
"duration": "PT1H",
"interval": "P2D"
},
"validity_day_of_week": [
0
],
"validity_hours": {
"daily": [
{
"start_time": "12:00",
"days_of_week": [
0
],
"expiration_time": "14:00"
}
]
},
"activity_duration_after_publishing": "<string>",
"vouchers_count": 123,
"start_date": "2022-09-20T00:00:00.000Z",
"expiration_date": "2022-09-30T00:00:00.000Z",
"active": true,
"metadata": {},
"created_at": "2021-12-01T08:00:50.038Z",
"updated_at": "2022-09-20T09:18:19.623Z",
"category": "<string>",
"creation_status": "DONE",
"vouchers_generation_status": "DONE",
"protected": true,
"validation_rules_assignments": {
"object": "list",
"data_ref": "data",
"data": [
{
"id": "asgm_N7t39epaQR2SkQcW",
"rule_id": "val_ssbxf1L9aKri",
"related_object_id": "camp_AaP9MC1Y0GpBII84UTIuasvb",
"related_object_type": "campaign",
"created_at": "2022-02-14T15:12:06.817Z",
"object": "validation_rules_assignment",
"rule": {}
}
],
"total": 123
},
"category_id": "cat_0b688929a2476386a7",
"categories": {
"id": "<string>",
"name": "<string>",
"hierarchy": 1,
"object": "category",
"created_at": "2022-07-14T10:45:13.156Z",
"updated_at": "2022-08-16T10:52:08.094Z"
},
"object": "campaign",
"referral_program": {
"conversion_event_type": "redemption",
"custom_event": {
"id": "ms_fi47Dcu5T0m3v3nT5ch3ma",
"name": "<string>"
},
"referee_reward": {
"related_object_parent": {
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"type": "LOYALTY_CARD",
"amount": "<string>"
}
}
}
],
"total": 123,
"id": "qfl_dNZ3gWfKVNa8Zw15hn30uqdU",
"created_at": "2023-04-04T13:13:03.119Z",
"tracking_id": "<string>"
}Authorizations
Scopes
Query Parameters
Body
Request body schema for POST v1/campaigns/qualification.
Order information. This object enables you to pass purchase transaction data. Read what properties you can use in the Order object.
- Order ID
- Order Source ID
- Orders Create Request Body
Show child attributes
Show child attributes
Response
This operation returns the list of valid and active campaigns based on the qualification of a given context (e.g., customer profile, redemptions metadata, order).
Read about Qualification API limits before you start.
Response body schema for POST v1/campaigns/qualification.

