Rewards
Customer rewards and redemptions
Reward 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}}
Reward details
GET /rest_api/v2/rewards/{rewardId} HTTP/1.1
Host: dev-api.joy.so
X-Joy-Loyalty-App-Key: text
X-Joy-Loyalty-Secret-Key: text
Accept: */*
Reward details
{
"success": true,
"data": {
"id": "OPfV7dXaPn1Ejbm9piPs",
"customerId": "o9AQeUCXYDjbeFm7vAKy",
"email": "[email protected]",
"couponCode": "JOY-8PBFA801B2FH",
"programTitle": "Points for discounts",
"shopifyCustomerId": 7603687882987,
"programDescription": "1 x 1% discount",
"orderReqAmount": "$1",
"expiredAt": "2025-09-08T23:38:57.092Z",
"discountStatus": "active",
"createdAt": "2025-06-12T10:31:25.781Z",
"updatedAt": "2025-06-12T10:31:25.781Z"
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Retrieve customer rewards with optional filtering and pagination
Filter by Shopify customer ID
Filter by reward status
Filter by reward type
Cursor for pagination (before) - Firestore document ID
Cursor for pagination (after) - Firestore document ID
Number of rewards per page
10
Filter rewards created after this date
Filter rewards created before this date
Sort order for results
createdAt_desc
Possible values: Include total count in response (may increase response time)
false
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 customer rewards
Customer not found
GET /rest_api/v2/rewards 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": "OPfV7dXaPn1Ejbm9piPs",
"customerId": "o9AQeUCXYDjbeFm7vAKy",
"email": "[email protected]",
"couponCode": "JOY-8PBFA801B2FH",
"programTitle": "Points for discounts",
"shopifyCustomerId": 7603687882987,
"programDescription": "1 x 1% discount",
"orderReqAmount": "$1",
"expiredAt": "2025-09-08T23:38:57.092Z",
"discountStatus": "active",
"createdAt": "2025-06-12T10:31:25.781Z",
"updatedAt": "2025-06-12T10:31:25.781Z",
"program": {
"id": "akwQ96WZJMIqrG26PNlC",
"title": "Points for discounts"
}
}
],
"meta": {
"pagination": {
"hasNext": true,
"hasPre": true,
"total": 1,
"totalPage": 1
}
},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Process coupon refund and return points to customer
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
The coupon/discount code to refund
JOY-8PBFA801B2FH
Shopify customer ID who owns the coupon
7603687882987
Optional reason for the refund
Customer request
Coupon refunded successfully
Invalid request or coupon not found
POST /rest_api/v2/rewards/coupons/refund 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: 99
{
"discountCode": "JOY-8PBFA801B2FH",
"shopifyCustomerId": "7603687882987",
"reason": "Customer request"
}
{
"success": true,
"data": {
"success": true,
"message": "Coupon refunded successfully"
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Last updated