REST API v2
Referrals

Referrals

Referral system management

Generate referral invitation

POST/rest_api/v2/referrals/invitations

Create a new referral invitation link for a customer

Authorizations
X-Joy-Loyalty-App-KeystringRequired
X-Joy-Loyalty-Secret-KeystringRequired
Request body
emailstring · emailRequired
Responses
200Invitation generated successfully
successbooleanOptional
Example: true
dataobjectOptional
Show properties
inviteLinkstringOptional
referralCodestringOptional
metaobjectOptional

Additional metadata such as counts and pagination

messagestringOptional
Example: "Operation completed successfully"
timestampstring · date-timeOptional
Example: "2023-07-28T07:27:54.123Z"
POST/rest_api/v2/referrals/invitations
POST /rest_api/v2/referrals/invitations HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: YOUR_API_KEY
X-Joy-Loyalty-Secret-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 33
{
"email": "[email protected]"
}
200Invitation generated successfully
{
"success": true,
"data": {
"inviteLink": "string",
"referralCode": "string"
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}

Get customer referrers

GET/rest_api/v2/referrals/customers/{customerId}/referrers

Retrieve list of customers who referred this customer

Authorizations
X-Joy-Loyalty-App-KeystringRequired
X-Joy-Loyalty-Secret-KeystringRequired
Parameters
customerIdpath · stringRequired

Customer ID

Responses
200List of referrers
successbooleanOptional
Example: true
dataobject[]Optional
metaobjectOptional
Show properties
countintegerOptional

Number of items returned

messagestringOptional
Example: "Operation completed successfully"
timestampstring · date-timeOptional
Example: "2023-07-28T07:27:54.123Z"
GET/rest_api/v2/referrals/customers/{customerId}/referrers
GET /rest_api/v2/referrals/customers/{customerId}/referrers HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: YOUR_API_KEY
X-Joy-Loyalty-Secret-Key: YOUR_API_KEY
Accept: */*
200List of referrers
{
"success": true,
"data": [
{}
],
"meta": {
"count": 1
},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}

Get customer referral summary

GET/rest_api/v2/referrals/customers/{customerId}/summary

Retrieve comprehensive referral statistics for a customer

Authorizations
X-Joy-Loyalty-App-KeystringRequired
X-Joy-Loyalty-Secret-KeystringRequired
Parameters
customerIdpath · stringRequired

Customer ID

Responses
200Referral summary
successbooleanOptional
Example: true
dataobjectOptional
Show properties
totalRedeemCouponintegerOptional
totalPointEarnReferintegerOptional
metaobjectOptional

Additional metadata such as counts and pagination

messagestringOptional
Example: "Operation completed successfully"
timestampstring · date-timeOptional
Example: "2023-07-28T07:27:54.123Z"
GET/rest_api/v2/referrals/customers/{customerId}/summary
GET /rest_api/v2/referrals/customers/{customerId}/summary HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: YOUR_API_KEY
X-Joy-Loyalty-Secret-Key: YOUR_API_KEY
Accept: */*
200Referral summary
{
"success": true,
"data": {
"totalRedeemCoupon": 1,
"totalPointEarnRefer": 1
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}

Get referral analytics

GET/rest_api/v2/referrals/analytics

Retrieve referral program analytics and performance metrics

Authorizations
X-Joy-Loyalty-App-KeystringRequired
X-Joy-Loyalty-Secret-KeystringRequired
Parameters
startDatequery · string · dateOptional
endDatequery · string · dateOptional
Responses
200Referral analytics data
successbooleanOptional
Example: true
dataobjectOptional
Show properties
countCouponCodeUsageintegerOptional
metaobjectOptional

Additional metadata such as counts and pagination

messagestringOptional
Example: "Operation completed successfully"
timestampstring · date-timeOptional
Example: "2023-07-28T07:27:54.123Z"
GET/rest_api/v2/referrals/analytics
GET /rest_api/v2/referrals/analytics HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: YOUR_API_KEY
X-Joy-Loyalty-Secret-Key: YOUR_API_KEY
Accept: */*
200Referral analytics data
{
"success": true,
"data": {
"countCouponCodeUsage": 1
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Product
Install AppWebsiteBook a Demo
Developers
JavaScript SDKREST API v2Webhook API
Company
Avada GroupHelp CenterContact
© 2026 Joy Loyalty by Avada Group. All rights reserved.