curl --request GET \
--url https://admin.snagsolutions.io/api/loyalty/accounts \
--header 'X-API-KEY: <api-key>'import requests
url = "https://admin.snagsolutions.io/api/loyalty/accounts"
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/accounts', 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/accounts",
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/accounts"
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/accounts")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/accounts")
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-426614174050",
"loyaltyCurrencyId": "123e4567-e89b-12d3-a456-426614174090",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"user": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
"userMetadata": [
{
"walletGroupIdentifier": "group123",
"twitterUser": "@user123",
"discordUser": "user123#4567",
"logoUrl": "https://example.com/logo.png",
"displayName": "John Doe"
}
],
"websiteUserAttributeValues": [
{
"value": "Website User Attribute Value",
"websiteUserAttribute": {
"id": "123e4567-e89b-12d3-a456-426614174004",
"label": "Website User Attribute Label"
}
}
]
},
"amount": 1500,
"lockVersion": 1
}
],
"hasNextPage": true,
"message": "Success"
}{
"message": "Request body is invalid"
}"Forbidden, Could not validate api key"{
"message": "Too many requests"
}{
"success": false,
"message": "Internal server error",
"debugInfo": "Stack trace or additional error details"
}Get loyalty accounts
Get loyalty accounts
curl --request GET \
--url https://admin.snagsolutions.io/api/loyalty/accounts \
--header 'X-API-KEY: <api-key>'import requests
url = "https://admin.snagsolutions.io/api/loyalty/accounts"
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/accounts', 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/accounts",
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/accounts"
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/accounts")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/accounts")
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-426614174050",
"loyaltyCurrencyId": "123e4567-e89b-12d3-a456-426614174090",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"user": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
"userMetadata": [
{
"walletGroupIdentifier": "group123",
"twitterUser": "@user123",
"discordUser": "user123#4567",
"logoUrl": "https://example.com/logo.png",
"displayName": "John Doe"
}
],
"websiteUserAttributeValues": [
{
"value": "Website User Attribute Value",
"websiteUserAttribute": {
"id": "123e4567-e89b-12d3-a456-426614174004",
"label": "Website User Attribute Label"
}
}
]
},
"amount": 1500,
"lockVersion": 1
}
],
"hasNextPage": true,
"message": "Success"
}{
"message": "Request body is invalid"
}"Forbidden, Could not validate api key"{
"message": "Too many requests"
}{
"success": false,
"message": "Internal server error",
"debugInfo": "Stack trace or additional error details"
}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 account ID
"123e4567-e89b-12d3-a456-426614174100"
Maximum number of accounts to return
1 <= x <= 10020
Wallet address(es) to filter accounts by
[
"0x1234567890abcdef1234567890abcdef12345678"
]
User ID(s) to filter accounts by. Pass in null to get a currencys main accounts.
["123e4567-e89b-12d3-a456-426614174000"]
Wallet group identifier to filter accounts by
"group123"
Order the accounts in ascending or descending order, sorted by amount
asc, desc "desc"
Loyalty currency ID(s) to filter accounts by. Accepts a single id or a list.
"123e4567-e89b-12d3-a456-426614174090"
External identifier for the user group controlled by you
Unique identifier for the user group
"123e4567-e89b-12d3-a456-426614174090"
External identifier for the user
"123e4567-e89b-12d3-a456-426614174090"
Pass true to drop accounts belonging to deleted loyalty currencies. Defaults to false, so they are included. Ignored when loyaltyCurrencyId names a currency — a deleted currency returns its accounts either way.
true, false "true"
Was this page helpful?