Get Transactions
curl --request GET \
--url https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction \
--header 'Authorization: Bearer <token>'import requests
url = "https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction', 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://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction",
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://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction"
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://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction")
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{
"status": 200,
"message": "",
"errors": {},
"data": [
{
"profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
"transactionExternalReference": "LOYALTY-8675309",
"transactionEntityReference": "Liberty_center_store",
"transactionCode": "62660e74-02e3-11e8-b443-00163e990abc",
"transactionTypeExternalReference": "PURCHASE",
"transactionType": "EARN",
"transactionActivityType": "BASE_POINTS_EARNED",
"transactionDateTime": "2020-03-20T14:28:23.382748",
"totalAmountPaid": 180,
"totalTax": 20,
"discounts": [
{
"id": 101,
"value": 20,
"type": "tier"
}
],
"discountValue": 20,
"transactionNetAmount": 160,
"points": 160,
"currentPointsBalance": 360,
"basePoints": 260,
"bonusPoints": 100,
"promotionalPoints": 0,
"transactionItems": [
{
"grossAmount": 200,
"totalAmountPaid": 200,
"taxAmount": 20,
"netAmount": 180,
"itemPrice": 90,
"itemQuantity": 2,
"SKU": "1123455",
"lineNumber": 0,
"itemName": "demo item",
"UOM": "unit",
"discounts": [
{
"id": 2345,
"value": 0,
"type": "promotion",
"description": "Black Friday discount"
}
],
"couponCodes": [
"H4B-1000"
]
}
],
"activityTimestamp": "2020-02-08 09:30:26",
"transactionNumber": "LOYALTY-8675309",
"reasonCode": "9393",
"reasonDescription": "earning item",
"deviceId": "D10626",
"issueAuditUser": "Joe",
"cancelAuditUser": "John",
"rewards": [
{
"reward_id": 111,
"core_rule_id": 2,
"reward_portion": 10
}
]
}
]
}{
"message": "Error message string",
"errors": {
"ExceptionString": [
"Invalid Field"
]
},
"data": null,
"status": 400
}{
"detail": "Authentication Failed"
}Earn
Get Transactions
Gets transactions based on the limit (default: 20) and offset (default: 0) values. This endpoint serves to populate the transaction listing page and as a search function based on the query parameters such as date range, transaction ID, etc.
GET
/
v2
/
earn
/
get-transaction
Get Transactions
curl --request GET \
--url https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction \
--header 'Authorization: Bearer <token>'import requests
url = "https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction', 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://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction",
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://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction"
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://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://vanilla-dev02-loyalty.fabric.zone/api/v2/earn/get-transaction")
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{
"status": 200,
"message": "",
"errors": {},
"data": [
{
"profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
"transactionExternalReference": "LOYALTY-8675309",
"transactionEntityReference": "Liberty_center_store",
"transactionCode": "62660e74-02e3-11e8-b443-00163e990abc",
"transactionTypeExternalReference": "PURCHASE",
"transactionType": "EARN",
"transactionActivityType": "BASE_POINTS_EARNED",
"transactionDateTime": "2020-03-20T14:28:23.382748",
"totalAmountPaid": 180,
"totalTax": 20,
"discounts": [
{
"id": 101,
"value": 20,
"type": "tier"
}
],
"discountValue": 20,
"transactionNetAmount": 160,
"points": 160,
"currentPointsBalance": 360,
"basePoints": 260,
"bonusPoints": 100,
"promotionalPoints": 0,
"transactionItems": [
{
"grossAmount": 200,
"totalAmountPaid": 200,
"taxAmount": 20,
"netAmount": 180,
"itemPrice": 90,
"itemQuantity": 2,
"SKU": "1123455",
"lineNumber": 0,
"itemName": "demo item",
"UOM": "unit",
"discounts": [
{
"id": 2345,
"value": 0,
"type": "promotion",
"description": "Black Friday discount"
}
],
"couponCodes": [
"H4B-1000"
]
}
],
"activityTimestamp": "2020-02-08 09:30:26",
"transactionNumber": "LOYALTY-8675309",
"reasonCode": "9393",
"reasonDescription": "earning item",
"deviceId": "D10626",
"issueAuditUser": "Joe",
"cancelAuditUser": "John",
"rewards": [
{
"reward_id": 111,
"core_rule_id": 2,
"reward_portion": 10
}
]
}
]
}{
"message": "Error message string",
"errors": {
"ExceptionString": [
"Invalid Field"
]
},
"data": null,
"status": 400
}{
"detail": "Authentication Failed"
}Authorizations
Query Parameters
Refers to the different type of transaction activities on a member account such as Earn Transaction, Burn Transaction, Earn Reverse Transaction and so on
Available options:
EARN, BURN, EXPIRY, EARN_REVERSE, BURN_REVERSE, ADJUSTMENT, DEDUCT, TRANSFER, MERGE, FORFEITED, CONVERT, UNMERGE Response
OK
Was this page helpful?
