Skip to content

Referrals API

GET /v1/referral-programs
POST /v1/referral-programs
{
"name": "Friend Referral",
"referrerReward": {
"type": "points",
"amount": 500
},
"refereeReward": {
"type": "points",
"amount": 250
},
"maxReferrals": 10
}
FieldTypeRequiredDescription
namestringYesProgram name
referrerRewardobjectYesReward for the referrer
refereeRewardobjectYesReward for the new user
maxReferralsnumberNoMax referrals per customer
GET /v1/referrals/{customerId}/code

Response:

{
"success": true,
"data": {
"code": "JANE-X7K2",
"url": "https://your-app.com/ref/JANE-X7K2",
"referralsCount": 3,
"maxReferrals": 10
}
}
POST /v1/referrals/apply
{
"code": "JANE-X7K2",
"refereeId": "cust_new456"
}
GET /v1/referrals/{customerId}/history

Returns a list of all referrals made by the customer, including status and reward information.