Referrals
Referral system management
Retrieve list of customers who referred this customer
Customer ID
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
List of referrers
GET /rest_api/v2/referrals/customers/{customerId}/referrers HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
List of referrers
{
"success": true,
"data": [
{}
],
"meta": {
"count": 1
},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Retrieve referral program analytics and performance metrics
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Referral analytics data
GET /rest_api/v2/referrals/analytics HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
Referral analytics data
{
"success": true,
"data": {
"totalClicks": 1,
"totalConversions": 1,
"conversionRate": 1
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Create a new referral invitation link for a customer
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Invitation generated successfully
POST /rest_api/v2/referrals/invitations HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"email": "[email protected]"
}
Invitation generated successfully
{
"success": true,
"data": {
"inviteLink": "text",
"referralCode": "text"
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Retrieve comprehensive referral statistics for a customer
Customer ID
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Referral summary
GET /rest_api/v2/referrals/customers/{customerId}/summary HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
Referral summary
{
"success": true,
"data": {
"totalReferrals": 1,
"totalPointsEarned": 1,
"totalVouchersEarned": 1
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Last updated