Customer Enrollment & Profile
Get customer loyalty details
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: “UNUSED”, “USED”, “EXPIRED”, “SUBSCRIPTION_ACTIVE”, “REFUNDED”, “CANCELED”
- Comma-separated for multiple statuses: “UNUSED,USED”
- Omit status parameter to get only UNUSED rewards
- An unknown status returns 400
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: Approved points earned toward VIP tiers, since the VIP program’s start date or within its current evaluation period. Points given back for a cancelled, returned or expired reward aren’t counted again.
- 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
GET
/
api
/
external
/
customer-loyalty
Get customer loyalty details
curl --request GET \
--url https://loyalty-admin.appstle.com/api/external/customer-loyalty \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://loyalty-admin.appstle.com/api/external/customer-loyalty"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://loyalty-admin.appstle.com/api/external/customer-loyalty', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://loyalty-admin.appstle.com/api/external/customer-loyalty';
const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalty-admin.appstle.com/api/external/customer-loyalty",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://loyalty-admin.appstle.com/api/external/customer-loyalty"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://loyalty-admin.appstle.com/api/external/customer-loyalty")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"achievableTierId": 2,
"availablePoints": 250,
"createAt": "2024-01-15T10:00:00Z",
"creditedPoints": 500,
"currentVipTier": "Gold",
"customerStatus": "ACTIVE",
"dob": "1990-05-15",
"pendingPoints": 50,
"referralLink": "https://yourstore.com/r/abc123",
"referredCompleted": 3,
"rewardedForCreatingAccount": true,
"rewardedForFacebook": true,
"rewardedForInstagram": false,
"rewardedForNewsLetter": true,
"rewardedForPinterest": false,
"rewardedForSharingOnFacebook": false,
"rewardedForSharingOnX": false,
"rewardedForSms": false,
"rewardedForTiktok": false,
"rewardedForTwitter": false,
"rewardedForYoutube": false,
"rewards": [
{
"discountCode": "LOYALTY10OFF",
"discountType": "PERCENTAGE",
"discountValue": 10,
"expiryDate": "2025-06-30T23:59:59Z",
"id": 12345,
"pointsRedeemed": 100,
"status": "UNUSED"
}
],
"spentAmount": 1250.99,
"storeCreditBalance": 25,
"vipTierExpiredAt": "2025-12-31T23:59:59Z"
}{
"status": 400,
"title": "Customer not found using this customerID"
}{
"detail": "Invalid authentication",
"status": 401
}Query Parameters
Response
Successfully retrieved customer loyalty details
The customer's short referral link, on https://referral.appstle.com/ or the merchant's custom referral domain. Its last part is the customer's referral token, which Accept referral offer takes as token. The link redirects to the store's primary domain with appstle_referral=true and appstle_referral_code={token} in the query string.
Example:
"https://referral.appstle.com/abc123def456ghij"
⌘I
Get customer loyalty details
curl --request GET \
--url https://loyalty-admin.appstle.com/api/external/customer-loyalty \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://loyalty-admin.appstle.com/api/external/customer-loyalty"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://loyalty-admin.appstle.com/api/external/customer-loyalty', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://loyalty-admin.appstle.com/api/external/customer-loyalty';
const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalty-admin.appstle.com/api/external/customer-loyalty",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://loyalty-admin.appstle.com/api/external/customer-loyalty"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://loyalty-admin.appstle.com/api/external/customer-loyalty")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"achievableTierId": 2,
"availablePoints": 250,
"createAt": "2024-01-15T10:00:00Z",
"creditedPoints": 500,
"currentVipTier": "Gold",
"customerStatus": "ACTIVE",
"dob": "1990-05-15",
"pendingPoints": 50,
"referralLink": "https://yourstore.com/r/abc123",
"referredCompleted": 3,
"rewardedForCreatingAccount": true,
"rewardedForFacebook": true,
"rewardedForInstagram": false,
"rewardedForNewsLetter": true,
"rewardedForPinterest": false,
"rewardedForSharingOnFacebook": false,
"rewardedForSharingOnX": false,
"rewardedForSms": false,
"rewardedForTiktok": false,
"rewardedForTwitter": false,
"rewardedForYoutube": false,
"rewards": [
{
"discountCode": "LOYALTY10OFF",
"discountType": "PERCENTAGE",
"discountValue": 10,
"expiryDate": "2025-06-30T23:59:59Z",
"id": 12345,
"pointsRedeemed": 100,
"status": "UNUSED"
}
],
"spentAmount": 1250.99,
"storeCreditBalance": 25,
"vipTierExpiredAt": "2025-12-31T23:59:59Z"
}{
"status": 400,
"title": "Customer not found using this customerID"
}{
"detail": "Invalid authentication",
"status": 401
}