curl --request GET \
--url https://admin.snagsolutions.io/api/loyalty/transaction_entries \
--header 'X-API-KEY: <api-key>'import requests
url = "https://admin.snagsolutions.io/api/loyalty/transaction_entries"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://admin.snagsolutions.io/api/loyalty/transaction_entries', 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://admin.snagsolutions.io/api/loyalty/transaction_entries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://admin.snagsolutions.io/api/loyalty/transaction_entries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://admin.snagsolutions.io/api/loyalty/transaction_entries")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/transaction_entries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174040",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"websiteId": "123e4567-e89b-12d3-a456-426614174002",
"loyaltyAccountId": "123e4567-e89b-12d3-a456-426614174050",
"direction": "credit",
"type": "loyalty_rule",
"createdAt": "2023-10-01T12:34:56Z",
"updatedAt": "2023-10-05T15:30:00Z",
"amount": 100,
"loyaltyTransaction": {
"id": "123e4567-e89b-12d3-a456-426614174060",
"type": "order",
"loyaltyRule": {
"id": "123e4567-e89b-12d3-a456-426614174070",
"type": "purchase",
"name": "First Purchase Bonus",
"description": "Bonus points for the first purchase",
"metadata": {
"category": "electronics"
},
"loyaltyRuleGroupItem": {
"loyaltyRuleGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
},
"metadata": {
"orderId": "order123"
}
}
],
"hasNextPage": true
}{
"message": "Request body is invalid"
}"Forbidden, Could not validate api key"{
"message": "Too many requests"
}Get Loyalty Transaction Entries
Fetch loyalty transaction entries for wallets or users, representing account balance changes.
curl --request GET \
--url https://admin.snagsolutions.io/api/loyalty/transaction_entries \
--header 'X-API-KEY: <api-key>'import requests
url = "https://admin.snagsolutions.io/api/loyalty/transaction_entries"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://admin.snagsolutions.io/api/loyalty/transaction_entries', 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://admin.snagsolutions.io/api/loyalty/transaction_entries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://admin.snagsolutions.io/api/loyalty/transaction_entries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://admin.snagsolutions.io/api/loyalty/transaction_entries")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/transaction_entries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174040",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"websiteId": "123e4567-e89b-12d3-a456-426614174002",
"loyaltyAccountId": "123e4567-e89b-12d3-a456-426614174050",
"direction": "credit",
"type": "loyalty_rule",
"createdAt": "2023-10-01T12:34:56Z",
"updatedAt": "2023-10-05T15:30:00Z",
"amount": 100,
"loyaltyTransaction": {
"id": "123e4567-e89b-12d3-a456-426614174060",
"type": "order",
"loyaltyRule": {
"id": "123e4567-e89b-12d3-a456-426614174070",
"type": "purchase",
"name": "First Purchase Bonus",
"description": "Bonus points for the first purchase",
"metadata": {
"category": "electronics"
},
"loyaltyRuleGroupItem": {
"loyaltyRuleGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
},
"metadata": {
"orderId": "order123"
}
}
],
"hasNextPage": true
}{
"message": "Request body is invalid"
}"Forbidden, Could not validate api key"{
"message": "Too many requests"
}Authorizations
Query Parameters
Unique identifier for the organization to filter by
"123e4567-e89b-12d3-a456-426614174001"
Unique identifier for the website to filter by
"123e4567-e89b-12d3-a456-426614174002"
Pagination cursor to start after a specific resource ID
"123e4567-e89b-12d3-a456-426614174010"
Maximum number of records to return (max 100)
1 <= x <= 10050
Wallet address or array of wallet addresses to filter by
[
"0x1234567890abcdef1234567890abcdef12345678"
]
User ID or array of User IDs to filter by
["123e4567-e89b-12d3-a456-426614174000"]
Identifier for the wallet group to filter by
"group123"
Unique identifier for the loyalty transaction to filter by
"123e4567-e89b-12d3-a456-426614174020"
Unique identifier for the loyalty rule to filter by
"123e4567-e89b-12d3-a456-426614174030"
Bonus, BoughtOn, BoughtWithRoyalties, DiscordMessages, Listing, Lodging, PoapClaim, SnagSocialsConnected, SnapshotFullset, SnapshotHold, SoldWithRoyalties, TwitterBio, TwitterHashTagPost, MintOn, SoldOn, TokenHold, Retweet, check_in, code_entry, connect_wallet, connected_discord, connected_email, connected_epic, connected_github, connected_steam, connected_telegram, connected_twitter, create_partner_account, discord_member, drip_x_follow, drip_x_new_tweet, drip_x_text_in_bio, drip_x_text_in_comment, drip_x_text_in_name, drip_x_tweet, external_rule, link_click, manual_upload, profile_completed, referred_user, smart_contract_event, snapshot_governance, telegram_join, telegram_messages, text_input, token_hold_erc20, tweet_liked_by_project, twitter_comment, twitter_follow, twitter_followers, twitter_like, twitter_post_hashtag, quiz, poll, steam_wishlist, liquidity_uniswap_v2, liquidity_uniswap_v3, points_airdrop, youtube_subscribers, youtube_comment, shopify_spend, swap, tiktok_post, post_impressions, discord_join, connected_youtube, stratus_function, connected_tiktok, tiktok_follow, github_repo_star, github_repo_fork, github_repo_collaborator, github_merge_PR, discord_role_grant, connected_reddit, reddit_comment, robinhood_token_hold, connected_instagram, instagram_post, instagram_follow, connected_phone, dapps_by_gas_spent, dapps_by_active_users, dapps_by_new_users, dapps_by_transaction_count, dapps_by_user_retention Key to ensure idempotency of the request
"idempkey123"
Type of the loyalty transaction to filter by
auction_bid, direct_mint, loyalty_rule, api_key, order "loyalty_rule"
Field to sort the results by
createdAt, updatedAt, loyaltyAccountLockVersion "createdAt"
Direction to sort the results by
asc, desc "desc"
When passed in return the list of fulfilled entries for loyalty rules. If a loyalty rule has a fulfilled entry this means the user cannot currently complete the rule. Must be passed in with userId or walletAddress.
"123e4567-e89b-12d3-a456-426614174030"
External identifier for the user group controlled by you.
Unique identifier for the user group
"123e4567-e89b-12d3-a456-426614174090"
Start date to filter by (inclusive, greater than or equal to)
"2023-10-01T12:34:56Z"
End date to filter by (exclusive, less than)
"2023-10-01T12:34:56Z"
UUID of the rule group (converted to lowercase)
"123e4567-e89b-12d3-a456-426614174333"
UUID of the loyalty currency IDs to filter by. Use this to exclude deleted currencies
"123e4567-e89b-12d3-a456-426614174333"
Was this page helpful?