Skip to main content
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"
}
{
"error": "Either customerId or customerEmail is required"
}
{
"error": "Invalid API key"
}
{
"error": "Customer not found"
}

Headers

X-API-Key
string
required

API key for authentication

Query Parameters

customerId
integer<int64>

Shopify customer ID (optional if customerEmail provided)

customerEmail
string

Customer email address (optional if customerId provided)

status
string

Filter rewards by status (comma-separated: ACTIVE, USED, UNUSED)

Response

Successfully retrieved customer loyalty details

achievableTierId
integer<int64>
availablePoints
number<double>
createAt
string<date-time>
creditedPoints
number<double>
currentVipTier
string
customerStatus
enum<string>
Available options:
ACTIVE,
INACTIVE,
EXCLUDED,
EXCLUDED_BY_CUSTOMER
dob
string<date>
expiringPointsAmount
number<double>
pendingPoints
number<double>
pointsExpireAt
string<date-time>
referredCompleted
integer<int64>
rewardedForCreatingAccount
boolean
rewardedForFacebook
boolean
rewardedForInstagram
boolean
rewardedForNewsLetter
boolean
rewardedForPinterest
boolean
rewardedForSharingOnFacebook
boolean
rewardedForSharingOnX
boolean
rewardedForSms
boolean
rewardedForTiktok
boolean
rewardedForTwitter
boolean
rewardedForYoutube
boolean
rewards
object[]
spentAmount
number<double>
storeCreditBalance
number<double>
storeCreditCurrency
string
vipTierExpiredAt
string<date-time>