curl --request GET \
--url "https://api.yukoapp.com/api/v1/public/referrals/program" \
--header "Authorization: Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
const response = await fetch(
"https://api.yukoapp.com/api/v1/public/referrals/program",
{
method: "GET",
headers: {
Authorization: "Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
},
}
);
const data = await response.json();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.yukoapp.com/api/v1/public/referrals/program");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
{
"data": {
"id": "c3d4e5f6-a7b8-9012-cdef-a01234567890",
"referrer_reward": {
"title": "500 points",
"is_active": true,
"reward_type": "points",
"discount_value": 500
},
"friend_reward": {
"title": "$10 off",
"is_active": true,
"reward_type": "fixed",
"discount_value": 10,
"coupon_prefix": "REF"
},
"qualifying_rules": null,
"fraud_rules": {
"block_self_referral": true
},
"display_config": {
"landing_page_url": "https://example.com/pages/refer",
"utm_campaign": "referral"
},
"created_at": "2025-10-01T00:00:00+00:00",
"updated_at": "2026-01-15T10:00:00+00:00"
}
}
{
"error": {
"code": "not_found",
"message": "Referral program not found"
}
}
{
"error": {
"code": "invalid_token",
"message": "Invalid or revoked API token"
}
}
Referrals
Get referral program
Retrieves the referral program configuration for your organisation.
GET
/
public
/
referrals
/
program
curl --request GET \
--url "https://api.yukoapp.com/api/v1/public/referrals/program" \
--header "Authorization: Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
const response = await fetch(
"https://api.yukoapp.com/api/v1/public/referrals/program",
{
method: "GET",
headers: {
Authorization: "Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
},
}
);
const data = await response.json();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.yukoapp.com/api/v1/public/referrals/program");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
{
"data": {
"id": "c3d4e5f6-a7b8-9012-cdef-a01234567890",
"referrer_reward": {
"title": "500 points",
"is_active": true,
"reward_type": "points",
"discount_value": 500
},
"friend_reward": {
"title": "$10 off",
"is_active": true,
"reward_type": "fixed",
"discount_value": 10,
"coupon_prefix": "REF"
},
"qualifying_rules": null,
"fraud_rules": {
"block_self_referral": true
},
"display_config": {
"landing_page_url": "https://example.com/pages/refer",
"utm_campaign": "referral"
},
"created_at": "2025-10-01T00:00:00+00:00",
"updated_at": "2026-01-15T10:00:00+00:00"
}
}
{
"error": {
"code": "not_found",
"message": "Referral program not found"
}
}
{
"error": {
"code": "invalid_token",
"message": "Invalid or revoked API token"
}
}
The configuration includes referrer and friend reward settings, fraud protection rules and referral link settings.
Requires the
read:referrals scope. See Scopes.Response
object
Show referral program properties
Show referral program properties
string<uuid>
Unique UUID identifier for the referral program.
object | null
The reward for the customer who makes the referral (the advocate), as configured in Referral → Program. Common keys:
title,description: the reward’s display text.is_active: whether the referrer reward is turned on.reward_type: one offixed,percentage,free_product,free_shipping,store_creditorpoints.discount_value: the discount amount, percentage, credit amount or points.coupon_prefix,is_auto_apply,combines_with,applied_to,purchase_type: discount code settings.min_requirement_type(none,amountorquantity) withmin_purchase_amountormin_quantity_items: minimum purchase requirement.customer_selection(referrer reward only):allororiginal.is_expire_enabled,expire_after,expire_period: reward expiry.icon: the reward icon.
object | null
The reward for the referred friend. Uses the same keys as
referrer_reward, except reward_type is one of fixed, percentage, free_product or free_shipping.object | null
Reserved. Currently always
null.object | null
Fraud protection settings, such as
block_self_referral.object | null
Referral link settings:
landing_page_url, utm_campaign and social_share (an array of objects with platform and message, where platform is facebook, twitter, whatsapp or email).string<date-time> | null
When the referral program was created (ISO 8601).
string<date-time> | null
When the referral program was last updated (ISO 8601).
Errors
| Status | Code | When |
|---|---|---|
401 | missing_token, invalid_token | The API key is missing, wrong or revoked. |
403 | insufficient_scope | The key doesn’t have read:referrals. |
404 | not_found | No referral program is set up for your organisation. Message: Referral program not found. |
429 | The key exceeded the rate limit. |
curl --request GET \
--url "https://api.yukoapp.com/api/v1/public/referrals/program" \
--header "Authorization: Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
const response = await fetch(
"https://api.yukoapp.com/api/v1/public/referrals/program",
{
method: "GET",
headers: {
Authorization: "Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
},
}
);
const data = await response.json();
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.yukoapp.com/api/v1/public/referrals/program");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
{
"data": {
"id": "c3d4e5f6-a7b8-9012-cdef-a01234567890",
"referrer_reward": {
"title": "500 points",
"is_active": true,
"reward_type": "points",
"discount_value": 500
},
"friend_reward": {
"title": "$10 off",
"is_active": true,
"reward_type": "fixed",
"discount_value": 10,
"coupon_prefix": "REF"
},
"qualifying_rules": null,
"fraud_rules": {
"block_self_referral": true
},
"display_config": {
"landing_page_url": "https://example.com/pages/refer",
"utm_campaign": "referral"
},
"created_at": "2025-10-01T00:00:00+00:00",
"updated_at": "2026-01-15T10:00:00+00:00"
}
}
{
"error": {
"code": "not_found",
"message": "Referral program not found"
}
}
{
"error": {
"code": "invalid_token",
"message": "Invalid or revoked API token"
}
}