Snag Docs logo

Check promo code claim status

Check whether codes of an Enter a Code rule have been claimed or are still available. Requires an API key. Pass 1 to 10 codes per request.

GEThttps://admin.snagsolutions.io/api/loyalty/promo_codes
Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Query Parameters

organizationIdstring<uuid>required

Unique identifier for the organization

websiteIdstring<uuid>required

Unique identifier for the website

loyaltyRuleIdstring<uuid>required

The Enter a Code rule whose codes to check

promoCodeanyrequired

Codes to check, 1 to 10. Repeat the parameter for each code (promoCode=a&promoCode=b). Matching is case-insensitive.

Response

application/json

200

dataarray<object>required

Matching promo codes. A requested code missing from the list does not exist on the website.

data.idstring<uuid>required

Unique identifier for the promo code

data.promoCodestringrequired

The code as stored on the rule

data.loyaltyRuleIdstring<uuid>required

The Enter a Code rule the code belongs to

data.status"available" | "claimed"required

claimed once a user has redeemed the code, available otherwise. A rule with a single shared code never marks it claimed, so that code is always available.

Allowed values: "available" | "claimed"
data.claimedAtstring<date-time>required

When the code was claimed, null if it is available

data.claimedByUserIdstring<uuid>required

The user who claimed the code, null if it is available

GET /api/loyalty/promo_codes — query parameters: organizationId, websiteId, loyaltyRuleId, promoCode