Skip to main content
GET
/
api
/
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>'
[
  {
    "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"
  }
]

Authorizations

X-API-KEY
string
header
required

Query Parameters

websiteId
string<uuid>

Unique identifier for the website

Example:

"123e4567-e89b-12d3-a456-426614174002"

organizationId
string<uuid>

Unique identifier for the organization

Example:

"123e4567-e89b-12d3-a456-426614174003"

userGroupId
string<uuid>

Unique identifier for the user group

Example:

"123e4567-e89b-12d3-a456-426614174004"

userId
string<uuid>

User id to filter by

Example:

"123e4567-e89b-12d3-a456-426614174001"

walletAddress
string

Wallet address to filter by

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x1234567890123456789012345678901234567890"

loyaltyRuleId
required

Loyalty rule id(s) to filter by, array or single id

Example:

"loyaltyRuleId=123e4567-e89b-12d3-a456-426614174001&loyaltyRuleId=123e4567-e89b-12d3-a456-426614174002"

startingAfter
string

Pagination cursor to start after a specific resource ID

Example:

"123e4567-e89b-12d3-a456-426614174010"

limit
number
default:10

Maximum number of records to return (max 1000)

Required range: 1 <= x <= 1000
Example:

50

Response

200

createdAt
string | null
required

Date and time the streak was created, null if no streak yet

Example:

"2025-01-01T00:00:00.000Z"

updatedAt
string | null
required

Date and time the streak was last updated, null if no streak yet

Example:

"2025-01-01T00:00:00.000Z"

expiresAt
string | null
required

Date and time the streak expires, null if no streak yet

Example:

"2025-01-01T00:00:00.000Z"

streakCount
number
required

Number of days in the streak, 0 if no streak

Example:

10

userId
string<uuid>
required
loyaltyRuleId
string<uuid>
required
walletAddress
string
required
milestone
object[]
required
id
string<uuid>

ID of the loyalty account streak, null if no streak yet

Example:

"123e4567-e89b-12d3-a456-426614174001"