Referrals API
List Referral Programs
Section titled “List Referral Programs”GET /v1/referral-programsCreate Referral Program
Section titled “Create Referral Program”POST /v1/referral-programs{ "name": "Friend Referral", "referrerReward": { "type": "points", "amount": 500 }, "refereeReward": { "type": "points", "amount": 250 }, "maxReferrals": 10}| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Program name |
referrerReward | object | Yes | Reward for the referrer |
refereeReward | object | Yes | Reward for the new user |
maxReferrals | number | No | Max referrals per customer |
Get Referral Code
Section titled “Get Referral Code”GET /v1/referrals/{customerId}/codeResponse:
{ "success": true, "data": { "code": "JANE-X7K2", "url": "https://your-app.com/ref/JANE-X7K2", "referralsCount": 3, "maxReferrals": 10 }}Apply Referral
Section titled “Apply Referral”POST /v1/referrals/apply{ "code": "JANE-X7K2", "refereeId": "cust_new456"}Referral History
Section titled “Referral History”GET /v1/referrals/{customerId}/historyReturns a list of all referrals made by the customer, including status and reward information.