Referrals
Referral system management
Create a new referral invitation link for a customer
Body
emailstring · emailRequired
Responses
200
Invitation generated successfully
application/json
Responseall of
post
POST /rest_api/v2/referrals/invitations HTTP/1.1
Host: dev-api.joy.so
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"email": "[email protected]"
}
200
Invitation generated successfully
{
"success": true,
"data": {
"inviteLink": "text",
"referralCode": "text"
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Retrieve list of customers who referred this customer
Path parameters
customerIdstringRequired
Customer ID
Responses
200
List of referrers
application/json
Responseall of
get
GET /rest_api/v2/referrals/customers/{customerId}/referrers HTTP/1.1
Host: dev-api.joy.so
Accept: */*
200
List of referrers
{
"success": true,
"data": [
{}
],
"meta": {
"count": 1
},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Retrieve comprehensive referral statistics for a customer
Path parameters
customerIdstringRequired
Customer ID
Responses
200
Referral summary
application/json
Responseall of
get
GET /rest_api/v2/referrals/customers/{customerId}/summary HTTP/1.1
Host: dev-api.joy.so
Accept: */*
200
Referral summary
{
"success": true,
"data": {
"totalReferrals": 1,
"totalPointsEarned": 1,
"totalVouchersEarned": 1
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Retrieve referral program analytics and performance metrics
Query parameters
startDatestring · dateOptional
endDatestring · dateOptional
Responses
200
Referral analytics data
application/json
Responseall of
get
GET /rest_api/v2/referrals/analytics HTTP/1.1
Host: dev-api.joy.so
Accept: */*
200
Referral analytics data
{
"success": true,
"data": {
"totalConversions": 1
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}