Points & Earn Rules
Get customer point transaction history
Retrieves paginated list of point transactions for the authenticated customer, ordered by ID descending (most recent first). Each transaction includes details about points earned or spent, transaction type, status (PENDING, APPROVED, REJECTED), associated order information, and timestamps. Useful for displaying transaction history to customers.
GET
/
loyalty
/
cp
/
api
/
transaction-by-shop
Get customer point transaction history
curl --request GET \
--url https://{storeDomain}/apps/loyalty/cp/api/transaction-by-shopimport requests
url = "https://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop';
const options = {method: 'GET'};
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://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop"
req, _ := http.NewRequest("GET", url, nil)
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://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"createAt": "2025-01-15T10:30:00Z",
"customerId": 67890,
"id": 12345,
"note": "Points earned for purchase",
"pointType": "EARNED",
"points": 50,
"shop": "example-store.myshopify.com",
"spentAmount": 99.99,
"status": "APPROVED",
"transactionRule": "ORDER_PLACED"
}
]Query Parameters
Response
Point transactions retrieved successfully with pagination headers (X-Total-Count, Link)
⌘I
Get customer point transaction history
curl --request GET \
--url https://{storeDomain}/apps/loyalty/cp/api/transaction-by-shopimport requests
url = "https://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop';
const options = {method: 'GET'};
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://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop"
req, _ := http.NewRequest("GET", url, nil)
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://{storeDomain}/apps/loyalty/cp/api/transaction-by-shop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"createAt": "2025-01-15T10:30:00Z",
"customerId": 67890,
"id": 12345,
"note": "Points earned for purchase",
"pointType": "EARNED",
"points": 50,
"shop": "example-store.myshopify.com",
"spentAmount": 99.99,
"status": "APPROVED",
"transactionRule": "ORDER_PLACED"
}
]