Programs
Earning and spending programs management
Retrieve earning programs for a specific customer with earned status
Shopify customer ID
Internal customer ID
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Programs for customer with earned status
Customer not found
GET /rest_api/v2/programs/earning/eligibility HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
{
"success": true,
"data": [
{
"id": "prog_abc123",
"title": "Sign Up Bonus",
"type": "earning",
"event": "sign_up",
"status": true,
"priority": 1,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:45:30.000Z",
"expired": false,
"isDraft": false,
"earnBy": "price",
"rateMoney": 1,
"earnPoint": 100,
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-12-31T23:59:59.000Z",
"autoRemovePoints": false,
"appliedPlaceOrderTo": "all",
"appliedSource": [
"web",
"pos"
],
"excludeProducts": [],
"includeProducts": [],
"conditions": [],
"earnPointsTiers": [],
"roundingMethod": "round",
"skipEarnPointGuest": false,
"translateTitle": {},
"typeMilestone": "order_based",
"milestones": [],
"spendPoint": 500,
"earnAmount": "10",
"redeemType": "fixed",
"appliedTo": "all",
"appliedCollectionIds": [],
"redeemIn": "available_in_online_store",
"orderReq": "none",
"orderReqAmount": 0,
"minSpendPoint": "",
"maxSpendPoint": "",
"expiredTime": "",
"userAvailability": "userRedeemed",
"showLoyaltyPage": true,
"limitRedeem": "redeemWithoutLimit",
"totalLimitationRedeem": 0,
"combinedWith": [],
"specificProducts": [],
"specificProductIds": [],
"specificCollections": [],
"variantIds": [],
"freeProductIds": [],
"giftStatus": "none",
"isEarned": true
}
],
"meta": {
"count": 1
},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Retrieve all earning programs for the authenticated shop
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
List of earning programs
Plan upgrade required or authentication failed
Internal server error
GET /rest_api/v2/programs/earning HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
{
"success": true,
"data": [
{
"id": "prog_earning_001",
"title": "Sign Up Bonus",
"type": "earning",
"event": "sign_up",
"status": true,
"earnPoint": 100,
"priority": 1,
"expired": false,
"isDraft": false,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:45:30.000Z"
}
],
"meta": {
"count": 1
},
"timestamp": "2024-01-20T14:45:30.000Z"
}
Retrieve all point spending/redemption programs
Shopify customer ID for program limitations
Filter by program event type
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
List of spending programs
GET /rest_api/v2/programs/redemption HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
List of spending programs
{
"success": true,
"data": [
{
"id": "prog_abc123",
"title": "Sign Up Bonus",
"type": "earning",
"event": "sign_up",
"status": true,
"priority": 1,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:45:30.000Z",
"expired": false,
"isDraft": false,
"earnBy": "price",
"rateMoney": 1,
"earnPoint": 100,
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-12-31T23:59:59.000Z",
"autoRemovePoints": false,
"appliedPlaceOrderTo": "all",
"appliedSource": [
"web",
"pos"
],
"excludeProducts": [],
"includeProducts": [],
"conditions": [],
"earnPointsTiers": [],
"roundingMethod": "round",
"skipEarnPointGuest": false,
"translateTitle": {},
"typeMilestone": "order_based",
"milestones": [],
"spendPoint": 500,
"earnAmount": "10",
"redeemType": "fixed",
"appliedTo": "all",
"appliedCollectionIds": [],
"redeemIn": "available_in_online_store",
"orderReq": "none",
"orderReqAmount": 0,
"minSpendPoint": "",
"maxSpendPoint": "",
"expiredTime": "",
"userAvailability": "userRedeemed",
"showLoyaltyPage": true,
"limitRedeem": "redeemWithoutLimit",
"totalLimitationRedeem": 0,
"combinedWith": [],
"specificProducts": [],
"specificProductIds": [],
"specificCollections": [],
"variantIds": [],
"freeProductIds": [],
"giftStatus": "none"
}
],
"meta": {
"count": 1
},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Calculate points that would be earned for given products
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
web
Calculated points
POST /rest_api/v2/programs/earning/points/calculate 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: 97
{
"products": [
{
"id": "text",
"quantity": 1,
"price": 1
}
],
"shopifyCustomerId": "text",
"sourceName": "web"
}
Calculated points
{
"success": true,
"data": {
"pointsEarn": 1,
"products": [
{}
]
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Process social media interactions for earning points
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Social earning processed
POST /rest_api/v2/programs/earning/social/interactions 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: 62
{
"shopifyCustomerId": "text",
"event": "text",
"earningId": "text"
}
Social earning processed
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Redeem customer points for rewards through a redemption program
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
1
Redemption successful
POST /rest_api/v2/programs/redemption/redeem 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: 60
{
"programId": "text",
"shopifyCustomerId": "text",
"quantity": 1
}
Redemption successful
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Last updated