cURL
curl --request GET \
--url https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.loyaltylion.com/v2/customers/{merchant_id}/transactions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"transactions": [
{
"id": 123,
"customer": {
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_pending": 123,
"points_approved": 123,
"points_spent": 123
},
"points_approved": 123,
"points_pending": 123,
"created_at": "<string>",
"resource": "activity",
"activity": {
"id": 123,
"merchant_id": "<string>",
"value": 123,
"state": "pending",
"customer": {
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_pending": 123,
"points_approved": 123,
"points_spent": 123
},
"created_at": "<string>",
"resource": null,
"rule": {
"id": 123,
"name": "<string>",
"title": "<string>"
},
"flow": {
"id": 123,
"journey_id": 123,
"name": "<string>",
"block_id": "<string>"
}
}
}
],
"cursor": {
"prev": "<string>",
"next": "<string>"
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": "<string>"
}Customers
List Transactions
GET
/
v2
/
customers
/
{merchant_id}
/
transactions
cURL
curl --request GET \
--url https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.loyaltylion.com/v2/customers/{merchant_id}/transactions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"transactions": [
{
"id": 123,
"customer": {
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_pending": 123,
"points_approved": 123,
"points_spent": 123
},
"points_approved": 123,
"points_pending": 123,
"created_at": "<string>",
"resource": "activity",
"activity": {
"id": 123,
"merchant_id": "<string>",
"value": 123,
"state": "pending",
"customer": {
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_pending": 123,
"points_approved": 123,
"points_spent": 123
},
"created_at": "<string>",
"resource": null,
"rule": {
"id": 123,
"name": "<string>",
"title": "<string>"
},
"flow": {
"id": 123,
"journey_id": 123,
"name": "<string>",
"block_id": "<string>"
}
}
}
],
"cursor": {
"prev": "<string>",
"next": "<string>"
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": "<string>"
}Retrieve a list of transactions for this customer.
Unlike activities and rewards, transactions are immutable. For example, if an
activity is triggered and then voided, it will typically create two transactions,
one which adds points and a second which removes points.
Authorizations
ProgramApiKeySiteTokenSecret
An API key linked to a Program in LoyaltyLion, with a set of permissions (scopes). API keys can be created manually, or acquired through an OAuth2 flow. The API key should be provided as a Bearer token in the Authorization header
Path Parameters
The ID of the customer in your platform or ecommerce store
Query Parameters
The format of the response
Available options:
csv, json Return only resources whose id is after the specified id
Required range:
x >= 0Max number of resources to return per request
Required range:
1 <= x <= 500Fetch another page of results using a cursor returned in a previous response
Return only transactions created on or after the specified ISO 8601 datetime string
Return only transactions created before the specified ISO 8601 datetime string