Referrals

Referral system management

Get customer referrers

get

Retrieve list of customers who referred this customer

Path parameters
customerIdstringRequired

Customer ID

Header parameters
X-Joy-Loyalty-App-KeystringRequired

App ID of your shop which retrieved from the Settings page

Example: {{appKey}}
X-Joy-Loyalty-Secret-KeystringRequired

Secret Key of your shop which retrieved from the Settings page

Example: {{secretKey}}
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
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
200

List of referrers

{
  "success": true,
  "data": [
    {}
  ],
  "meta": {
    "count": 1
  },
  "message": "Operation completed successfully",
  "timestamp": "2023-07-28T07:27:54.123Z"
}

Get referral analytics

get

Retrieve referral program analytics and performance metrics

Query parameters
startDatestring · dateOptional
endDatestring · dateOptional
Header parameters
X-Joy-Loyalty-App-KeystringRequired

App ID of your shop which retrieved from the Settings page

Example: {{appKey}}
X-Joy-Loyalty-Secret-KeystringRequired

Secret Key of your shop which retrieved from the Settings page

Example: {{secretKey}}
Responses
200

Referral analytics data

application/json
Responseall of
get
GET /rest_api/v2/referrals/analytics HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
200

Referral analytics data

{
  "success": true,
  "data": {
    "totalClicks": 1,
    "totalConversions": 1,
    "conversionRate": 1
  },
  "meta": {},
  "message": "Operation completed successfully",
  "timestamp": "2023-07-28T07:27:54.123Z"
}

Generate referral invitation

post

Create a new referral invitation link for a customer

Header parameters
X-Joy-Loyalty-App-KeystringRequired

App ID of your shop which retrieved from the Settings page

Example: {{appKey}}
X-Joy-Loyalty-Secret-KeystringRequired

Secret Key of your shop which retrieved from the Settings page

Example: {{secretKey}}
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
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
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"
}

Get customer referral summary

get

Retrieve comprehensive referral statistics for a customer

Path parameters
customerIdstringRequired

Customer ID

Header parameters
X-Joy-Loyalty-App-KeystringRequired

App ID of your shop which retrieved from the Settings page

Example: {{appKey}}
X-Joy-Loyalty-Secret-KeystringRequired

Secret Key of your shop which retrieved from the Settings page

Example: {{secretKey}}
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
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
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"
}

Last updated