Admin APIs for third-party integrations to manage customer loyalty programs, points, rewards, and redemptions. All endpoints require X-API-Key authentication header.
- Enroll customer in loyalty program
Admin APIs
Request
Updates the status of a customer's discount code after checkout or subscription events.
Primary use case: Mark a discount code as "USED" after a customer completes checkout with the code. This prevents the code from being used again and keeps reward tracking accurate.
Request body:
- customerId: Shopify customer ID (required)
- discountCode: The discount code to update (required)
- status: New status for the code (required)
Valid status values:
- USED: Mark code as used after checkout (most common)
- SUBSCRIPTION_ACTIVE: Mark code as active for subscription renewals
- UNUSED: Reset code to unused state (use carefully)
- EXPIRED: Manually expire a code
What happens when you update status:
- Validates discount code exists and belongs to customer
- Updates the reward status in database
- Syncs status to Shopify discount code system
- Updates customer metafields in Shopify
- Logs activity for audit trail
- For subscriptions: manages discount code lifecycle
Subscription handling (SUBSCRIPTION_ACTIVE):
- When subscription is created: Set to SUBSCRIPTION_ACTIVE
- System automatically manages code for each renewal
- When subscription ends: Can revert to USED or delete
- Code may be deleted/recreated for each billing cycle
Common workflows:
One-time checkout:
- Customer applies loyalty code at checkout
- Order is created in Shopify
- Call this endpoint with status="USED"
- Code is now marked as used and can't be reused
Subscription checkout:
- Customer applies code to subscription
- Subscription is created
- Call with status="SUBSCRIPTION_ACTIVE"
- Code stays active for renewals
- When subscription cancelled, call with status="USED"
Important notes:
- Marking code as USED is irreversible in normal operations
- SUBSCRIPTION_ACTIVE codes can be used for recurring orders
- System prevents using USED codes even if status is reset
- Activity log tracks all status changes
- Metafield sync updates customer data in Shopify theme
Error scenarios:
- Code already USED: Cannot mark as USED again (400 error)
- Code not found: Invalid discount code or customer (400 error)
- Wrong customer: Code belongs to different customer (400 error)
Best practices:
- Always call this after order creation webhooks
- Use order confirmation webhooks to trigger status update
- Handle 400 errors gracefully (code may already be marked used)
- For subscriptions, track subscription lifecycle events
- Don't call multiple times for same order (idempotency)
Shopify customer ID (numeric). Identifies which customer owns the discount code. Used to verify the discount code belongs to this customer before updating. Example: 67890
The discount code to update. Case-insensitive. Must be a valid loyalty discount code that belongs to the specified customer. Examples: "LOYALTY15OFF", "VIP20", "WELCOME10"
New status for the discount code. Valid values:
- USED: Mark code as used after checkout (most common)
- SUBSCRIPTION_ACTIVE: Mark code as active for subscription renewals
- UNUSED: Reset code to unused state (use carefully)
- EXPIRED: Manually expire a code
Status transitions:
- UNUSED → USED: Normal checkout flow
- UNUSED → SUBSCRIPTION_ACTIVE: Subscription created
- SUBSCRIPTION_ACTIVE → USED: Subscription ended
- Any → EXPIRED: Manual expiration
Note: Cannot mark already USED codes as USED again.
- https://loyalty-admin.appstle.com/api/external/update-discount
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://loyalty-admin.appstle.com/api/external/update-discount \
-H 'Content-Type: application/json' \
-d '{
"customerId": 67890,
"discountCode": "LOYALTY15OFF",
"status": "USED"
}'{ "id": 12345, "customerId": 67890, "discountCode": "LOYALTY15OFF", "discountType": "PERCENTAGE", "discountValue": 15, "status": "USED", "expiryDate": "2025-06-30T23:59:59Z", "pointsRedeemed": 100, "usedAt": "2025-01-29T10:45:00Z", "createAt": "2025-01-15T10:30:00Z" }
- https://loyalty-admin.appstle.com/api/external/update-discount-code-status
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://loyalty-admin.appstle.com/api/external/update-discount-code-status \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"customerId": 0,
"customerEmail": "string",
"discountCode": "string",
"status": "string"
}'{ "availablePoints": 0.1, "pendingPoints": 0.1, "creditedPoints": 0.1, "spentAmount": 0.1, "storeCreditBalance": 0.1, "achievableTierId": 0, "currentVipTier": "string", "vipTierExpiredAt": "2019-08-24T14:15:22Z", "createAt": "2019-08-24T14:15:22Z", "rewardedForFacebook": true, "rewardedForPinterest": true, "rewardedForTwitter": true, "rewardedForInstagram": true, "rewardedForYoutube": true, "rewardedForTiktok": true, "rewardedForNewsLetter": true, "rewardedForSms": true, "referredCompleted": 0, "referralLink": "string", "customerStatus": "ACTIVE", "dob": "2019-08-24", "rewards": [ { … } ], "rewardedForCreatingAccount": true, "rewardedForSharingOnFacebook": true, "rewardedForSharingOnX": true }
- https://loyalty-admin.appstle.com/api/external/update-customer-birth-date
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://loyalty-admin.appstle.com/api/external/update-customer-birth-date \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"customerId": 0,
"dob": "2026-01-12",
"status": "ACTIVE"
}'{ "id": 0, "shop": "string", "customerId": 0, "firstName": "string", "lastName": "string", "email": "string", "status": "ACTIVE", "createAt": "2019-08-24T14:15:22Z", "dob": "2019-08-24", "enableEmail": true, "token": "string", "redeemLimit": 0, "redeemLimitOnce": 0, "vipTier": "string", "vipTierId": 0, "vipTierSummary": "string", "availablePoints": 0.1, "pendingPoints": 0.1, "displayName": "string", "vipTierExpiredAt": "2019-08-24T14:15:22Z", "spentAmount": 0.1, "lastActivity": "2019-08-24T14:15:22Z", "ordersCount": 0, "lastMonthlyReminderSentDate": "2019-08-24T14:15:22Z", "redeemedPoints": 0.1, "lastRewardExpiryReminderSentDate": "2019-08-24T14:15:22Z", "vipAssignType": "MANUAL", "phone": "string", "loyaltyProgramEnabled": true, "emailSetting": "string", "skipReview": true, "updatedSettings": "string", "storeCreditAccountId": "string", "emailBouncedOrFailed": true, "availableStoreCredits": 0.1, "isDeletedFromShopify": true, "enableEmailMarketing": true, "enableSmsMarketing": true, "tags": "string", "vipTierAmount": 0.1 }
Request
Validates a discount code for a specific customer before checkout.
When to use this:
- During checkout when customer enters a loyalty discount code
- Before applying discount to verify it belongs to the customer
- To check discount status and expiry
- To retrieve discount details (type, value, restrictions)
Request body:
- customerId: Shopify customer ID (required)
- discountCode: The discount code to validate (required, case-insensitive)
What this endpoint checks:
- Discount code exists in the system
- Code belongs to the specified customer
- Code status is "UNUSED" or "ACTIVE"
- Code has not expired
- Code is valid for current context
Response includes:
- Discount type (PERCENTAGE, FIXED_AMOUNT, FREE_SHIPPING, FREE_PRODUCT)
- Discount value (percentage or fixed amount)
- Expiry date
- Usage restrictions (minimum purchase, specific products, etc.)
- Points that were redeemed for this code
- Shopify discount code ID for reference
Discount statuses:
- UNUSED: Code has not been used yet (valid)
- ACTIVE: Code is being used in an active subscription (valid for renewals)
- USED: Code has already been redeemed (invalid)
- EXPIRED: Code has passed expiry date (invalid)
Integration pattern:
- Customer enters loyalty code at checkout
- Call this endpoint to validate the code
- If 200 response, apply discount in checkout
- After order is placed, call update-discount to mark as USED
- Handle 400/404 by showing error message to customer
Common scenarios:
- Valid code: 200 with full discount details
- Wrong customer: 404 (code exists but for different customer)
- Already used: 400 with "Discount already used" message
- Expired: 400 with expiry information
- Invalid code: 404 (code doesn't exist)
Shopify customer ID (numeric). Identifies which customer is attempting to use the discount code. Used to verify the discount code belongs to this customer. Example: 67890
The discount code to validate. Case-insensitive. This is the code the customer enters at checkout. System will check if:
- Code exists in loyalty system
- Code belongs to this customer
- Code status is UNUSED or ACTIVE
- Code has not expired Examples: "LOYALTY15OFF", "VIP20", "WELCOME10"
- https://loyalty-admin.appstle.com/api/external/check-discount
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://loyalty-admin.appstle.com/api/external/check-discount \
-H 'Content-Type: application/json' \
-d '{
"customerId": 67890,
"discountCode": "LOYALTY15OFF"
}'{ "id": 12345, "customerId": 67890, "discountCode": "LOYALTY15OFF", "discountType": "PERCENTAGE", "discountValue": 15, "status": "UNUSED", "expiryDate": "2025-06-30T23:59:59Z", "pointsRedeemed": 100, "shopifyDiscountCodeId": "gid://shopify/DiscountCode/123", "minimumPurchaseAmount": 50, "createAt": "2025-01-15T10:30:00Z" }
Request
Approves pending point transactions and converts them to available points.
When points are pending:
- Orders with pending fulfillment
- High-risk transactions requiring manual review
- Bulk point grants awaiting approval
- Refund/return waiting periods
- Custom approval workflows
Two approval modes:
Mode 1: Approve all pending transactions
- Set approveAllPendingTransactions=true
- Request body is ignored
- Approves ALL pending transactions for the shop
- Use for bulk approvals or automated workflows
Mode 2: Approve specific transactions
- Set approveAllPendingTransactions=false (or omit parameter)
- Provide pendingPointsApprovalList in request body
- Each item needs: customerId, points, transaction details
- Approves only specified transactions
- Use for selective/manual approval
How approval works:
- Validates pending transactions exist
- Queues approval process (asynchronous via AWS Step Functions)
- Returns 204 immediately (doesn't wait for completion)
- Background process:
- Updates transaction status from PENDING to APPROVED
- Adds points to customer's availablePoints
- Updates creditedPoints total
- Syncs to Shopify metafields
- Logs approval activity
- Triggers any applicable notifications
Important notes:
- This is an ASYNCHRONOUS operation
- Returns 204 immediately, processing happens in background
- Points may take a few seconds to appear in customer account
- No rollback after 204 response
- Cannot approve already-approved transactions
- Cannot approve rejected transactions
Request body structure (for specific approvals):
[
{
"customerId": 12345,
"points": 50.0,
"transactionId": 98765,
"note": "Order fulfilled, approving points"
}
]Best practices:
- Use approveAllPendingTransactions=true for scheduled/automated approvals
- Use specific approval list for manual review workflows
- Monitor for completion by checking customer point balance
- Set up webhooks/polling to detect when approval completes
- Don't call repeatedly - it's queued asynchronously
- Consider rate limiting on your side for bulk approvals
Common use cases:
- Approve points after order fulfillment
- Batch approval at end of day/week
- Manual approval after fraud review
- Approve after return/refund window closes
- Integration with external approval systems
Error handling:
- 204: Success, approval queued (this is success, not an error)
- 400: Invalid request format or missing required data
- 401: Invalid API key
- https://loyalty-admin.appstle.com/api/external/approve-pending-transactions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://loyalty-admin.appstle.com/api/external/approve-pending-transactions?approveAllPendingTransactions=true' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '[
{
"transactionId": 0,
"customerId": 0
}
]'Approval process started successfully (asynchronous operation). Points will be added to customer accounts within a few seconds.
No contentRequest
Processes a point redemption request and generates a discount code or reward.
How it works:
- Validates customer has sufficient available points
- Deducts points from customer's balance
- Creates a discount code in Shopify (if applicable)
- Creates a reward record with status "UNUSED"
- Logs the transaction for audit trail
- Returns updated customer loyalty information
Request body fields:
- customerId OR customerEmail: Identify the customer (provide one, not both)
- redeemRuleId: ID of the redemption rule to use (required)
- points: Number of points to redeem (optional - uses rule default if not provided)
- variantId: Product variant ID for product-specific rewards (optional, required for product rewards)
Redemption rule types:
- Fixed discount: Creates discount code for fixed amount off
- Percentage discount: Creates discount code for percentage off
- Free shipping: Creates free shipping discount code
- Free product: Creates discount code for free product (requires variantId)
- Store credit: Adds credit to customer's account
Important validation rules:
- Customer must have >= points required for redemption
- Customer must be enrolled in loyalty program
- Redemption rule must be active
- For product rewards, variantId is required
- Points are deducted immediately (transaction is atomic)
Common errors:
- "Insufficient points": Customer doesn't have enough available points
- "Redemption rule not found": Invalid redeemRuleId
- "Customer not found": Invalid customer ID/email
- "Variant ID required": Missing variantId for product reward
- "Customer not enrolled": Customer hasn't been enrolled in loyalty program
Best practices:
- Always check customer's availablePoints before attempting redemption
- Use GET /api/external/point-redeem-rules to get available redemption options
- Store the returned discount code for customer to use at checkout
- Monitor for 400 errors and handle insufficient points gracefully
Shopify customer ID (numeric). Identifies which customer is redeeming points. Provide either customerId OR customerEmail, not both. Example: 67890
Customer's email address. Alternative to customerId for identifying the customer. Provide either customerId OR customerEmail, not both. Must be a valid email address that exists in your Shopify store. Example: customer@example.com
ID of the redemption rule to use. Determines what reward the customer receives. Use GET /api/external/point-redeem-rules to get available redemption options. Must be an active redemption rule configured in your loyalty program. Example: 5
Number of points to redeem. Must be positive. If not provided, uses the default points value from the redemption rule. Customer must have at least this many available points. Example: 100.0
- https://loyalty-admin.appstle.com/api/external/redeem-points
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://loyalty-admin.appstle.com/api/external/redeem-points \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"customerId": 67890,
"redeemRuleId": 5,
"points": 100,
"variantId": 12345678
}'{ "availablePoints": 150, "pendingPoints": 0, "creditedPoints": 500, "spentAmount": 1250.99, "storeCreditBalance": 0, "currentVipTier": "Gold", "rewards": [ { … } ], "customerStatus": "ACTIVE" }
Request
Enrolls a customer into the loyalty program for a specific shop.
What this endpoint does:
- Activates loyalty features for the customer
- Allows the customer to start earning and redeeming points
- Creates necessary customer records in the loyalty system
- May trigger welcome rewards if configured
When to use this:
- After a new customer signs up on your store
- When enabling loyalty for existing customers
- During bulk customer migrations
Important notes:
- Customer must exist in Shopify before enrollment
- If customer is already enrolled, returns success without error
- Idempotent operation - safe to call multiple times
- Customer ID must be the Shopify customer ID (numeric)
Authentication: Requires X-API-Key header. Get your API key from the Loyalty app settings in your Shopify admin.
- https://loyalty-admin.appstle.com/api/external/enroll-customer
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://loyalty-admin.appstle.com/api/external/enroll-customer?customer_id=0' \
-H 'X-API-Key: string'{ "message": "Customer added successfully" }
Request
Manually adds loyalty points to a customer's account.
Common use cases:
- Grant bonus points for special promotions
- Compensate customers for issues or complaints
- Award points for actions tracked in external systems
- Bulk point adjustments during migrations
- Manual loyalty program adjustments
Request body fields:
- customerId OR customerEmail: Identify the customer (required, provide one)
- points: Number of points to add (required, must be positive)
- note: Description/reason for points addition (optional but recommended)
- earnRuleId: Associate with an earn rule (optional, for tracking purposes)
How it works:
- Validates customer exists and is enrolled
- Adds points to customer's available balance immediately
- Creates a point transaction record with status "APPROVED"
- Logs the activity with the provided note
- Updates customer's total credited points
- Syncs updated points to Shopify metafields
- Returns updated customer loyalty information
Important notes:
- Points are added to availablePoints immediately (not pending)
- Points do NOT expire unless you have expiration rules configured
- Negative points not allowed (use separate remove points endpoint if available)
- Transaction is logged with source "MANUAL_ADJUSTMENT"
- Note field appears in customer's transaction history
- earnRuleId is optional and for categorization only
Best practices:
- Always include a descriptive note explaining why points were added
- Use consistent note format for easier reporting
- Consider using earnRuleId to group similar point additions
- Verify customer ID/email before making API call
- Points are added in real-time - no undo functionality
Example notes:
- "Bonus points for email signup - January promotion"
- "Compensation for delayed shipping - Order #1234"
- "Referral bonus from external system"
- "Migration - transferred from old loyalty system"
- "Birthday bonus - 2025"
Shopify customer ID (numeric). Identifies which customer receives the points. Provide either customerId OR customerEmail, not both. Customer must be enrolled in the loyalty program. Example: 67890
Customer's email address. Alternative to customerId for identifying the customer. Provide either customerId OR customerEmail, not both. Must be a valid email address that exists in your Shopify store. Email matching is case-insensitive. Example: customer@example.com
Number of points to add to the customer's account. Must be a positive number. Points are added to availablePoints immediately (not pending). Decimal values are supported for fractional points. Example: 50.0
Optional: ID of an earn rule to associate with this point addition. Used for categorization and reporting purposes only. Does not affect point calculation - points parameter takes precedence. Helps group similar types of point additions in reports. Example: 10
Optional but strongly recommended: Description of why points are being added. This note appears in the customer's transaction history and admin logs. Best practices:
- Be specific about the reason
- Include reference numbers (order ID, ticket ID, etc.)
- Use consistent formatting for easier reporting Examples:
- "Birthday bonus - January 2025"
- "Compensation for delayed shipping - Order #1234"
- "Referral bonus from external campaign"
- "Migration - transferred from old system"
- "Manual adjustment per support ticket #567"
- https://loyalty-admin.appstle.com/api/external/add-points
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://loyalty-admin.appstle.com/api/external/add-points \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"customerEmail": "customer@example.com",
"points": 50,
"note": "Compensation for delayed shipping - Order #1234"
}'{ "availablePoints": 350, "pendingPoints": 0, "creditedPoints": 600, "spentAmount": 1250.99, "storeCreditBalance": 0, "currentVipTier": "Gold", "customerStatus": "ACTIVE", "rewards": [] }
- https://loyalty-admin.appstle.com/api/external/add-credits
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://loyalty-admin.appstle.com/api/external/add-credits \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"customerId": 0,
"customerEmail": "string",
"credits": 0.1,
"earnRuleId": 0,
"note": "string"
}'{ "availablePoints": 0.1, "pendingPoints": 0.1, "creditedPoints": 0.1, "spentAmount": 0.1, "storeCreditBalance": 0.1, "achievableTierId": 0, "currentVipTier": "string", "vipTierExpiredAt": "2019-08-24T14:15:22Z", "createAt": "2019-08-24T14:15:22Z", "rewardedForFacebook": true, "rewardedForPinterest": true, "rewardedForTwitter": true, "rewardedForInstagram": true, "rewardedForYoutube": true, "rewardedForTiktok": true, "rewardedForNewsLetter": true, "rewardedForSms": true, "referredCompleted": 0, "referralLink": "string", "customerStatus": "ACTIVE", "dob": "2019-08-24", "rewards": [ { … } ], "rewardedForCreatingAccount": true, "rewardedForSharingOnFacebook": true, "rewardedForSharingOnX": true }
- https://loyalty-admin.appstle.com/api/external/top-customers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://loyalty-admin.appstle.com/api/external/top-customers?page=0&size=1&sort=string' \
-H 'X-API-Key: string'{ "customerId": 0, "firstName": "string", "lastName": "string", "pointsEarned": 0.1, "activitiesCompleted": 0 }
- https://loyalty-admin.appstle.com/api/external/point-transaction-history/{customer_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://loyalty-admin.appstle.com/api/external/point-transaction-history/{customer_id}' \
-H 'X-API-Key: string'{ "id": 0, "shop": "string", "customerId": 0, "points": 0.1, "pointType": "DEBIT", "note": "string", "status": "APPROVED", "transactionRule": "ADJUSTMENT", "earnRuleId": 0, "earnRuleName": "string", "redeemRuleRuleId": 0, "redeemRuleName": "string", "autoApprovalDays": 0, "orderId": 0, "orderName": "string", "createAt": "2019-08-24T14:15:22Z", "imported": true, "spentAmount": 0.1, "contractId": "string", "orderFinancialStatus": "string", "orderFulfillmentStatus": "string", "orderLineItemId": 0, "rewardType": "STORE_CREDIT", "displayName": "string" }
- https://loyalty-admin.appstle.com/api/external/point-redeem-rules
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://loyalty-admin.appstle.com/api/external/point-redeem-rules \
-H 'X-API-Key: string'{ "id": 0, "shop": "string", "name": "string", "type": "DISCOUNT_CODE", "referralType": "EXISTING_CUSTOMER_REWARD", "status": "ACTIVE", "redeemPoints": 0.1, "discountType": "PERCENTAGE", "discount": 0.1, "minimumPurchaseAmount": 0.1, "createAt": "2019-08-24T14:15:22Z", "updateAt": "2019-08-24T14:15:22Z", "maximumShippingRate": 0.1, "productId": 0, "variantId": 0, "productData": "string", "collectionId": 0, "collectionData": "string", "customerFacingLabel": "string", "restrictCustomers": "string", "restrictCustomersWithTags": "string", "rewardInterval": "DAY", "appliesOn": "ONE_TIME", "combinedWithProductDiscount": true, "combinedWithShippingDiscount": true, "combinedWithOrderDiscount": true, "triggeredCount": 0, "pointsCost": 0.1, "enableInterval": true, "redeemLimit": 0, "enableNumberOfUsagesLimit": true, "numberOfUsagesLimit": 0, "allowedCustomerTags": "string", "earnRuleId": 0, "vipTierId": 0, "redeemLabel": "string", "customerFacingIconUrl": "string", "serial": 0, "discountCodeForAllCustomer": true, "allowedCountries": "string", "showInPosOnly": true, "redeemAllPoints": true, "enableMinimumPointsToRedeem": true, "requiredMinimumPointsToRedeem": 0.1, "enableMaximumPointsToRedeem": true, "requiredMaximumPointsToRedeem": 0.1, "enablePOS": true, "minimumPointsLabel": "string", "maximumPointsLabel": "string", "applyDiscountOnce": true, "enableDiscountPrefix": true, "discountPrefixText": "string", "discountCodeNodeId": "string", "translations": "string", "quantity": 0 }
- https://loyalty-admin.appstle.com/api/external/point-earn-rules
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://loyalty-admin.appstle.com/api/external/point-earn-rules?includeInactive=false' \
-H 'X-API-Key: string'{ "id": 0, "shop": "string", "type": "PURCHASE", "status": "ACTIVE", "historicPurchaseDuration": "NONE", "basePoints": 0.1, "includeSubtotal": true, "includeTax": true, "excludeCollections": "string", "name": "string", "customerNotification": "string", "createAt": "2019-08-24T14:15:22Z", "updateAt": "2019-08-24T14:15:22Z", "rewardInterval": "DAY", "productId": 0, "collectionId": 0, "variantId": 0, "productData": "string", "triggeredCount": 0, "pointsProvided": 0.1, "collectionData": "string", "customerFacingLabel": "string", "socialUrl": "string", "disableForOnSellProduct": true, "autoApprovalDays": 0, "enableInterval": true, "earnLimit": 0, "activityType": "REGULAR", "allowedCustomerTags": "string", "includeShippingPoints": true, "eligibleForFirstOrder": true, "maximumPoints": 0, "restrictCustomerTags": "string", "customerFacingIconUrl": "string", "serial": 0, "excludeOrderTags": "string", "pointBasedOn": "QUANTITY", "excludeProducts": "string", "givePointsToGuestCustomers": true, "allowedProductTags": "string", "restrictProductTags": "string", "rollBackPointsOnUnsubscribe": true, "addAdditionalPoints": true, "additionalPoints": 0.1, "refundNotificationLabel": "string", "disablePointsForDiscountedProduct": true, "platformType": "POS_ONLY", "vipTierId": 0, "earnType": "STORE_CREDIT", "minimumOrderValue": 0.1, "allowedOrderTags": "string", "excludeVariantIds": "string", "rewardAssignType": "DYNAMIC", "applyOnImportedCustomer": true, "enableBirthdayPromo": true, "promoPointsMultiplier": 0.1, "ruleStartDate": "2019-08-24T14:15:22Z", "ruleEndDate": "2019-08-24T14:15:22Z", "translations": "string" }
Request
Retrieves comprehensive loyalty program details for a customer.
What you'll get:
- Current point balance (available, pending, credited)
- Store credit balance
- VIP tier information and expiration date
- List of rewards/discount codes with their status
- Social media engagement status
- Referral statistics
- Customer enrollment date
Query options:
- By customer ID: Use customerId parameter with Shopify customer ID
- By email: Use customerEmail parameter with customer's email address
- You must provide either customerId OR customerEmail (not both)
Filtering rewards:
- Use status parameter to filter rewards: "ACTIVE", "USED", "UNUSED", "EXPIRED"
- Comma-separated for multiple statuses: "UNUSED,ACTIVE"
- Omit status parameter to get all rewards
Common use cases:
- Display customer's loyalty dashboard
- Check point balance before redemption
- Verify discount code availability
- Show VIP tier progress
- Display referral achievements
Response field explanations:
- availablePoints: Points customer can redeem right now
- pendingPoints: Points awaiting approval (e.g., from pending orders)
- creditedPoints: Total points earned all-time
- spentAmount: Total monetary value of purchases
- storeCreditBalance: Store credit in shop currency
- currentVipTier: Name of customer's current VIP tier (null if not in a tier)
- vipTierExpiredAt: When the VIP tier expires (null if permanent or not in tier)
- rewardedForFacebook/Instagram/etc: Whether customer claimed social media points
- referredCompleted: Count of successful referrals
- referralLink: Unique referral URL for this customer
- rewards: Array of discount codes/rewards with status, expiry, and value
- https://loyalty-admin.appstle.com/api/external/customer-loyalty
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://loyalty-admin.appstle.com/api/external/customer-loyalty?customerId=0&customerEmail=string&status=string' \
-H 'X-API-Key: string'{ "availablePoints": 250, "pendingPoints": 50, "creditedPoints": 500, "spentAmount": 1250.99, "storeCreditBalance": 25, "currentVipTier": "Gold", "vipTierExpiredAt": "2025-12-31T23:59:59Z", "achievableTierId": 2, "createAt": "2024-01-15T10:00:00Z", "rewardedForFacebook": true, "rewardedForInstagram": false, "rewardedForTwitter": false, "rewardedForPinterest": false, "rewardedForYoutube": false, "rewardedForTiktok": false, "rewardedForNewsLetter": true, "rewardedForSms": false, "rewardedForCreatingAccount": true, "rewardedForSharingOnFacebook": false, "rewardedForSharingOnX": false, "referredCompleted": 3, "referralLink": "https://yourstore.com/r/abc123", "customerStatus": "ACTIVE", "dob": "1990-05-15", "rewards": [ { … } ] }