Activities
Point activities and transactions
Retrieve paginated list of point transactions/activities
Filter by Shopify customer ID.
Note: At least one of shopifyCustomerId
or customerId
is required.
Filter by internal customer ID.
Note: At least one of shopifyCustomerId
or customerId
is required.
Cursor for pagination (before) - Firestore document ID of activity to paginate before
Cursor for pagination (after) - Firestore document ID of activity to paginate after
Number of transactions per page
10
Filter by activity type
Filter by specific event
Filter by activity source
Filter activities created after this date
Filter activities created before this date
Sort order for results
createdAt_desc
Possible values: Include total count in response (may increase response time)
false
Paginated list of transactions
GET /rest_api/v2/transactions HTTP/1.1
Host: dev-api.joy.so
Accept: */*
Paginated list of transactions
{
"success": true,
"data": [
{
"id": "activity_123",
"customerId": "cust_abc",
"shopifyCustomerId": "7891234567890",
"type": "earn_point",
"event": "sign_up",
"oldPoint": 0,
"newPoint": 100,
"earnPoint": 100,
"source": "rest_api",
"createdAt": "2025-08-12T08:30:00.000Z"
},
{
"id": "activity_124",
"customerId": "cust_abc",
"shopifyCustomerId": "7891234567890",
"type": "redeem_point",
"event": "amount_discount",
"oldPoint": 100,
"newPoint": 50,
"spendPoint": 50,
"source": "user",
"createdAt": "2025-08-12T07:15:00.000Z"
}
],
"meta": {
"pagination": {
"hasNext": true,
"hasPre": false,
"total": 45,
"totalPage": 3
}
},
"timestamp": "2025-08-12T08:30:00.000Z"
}
Retrieve details of a specific point transaction
Transaction ID
Transaction details
GET /rest_api/v2/transactions/{transactionId} HTTP/1.1
Host: dev-api.joy.so
Accept: */*
Transaction details
{
"success": true,
"data": {
"id": "act_abc123",
"shopId": "shop_xyz789",
"customerId": "cust_def456",
"shopifyCustomerId": 7801029525739,
"email": "[email protected]",
"content": "Award points via REST API",
"type": "earnPoint",
"source": "rest_api",
"event": "earn_point_rest_api",
"oldPoint": 50,
"newPoint": 150,
"programId": "prog_abc123",
"programTitle": "Manual Point Award",
"priceRuleId": null,
"discountId": null,
"couponCode": null,
"orderId": null,
"orderName": null,
"orderNumber": null,
"orderCurrency": null,
"earnBy": null,
"rateMoney": null,
"earnPoint": 100,
"spendPoint": null,
"referralCustomerEmail": null,
"referredCustomerEmail": null,
"milestoneOrder": null,
"isPendingPointPlaceOrder": null,
"refundPendingPoint": null,
"pendingPointUntil": null,
"adminNote": null,
"userNote": null,
"reason": null,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Add points to a customer's account
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Shopify customer ID
8720295559390
Points to award
100
Internal note for admin reference
Bonus points for customer loyalty
Note visible to customer
Loyalty bonus - thank you for being a valued customer!
Reason for awarding points
manual_adjustment
Points awarded successfully
POST /rest_api/v2/transactions/points/award 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: 194
{
"shopifyCustomerId": "8720295559390",
"point": 100,
"adminNote": "Bonus points for customer loyalty",
"userNote": "Loyalty bonus - thank you for being a valued customer!",
"reason": "manual_adjustment"
}
Points awarded successfully
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Remove points from a customer's account
App ID of your shop which retrieved from the Settings page
{{appKey}}
Secret Key of your shop which retrieved from the Settings page
{{secretKey}}
Shopify customer ID
8720295559390
Points to deduct
50
Internal note for admin reference
Points deduction for policy violation
Note visible to customer
Points adjusted due to return policy
Reason for deducting points
policy_adjustment
Points deducted successfully
POST /rest_api/v2/transactions/points/deduct 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: 179
{
"shopifyCustomerId": "8720295559390",
"point": 50,
"adminNote": "Points deduction for policy violation",
"userNote": "Points adjusted due to return policy",
"reason": "policy_adjustment"
}
Points deducted successfully
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Adjust customer points (positive or negative adjustment)
Shopify customer ID
8720295559390
Points adjustment (positive or negative)
-25
Internal note for admin reference
Correcting points balance discrepancy
Note visible to customer
Points balance correction
Reason for adjusting points
balance_correction
Points adjusted successfully
POST /rest_api/v2/transactions/points/adjust HTTP/1.1
Host: dev-api.joy.so
Content-Type: application/json
Accept: */*
Content-Length: 170
{
"shopifyCustomerId": "8720295559390",
"point": -25,
"adminNote": "Correcting points balance discrepancy",
"userNote": "Points balance correction",
"reason": "balance_correction"
}
Points adjusted successfully
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}
Set customer points to a specific value
Shopify customer ID
8720295559390
New points balance to set
0
Internal note for admin reference
Resetting points balance for new program
Note visible to customer
Points reset for new loyalty program launch
Reason for resetting points
program_migration
Points reset successfully
POST /rest_api/v2/transactions/points/reset HTTP/1.1
Host: dev-api.joy.so
Content-Type: application/json
Accept: */*
Content-Length: 188
{
"shopifyCustomerId": "8720295559390",
"point": 0,
"adminNote": "Resetting points balance for new program",
"userNote": "Points reset for new loyalty program launch",
"reason": "program_migration"
}
Points reset successfully
{
"success": true,
"data": {},
"meta": {},
"message": "Operation completed successfully",
"timestamp": "2023-07-28T07:27:54.123Z"
}