GET
/
api
/
loyalty
/
rule_statuses
import SnagSolutions from '@snagsolutions/sdk';

const client = new SnagSolutions({
  apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const ruleStatuses = await client.loyalty.transactions.ruleStatuses.list();

  console.log(ruleStatuses.data);
}

main();
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "websiteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "loyaltyRuleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "progress": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "hasNextPage": true
}

Authorizations

X-API-KEY
string
header
required

Query Parameters

organizationId
string

Unique identifier for the organization

Example:

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

websiteId
string

Unique identifier for the website

Example:

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

walletAddress

Wallet address(es) to filter accounts by

Example:
[
  "0x1234567890abcdef1234567890abcdef12345678"
]
userId

User ID(s) to filter accounts by

Example:
["123e4567-e89b-12d3-a456-426614174000"]
loyaltyRuleId

Unique identifier for the loyalty rule[s]

Example:

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

limit
number | null
default:10

Number of items to return

Required range: x <= 100
Example:

10

startingAfter
string

Starting after item

Example:

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

Response

200
application/json
200
data
object[]
required
hasNextPage
boolean
required