Redeem customer loyalty points
curl --request POST \
--url https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points \
--header 'Content-Type: application/json' \
--data '
{
"redeemRuleId": 5
}
'import requests
url = "https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points"
payload = { "redeemRuleId": 5 }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({redeemRuleId: 5})
};
fetch('https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({redeemRuleId: 5})
};
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/loyalty/cp/api/redeem-points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'redeemRuleId' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points"
payload := strings.NewReader("{\n \"redeemRuleId\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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/loyalty/cp/api/redeem-points")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"redeemRuleId\": 5\n}"
response = http.request(request)
puts response.read_body{
"availablePoints": 150,
"creditedPoints": 500,
"currentVipTier": "Gold",
"pendingPoints": 25,
"rewards": [
{
"createAt": "2025-01-29T10:30:00Z",
"discountCode": "LOYALTY15OFF",
"discountType": "PERCENTAGE",
"discountValue": 15,
"expiryDate": "2025-06-30T23:59:59Z",
"id": 12346,
"pointsRedeemed": 100,
"status": "UNUSED"
}
]
}{
"availablePoints": 50,
"error": "Insufficient points",
"requiredPoints": 100
}{
"error": "Authentication required"
}Body
Point redemption request details including redeem rule ID, points to redeem, and optional variant ID for product rewards
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
5
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
"customer@example.com"
Shopify customer ID (numeric). Identifies which customer is redeeming points. Provide either customerId OR customerEmail, not both. Example: 67890
67890
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
100
Shopify product variant ID. Required when redeeming for product-specific rewards (free product). Not required for discount codes or store credit rewards. Must be a valid variant ID from your Shopify catalog. Example: 12345678
12345678
Response
Points redeemed successfully, returns updated customer loyalty information with new reward
ACTIVE, INACTIVE, EXCLUDED, EXCLUDED_BY_CUSTOMER Show child attributes
Show child attributes
curl --request POST \
--url https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points \
--header 'Content-Type: application/json' \
--data '
{
"redeemRuleId": 5
}
'import requests
url = "https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points"
payload = { "redeemRuleId": 5 }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({redeemRuleId: 5})
};
fetch('https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({redeemRuleId: 5})
};
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/loyalty/cp/api/redeem-points",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'redeemRuleId' => 5
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://loyalty-admin.appstle.com/loyalty/cp/api/redeem-points"
payload := strings.NewReader("{\n \"redeemRuleId\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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/loyalty/cp/api/redeem-points")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"redeemRuleId\": 5\n}"
response = http.request(request)
puts response.read_body{
"availablePoints": 150,
"creditedPoints": 500,
"currentVipTier": "Gold",
"pendingPoints": 25,
"rewards": [
{
"createAt": "2025-01-29T10:30:00Z",
"discountCode": "LOYALTY15OFF",
"discountType": "PERCENTAGE",
"discountValue": 15,
"expiryDate": "2025-06-30T23:59:59Z",
"id": 12346,
"pointsRedeemed": 100,
"status": "UNUSED"
}
]
}{
"availablePoints": 50,
"error": "Insufficient points",
"requiredPoints": 100
}{
"error": "Authentication required"
}