curl --request GET \
--url https://admin.snagsolutions.io/api/loyalty/account_streaks \
--header 'X-API-KEY: <api-key>'import requests
url = "https://admin.snagsolutions.io/api/loyalty/account_streaks"
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/account_streaks', 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/account_streaks",
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/account_streaks"
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/account_streaks")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/account_streaks")
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[
{
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z",
"expiresAt": "2025-01-01T00:00:00.000Z",
"streakCount": 10,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loyaltyRuleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"walletAddress": "<string>",
"milestone": [
{
"streakMilestone": 123,
"streakAmount": 123
}
],
"id": "123e4567-e89b-12d3-a456-426614174001"
}
]"Forbidden, Could not validate api key"{
"message": "Not found"
}{
"message": "Method not allowed"
}{
"message": "Too many requests"
}Get loyalty account streaks
Get loyalty account streaks
curl --request GET \
--url https://admin.snagsolutions.io/api/loyalty/account_streaks \
--header 'X-API-KEY: <api-key>'import requests
url = "https://admin.snagsolutions.io/api/loyalty/account_streaks"
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/account_streaks', 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/account_streaks",
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/account_streaks"
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/account_streaks")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/loyalty/account_streaks")
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[
{
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z",
"expiresAt": "2025-01-01T00:00:00.000Z",
"streakCount": 10,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"loyaltyRuleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"walletAddress": "<string>",
"milestone": [
{
"streakMilestone": 123,
"streakAmount": 123
}
],
"id": "123e4567-e89b-12d3-a456-426614174001"
}
]"Forbidden, Could not validate api key"{
"message": "Not found"
}{
"message": "Method not allowed"
}{
"message": "Too many requests"
}Authorizations
Query Parameters
Unique identifier for the website
"123e4567-e89b-12d3-a456-426614174002"
Unique identifier for the organization
"123e4567-e89b-12d3-a456-426614174003"
Unique identifier for the user group
"123e4567-e89b-12d3-a456-426614174004"
User id to filter by
"123e4567-e89b-12d3-a456-426614174001"
Wallet address to filter by
^0x[a-fA-F0-9]{40}$"0x1234567890123456789012345678901234567890"
Loyalty rule id(s) to filter by, array or single id
"loyaltyRuleId=123e4567-e89b-12d3-a456-426614174001&loyaltyRuleId=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 1000)
1 <= x <= 100050
Response
200
Date and time the streak was created, null if no streak yet
"2025-01-01T00:00:00.000Z"
Date and time the streak was last updated, null if no streak yet
"2025-01-01T00:00:00.000Z"
Date and time the streak expires, null if no streak yet
"2025-01-01T00:00:00.000Z"
Number of days in the streak, 0 if no streak
10
Show child attributes
Show child attributes
ID of the loyalty account streak, null if no streak yet
"123e4567-e89b-12d3-a456-426614174001"
Was this page helpful?