Customers
Customer data and management
Get customers with pagination
Cursor for pagination (before) - Firestore document ID of customer to paginate before
Cursor for pagination (after) - Firestore document ID of customer to paginate after
Number of customers per page
Search by customer email address
Filter by customer type
Filter by customer tier ID
Filter customers updated after this date
Filter customers updated before this date
Filter customers created before this date
Sort order for results
Include total count in response (may increase response time)
200Paginated list of customers
trueShow properties
Internal customer ID
"b1wvKrxdDZ11U8tUlyyx"Shopify customer ID
7801029525739Customer full name
"John Doe"Customer first name
"John"Customer last name
"Doe"Customer type
"member"Current available points
100Points used for tier calculation
100Points pending approval
0Total amount spent
0Lifetime earned points
100Whether customer has available points
trueWhether customer joined loyalty program
trueNumber of orders placed
0Account state
"enabled"Last activity timestamp
"2025-04-29T10:23:05.990Z"Customer notification preferences
{}Marketing consent
falseBirthday in MM/DD format
"05/15"Date of birth in YYYY-MM-DD format
"1990-05-15"Current tier ID
"1Fe1kqHZbE7Alx1GmFEC"Current tier name
"Bronze"Last tier update timestamp
"2025-06-16T10:20:58.636Z"Phone number
nullPoints needed for next tier
4900Birth month in MM format
"05"Whether customer is B2B
falseWhether customer earned signup points
trueCustomer's referral code
"2kxRoqlDQMp"Whether customer has a tier assigned
falseCurrency code for spending
"VND"Account creation timestamp
"2025-04-29T10:23:05.991Z"Last update timestamp
"2025-06-16T10:20:58.663Z"Pagination metadata container
Show properties
Show properties
True if more results exist after current page
True if results exist before current page
Total count of all matching results (when available)
Total number of pages calculated as ceil(total/limit) (when available)
"Operation completed successfully""2023-07-28T07:27:54.123Z"GET /rest_api/v2/customers HTTP/1.1Host: dev-api.joy.soX-Joy-Loyalty-App-Key: YOUR_API_KEYX-Joy-Loyalty-Secret-Key: YOUR_API_KEYAccept: */*
{"success": true,"data": [{"id": "b1wvKrxdDZ11U8tUlyyx","shopifyCustomerId": 7801029525739,"name": "John Doe","firstName": "John","lastName": "Doe","type": "member","point": 100,"tierPoint": 100,"totalEarnedPoints": 100,"hasPoint": true,"hasJoinedProgram": true,"state": "enabled","acceptsMarketing": false,"tierId": "1Fe1kqHZbE7Alx1GmFEC","tierName": "Bronze","pointsRemain": 4900,"isCustomerB2B": false,"earnSignUp": true,"referralCode": "2kxRoqlDQMp","hasTier": true,"totalSpentCurrencyCode": "VND","createdAt": "2025-04-29T10:23:05.991Z","updatedAt": "2025-06-16T10:20:58.663Z"}],"meta": {"pagination": {"hasNext": true,"hasPre": false,"total": 1250,"totalPage": 63}},"timestamp": "2025-06-16T10:20:58.663Z"}
Get customer by ID
Internal customer ID
200Customer details
trueShow properties
Internal customer ID
"b1wvKrxdDZ11U8tUlyyx"Shopify customer ID
7801029525739Customer full name
"John Doe"Customer first name
"John"Customer last name
"Doe"Customer type
"member"Current available points
100Points used for tier calculation
100Points pending approval
0Total amount spent
0Lifetime earned points
100Whether customer has available points
trueWhether customer joined loyalty program
trueNumber of orders placed
0Account state
"enabled"Last activity timestamp
"2025-04-29T10:23:05.990Z"Customer notification preferences
{}Marketing consent
falseBirthday in MM/DD format
"05/15"Date of birth in YYYY-MM-DD format
"1990-05-15"Current tier ID
"1Fe1kqHZbE7Alx1GmFEC"Current tier name
"Bronze"Last tier update timestamp
"2025-06-16T10:20:58.636Z"Phone number
nullPoints needed for next tier
4900Birth month in MM format
"05"Whether customer is B2B
falseWhether customer earned signup points
trueCustomer's referral code
"2kxRoqlDQMp"Whether customer has a tier assigned
falseCurrency code for spending
"VND"Account creation timestamp
"2025-04-29T10:23:05.991Z"Last update timestamp
"2025-06-16T10:20:58.663Z"Additional metadata such as counts and pagination
"Operation completed successfully""2023-07-28T07:27:54.123Z"404Customer not found
falseShow properties
"Resource not found""NOT_FOUND"404"2023-07-28T07:27:54.123Z"GET /rest_api/v2/customers/{customerId} HTTP/1.1Host: dev-api.joy.soX-Joy-Loyalty-App-Key: YOUR_API_KEYX-Joy-Loyalty-Secret-Key: YOUR_API_KEYAccept: */*
{"success": true,"data": {"id": "cust_abc123","shopifyCustomerId": 7891234567890,"firstName": "John","lastName": "Doe","point": 150,"pointsRemain": 350,"tierId": "tier_gold_123","tierName": "Gold","createdAt": "2023-07-15T10:30:00.000Z","updatedAt": "2023-07-28T07:27:54.123Z"}}
Update customer data
Update customer information (supports birthday fields)
Internal customer ID
Date of birth in ISO 8601 format (YYYY-MM-DD)
Birthday in MM/DD format
200Customer updated successfully
trueShow properties
Additional metadata such as counts and pagination
"Operation completed successfully""2023-07-28T07:27:54.123Z"400Invalid request data
falseShow properties
"Resource not found""NOT_FOUND"404"2023-07-28T07:27:54.123Z"404Customer not found
falseShow properties
"Resource not found""NOT_FOUND"404"2023-07-28T07:27:54.123Z"PUT /rest_api/v2/customers/{customerId} HTTP/1.1Host: dev-api.joy.soX-Joy-Loyalty-App-Key: YOUR_API_KEYX-Joy-Loyalty-Secret-Key: YOUR_API_KEYContent-Type: application/jsonAccept: */*Content-Length: 33{"dateOfBirth": "1990-05-15"}
{"success": true,"data": {"id": "string","shopifyCustomerId": "string"},"meta": {},"message": "Operation completed successfully","timestamp": "2023-07-28T07:27:54.123Z"}
Get customer earned points
Retrieve total points earned by a customer across all programs
Internal customer ID
200Customer earned points summary
trueShow properties
Additional metadata such as counts and pagination
"Operation completed successfully""2023-07-28T07:27:54.123Z"GET /rest_api/v2/customers/{customerId}/points/earned HTTP/1.1Host: dev-api.joy.soX-Joy-Loyalty-App-Key: YOUR_API_KEYX-Joy-Loyalty-Secret-Key: YOUR_API_KEYAccept: */*
{"success": true,"data": {"totalEarnedPoints": 1},"meta": {},"message": "Operation completed successfully","timestamp": "2023-07-28T07:27:54.123Z"}
Get customer by Shopify ID
Retrieve customer information using Shopify customer ID
Shopify customer ID
200Customer details
trueShow properties
Internal customer ID
"b1wvKrxdDZ11U8tUlyyx"Shopify customer ID
7801029525739Customer full name
"John Doe"Customer first name
"John"Customer last name
"Doe"Customer type
"member"Current available points
100Points used for tier calculation
100Points pending approval
0Total amount spent
0Lifetime earned points
100Whether customer has available points
trueWhether customer joined loyalty program
trueNumber of orders placed
0Account state
"enabled"Last activity timestamp
"2025-04-29T10:23:05.990Z"Customer notification preferences
{}Marketing consent
falseBirthday in MM/DD format
"05/15"Date of birth in YYYY-MM-DD format
"1990-05-15"Current tier ID
"1Fe1kqHZbE7Alx1GmFEC"Current tier name
"Bronze"Last tier update timestamp
"2025-06-16T10:20:58.636Z"Phone number
nullPoints needed for next tier
4900Birth month in MM format
"05"Whether customer is B2B
falseWhether customer earned signup points
trueCustomer's referral code
"2kxRoqlDQMp"Whether customer has a tier assigned
falseCurrency code for spending
"VND"Account creation timestamp
"2025-04-29T10:23:05.991Z"Last update timestamp
"2025-06-16T10:20:58.663Z"Additional metadata such as counts and pagination
"Operation completed successfully""2023-07-28T07:27:54.123Z"404Customer not found
falseShow properties
"Resource not found""NOT_FOUND"404"2023-07-28T07:27:54.123Z"GET /rest_api/v2/customers/external/{shopifyCustomerId} HTTP/1.1Host: dev-api.joy.soX-Joy-Loyalty-App-Key: YOUR_API_KEYX-Joy-Loyalty-Secret-Key: YOUR_API_KEYAccept: */*
{"success": true,"data": {"id": "cust_abc123","shopifyCustomerId": "7891234567890","firstName": "John","lastName": "Doe","point": 150,"totalEarnedPoints": 300,"hasPoint": true,"hasJoinedProgram": true,"state": "enabled"}}
Update customer data by Shopify ID
Update customer information using Shopify customer ID
Shopify customer ID
Date of birth in ISO 8601 format (YYYY-MM-DD)
Birthday in MM/DD format
200Customer updated successfully
trueShow properties
Additional metadata such as counts and pagination
"Operation completed successfully""2023-07-28T07:27:54.123Z"PUT /rest_api/v2/customers/external/{shopifyCustomerId} HTTP/1.1Host: dev-api.joy.soX-Joy-Loyalty-App-Key: YOUR_API_KEYX-Joy-Loyalty-Secret-Key: YOUR_API_KEYContent-Type: application/jsonAccept: */*Content-Length: 33{"dateOfBirth": "1990-05-15"}
{"success": true,"data": {"id": "string","shopifyCustomerId": "string"},"meta": {},"message": "Operation completed successfully","timestamp": "2023-07-28T07:27:54.123Z"}
Update customer VIP tier
Update customer's VIP tier with comprehensive tier processing
Internal customer ID
Target tier ID
Whether this is an initial tier assignment
Whether to trigger tier rewards
Admin note for the tier change activity
200Customer tier updated successfully
trueShow properties
Additional metadata such as counts and pagination
"Operation completed successfully""2023-07-28T07:27:54.123Z"400Invalid request data
falseShow properties
"Resource not found""NOT_FOUND"404"2023-07-28T07:27:54.123Z"404Customer or tier not found
falseShow properties
"Resource not found""NOT_FOUND"404"2023-07-28T07:27:54.123Z"PUT /rest_api/v2/customers/{customerId}/tier HTTP/1.1Host: dev-api.joy.soX-Joy-Loyalty-App-Key: YOUR_API_KEYX-Joy-Loyalty-Secret-Key: YOUR_API_KEYContent-Type: application/jsonAccept: */*Content-Length: 124{"tierId": "tier_gold_123","isInitTier": false,"triggerReward": true,"adminNote": "Tier upgraded via REST API"}
{"success": true,"data": {"id": "string","shopifyCustomerId": "string","tierId": "string","tierName": "string","tierPoint": 1,"tierUpdatedAt": "2024-01-15T10:30:00.000Z"},"meta": {},"message": "Operation completed successfully","timestamp": "2023-07-28T07:27:54.123Z"}
Update customer VIP tier by Shopify ID
Update customer's VIP tier using Shopify customer ID
Shopify customer ID
Target tier ID
Whether this is an initial tier assignment
Whether to trigger tier rewards
Admin note for the tier change activity
200Customer tier updated successfully
trueShow properties
Additional metadata such as counts and pagination
"Operation completed successfully""2023-07-28T07:27:54.123Z"PUT /rest_api/v2/customers/external/{shopifyCustomerId}/tier HTTP/1.1Host: dev-api.joy.soX-Joy-Loyalty-App-Key: YOUR_API_KEYX-Joy-Loyalty-Secret-Key: YOUR_API_KEYContent-Type: application/jsonAccept: */*Content-Length: 56{"tierId": "tier_gold_123","triggerReward": true}
{"success": true,"data": {"id": "string","shopifyCustomerId": "string","tierId": "string","tierName": "string","tierPoint": 1,"tierUpdatedAt": "2024-01-15T10:30:00.000Z"},"meta": {},"message": "Operation completed successfully","timestamp": "2023-07-28T07:27:54.123Z"}