Skip to main content
GET
/
v2
/
transactions
cURL
curl --request GET \
  --url https://api.loyaltylion.com/v2/transactions \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.loyaltylion.com/v2/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/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/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/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/transactions")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.loyaltylion.com/v2/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": "<string>",
      "activity": {
        "id": 123,
        "merchant_id": "<string>",
        "value": 123,
        "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>",
"details": {}
}
}
{
"error": {
"message": "<string>",
"details": {}
}
}
Retrieve a list of transactions for the program. Each transaction represents an addition or removal of points from a 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

Authorization
string
header
required

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

Query Parameters

type
enum<string>
default:json

The format of the response

Available options:
csv,
json
since_id
integer

Return only resources whose id is after the specified id

Required range: x >= 0
limit
integer
default:100

Max number of resources to return per request

Required range: 1 <= x <= 500
cursor
string

Fetch another page of results using a cursor returned in a previous response

customer_id
number

Return only transactions for this LoyaltyLion customer ID

created_at_min
string

Return only transactions created on or after the specified ISO 8601 datetime string

created_at_max
string

Return only transactions created before the specified ISO 8601 datetime string

Response

200

transactions
(Activity · object | Adjustment · object | Expiry · object | Reward · object)[]
required
cursor
object
required