Snag Docs logo

Get badges (all or by id)

This endpoint allows you to fetch badge(s) data.

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

This endpoint allows you to fetch badge(s) data.

Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Query Parameters

organizationIdstring<uuid>

UUID of the organization (optional, converted to lowercase)

websiteIdstring<uuid>

UUID of the website (optional, converted to lowercase)

badgeIdsany

Array of badge IDs (converted to lowercase) to fetch

walletAddressany

Wallet Address of the user, or array of wallet addresses.

userIdany

UUID of the user, or array of UUID.

userGroupIdstring

UUID of the user group

userGroupExternalIdentifierstring

External identifier of the user group

startingAfterstring<uuid>

UUID of the badge to start after (converted to lowercase)

limitinteger

Number of badges to fetch

Required range: x >= 1, x <= 1000
includeDeletedbooleandefault: false

Include deleted badges in the response

Default: false

Response

application/json

200

dataarray<object>required
data.idstring<uuid>required

UUID of the badge (converted to lowercase)

data.namestringrequired

The name of the badge

data.descriptionstringrequired

The description of the badge

data.imageUrlstring<uri>required

The URL of the badge image

data.hideInUiboolean

Whether to hide this badge in the user interface

Default: false
data.loyaltyConditionsarray<object>required

Array of conditions of the badge

data.rewardsarray<object>

Array of rewards granted when the badge is achieved

data.loyaltyBadgeUsersarray<object>

Array of user badges

data.loyaltyRulesarray<object>

Array of loyalty rules associated with the badge

data.dataJobsarray<object>

Array of data jobs associated with the badge

data.createdAtstring<date-time>required

The date and time the badge was created

data.updatedAtstring<date-time>required

The date and time the badge was updated

hasNextPagebooleanrequired

Indicates if there is a next page of results