cURL
curl --request GET \
--url https://api.loyaltylion.com/v2/customers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loyaltylion.com/v2/customers"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/v2/customers")
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{
"customers": [
{
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_approved": 123,
"points_pending": 123,
"points_spent": 123,
"properties": {},
"metadata": {
"shopify_source_url": "<string>"
},
"rewards_claimed": 1,
"blocked": true,
"guest": true,
"enrolled": true,
"enrolled_at": "<string>",
"referral_id": "<string>",
"referred_by": {
"id": 123,
"merchant_id": "<string>"
},
"loyalty_tier_membership": {
"started_at": "<string>",
"expires_at": "<string>",
"manual": true,
"loyalty_tier": {
"id": 123,
"name": "<string>",
"number": 2,
"default": true,
"hidden": true,
"lower_bound": "<string>",
"upper_bound": "<string>",
"position": 1
}
},
"insights_segment": "At Risk",
"birthday": "<string>",
"referral_url": "<string>",
"receipt_upload_url": "<string>",
"loyalty_pass_url": "<string>",
"loyalty_pass_installed": true,
"created_at": "<string>",
"updated_at": "<string>",
"linked_merchant_ids": [
"<string>"
]
}
],
"cursor": {
"prev": "<string>",
"next": "<string>"
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}Customers
List Customers
GET
/
v2
/
customers
cURL
curl --request GET \
--url https://api.loyaltylion.com/v2/customers \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loyaltylion.com/v2/customers"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/v2/customers")
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{
"customers": [
{
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_approved": 123,
"points_pending": 123,
"points_spent": 123,
"properties": {},
"metadata": {
"shopify_source_url": "<string>"
},
"rewards_claimed": 1,
"blocked": true,
"guest": true,
"enrolled": true,
"enrolled_at": "<string>",
"referral_id": "<string>",
"referred_by": {
"id": 123,
"merchant_id": "<string>"
},
"loyalty_tier_membership": {
"started_at": "<string>",
"expires_at": "<string>",
"manual": true,
"loyalty_tier": {
"id": 123,
"name": "<string>",
"number": 2,
"default": true,
"hidden": true,
"lower_bound": "<string>",
"upper_bound": "<string>",
"position": 1
}
},
"insights_segment": "At Risk",
"birthday": "<string>",
"referral_url": "<string>",
"receipt_upload_url": "<string>",
"loyalty_pass_url": "<string>",
"loyalty_pass_installed": true,
"created_at": "<string>",
"updated_at": "<string>",
"linked_merchant_ids": [
"<string>"
]
}
],
"cursor": {
"prev": "<string>",
"next": "<string>"
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"details": {}
}
}Authorizations
ProgramApiKeySiteTokenSecret