Consumers
GET /consumers/{id}/loyalty-transactions
Get consumer loyalty point transaction history with pagination
GET
/
consumers
/
{id}
/
loyalty-transactions
cURL
curl --request GET \
--url https://admin.fanfare.io/api/consumers/{id}/loyalty-transactions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://admin.fanfare.io/api/consumers/{id}/loyalty-transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://admin.fanfare.io/api/consumers/{id}/loyalty-transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admin.fanfare.io/api/consumers/{id}/loyalty-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))
}{
"expiringBuckets": [
{
"earnedOn": "<string>",
"expiresOn": "<string>",
"pointsRemaining": 123
}
],
"nextCursor": "<string>",
"transactions": [
{
"bucketExpiresOn": "<string>",
"id": "<string>",
"metadata": {},
"occurredAt": "<string>",
"pointsDelta": 123,
"sourceDescription": "<string>",
"sourceType": "<string>",
"txnType": "earn"
}
]
}{
"error": "validation_error",
"issues": [
{
"expected": "<string>",
"kind": "<string>",
"message": "<string>",
"path": [
{
"input": "<unknown>",
"key": "<string>",
"origin": "<string>",
"type": "<string>"
}
],
"received": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Fanfare secret key. Keep secret credentials on your server.
Path Parameters
⌘I
cURL
curl --request GET \
--url https://admin.fanfare.io/api/consumers/{id}/loyalty-transactions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://admin.fanfare.io/api/consumers/{id}/loyalty-transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://admin.fanfare.io/api/consumers/{id}/loyalty-transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admin.fanfare.io/api/consumers/{id}/loyalty-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))
}{
"expiringBuckets": [
{
"earnedOn": "<string>",
"expiresOn": "<string>",
"pointsRemaining": 123
}
],
"nextCursor": "<string>",
"transactions": [
{
"bucketExpiresOn": "<string>",
"id": "<string>",
"metadata": {},
"occurredAt": "<string>",
"pointsDelta": 123,
"sourceDescription": "<string>",
"sourceType": "<string>",
"txnType": "earn"
}
]
}{
"error": "validation_error",
"issues": [
{
"expected": "<string>",
"kind": "<string>",
"message": "<string>",
"path": [
{
"input": "<unknown>",
"key": "<string>",
"origin": "<string>",
"type": "<string>"
}
],
"received": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}