cURL
curl --request GET \
--url https://api.loyaltylion.com/v2/sites \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loyaltylion.com/v2/sites"
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/sites', 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/sites",
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/sites"
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/sites")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/v2/sites")
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{
"sites": [
{
"id": 123,
"program_id": 123,
"account_id": 123,
"name": "Luna's Bubble Tea Superstore",
"url": "https://bubbles.example.com",
"platform": "shopify",
"currencies": [
"usd"
],
"languages": [
"en",
"en-gb",
"fr"
],
"created_at": "2025-03-03T00:00:00.000Z",
"updated_at": "2026-03-01T12:00:00.000Z"
}
]
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}Sites
List Sites
GET
/
v2
/
sites
cURL
curl --request GET \
--url https://api.loyaltylion.com/v2/sites \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.loyaltylion.com/v2/sites"
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/sites', 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/sites",
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/sites"
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/sites")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loyaltylion.com/v2/sites")
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{
"sites": [
{
"id": 123,
"program_id": 123,
"account_id": 123,
"name": "Luna's Bubble Tea Superstore",
"url": "https://bubbles.example.com",
"platform": "shopify",
"currencies": [
"usd"
],
"languages": [
"en",
"en-gb",
"fr"
],
"created_at": "2025-03-03T00:00:00.000Z",
"updated_at": "2026-03-01T12:00:00.000Z"
}
]
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}Return a list of sites that belong to the authenticating program. This endpoint
cannot be called using legacy token & secret authentication.
For multi-site programs, a list of all sites within the program will be returned,
in order of creation (newest first). For single-site programs, a list with a single site will be returned.
Any of the returned
sites[].id fields can be used to interact with the Headless
API.Authorizations
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
Response
200
Show child attributes
Show child attributes
⌘I