Snag Docs logo

Get loyalty accounts

Get loyalty accounts

GEThttps://admin.snagsolutions.io/api/loyalty/accounts

Get loyalty accounts

Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Query Parameters

organizationIdstring<uuid>

Unique identifier for the organization to filter by

websiteIdstring<uuid>

Unique identifier for the website to filter by

startingAfterstring<uuid>

Pagination cursor to start after a specific account ID

limitinteger

Maximum number of accounts to return

Required range: x >= 1, x <= 100
walletAddressany

Wallet address(es) to filter accounts by

userIdany

User ID(s) to filter accounts by. Pass in null to get a currencys main accounts.

walletGroupIdentifierstring

Wallet group identifier to filter accounts by

sortDir"asc" | "desc"default: desc

Order the accounts in ascending or descending order, sorted by amount

Allowed values: "asc" | "desc"
Default: "desc"
loyaltyCurrencyIdany

Loyalty currency ID(s) to filter accounts by. Accepts a single id or a list.

userGroupExternalIdentifierstring<uuid>

External identifier for the user group controlled by you

userGroupIdstring<uuid>

Unique identifier for the user group

externalIdentifierstring

External identifier for the user

excludeDeletedCurrency"true" | "false"

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.

Allowed values: "true" | "false"

Response

application/json

200

dataarray<object>required

Array of loyalty accounts

data.idstring<uuid>required

Unique identifier for the loyalty account

data.amountany

Balance amount in the loyalty account

data.loyaltyCurrencyIdstring<uuid>required

Unique identifier for the loyalty currency

data.userIdstring<uuid>required

Unique identifier for the user

data.useranyrequired

User associated with the loyalty account

data.lockVersionany

Version number used for optimistic locking

hasNextPagebooleanrequired

Indicates if there is a next page of results

messagestring

Optional message