Usage
Response
boolean
Whether the request was successful.
object
Aggregated referral statistics.
array
List of individual referrals.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get referral statistics for the logged-in customer.
MageSDK.getCustomerReferralStats().then(function(resp) {
if (resp.success) {
console.log('Total referrals:', resp.data.summary.totalReferrals);
console.log('Completed:', resp.data.summary.completed);
}
});
Show Summary properties
Show Referral properties
"pending", "friend_converted", "completed", "expired").null.null.null.{
"success": true,
"data": {
"summary": {
"totalReferrals": 5,
"pending": 2,
"friendConverted": 1,
"completed": 2,
"expired": 0,
"availableRewards": 1
},
"referrals": [
{
"id": "ref_abc",
"friendEmail": "friend@example.com",
"status": "completed",
"createdAt": "2024-06-01T12:00:00.000Z",
"friendOrderDate": "2024-06-03T09:15:00.000Z",
"referrerDiscountCode": "MAGE-REF-XYZ",
"referrerDiscountUsed": false,
"referrerDiscountExpiresAt": "2024-09-03T09:15:00.000Z"
}
]
}
}