Skip to main content
POST
/
api
/
loyalty
/
rules
/
{id}
/
complete
Complete Loyalty Rule
curl --request POST \
  --url https://admin.snagsolutions.io/api/loyalty/rules/{id}/complete \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "verificationCode": "VERIF123",
  "userId": "123e4567-e89b-12d3-a456-426614174000",
  "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "contentUrl": "https://x.com/Snag_Solutions/status/1735407428093522314",
  "loyaltyQuestionChoiceId": "123e4567-e89b-12d3-a456-426614174000",
  "verifyOnly": false,
  "rangeValue": 10,
  "amount": 10,
  "idempotencyKey": "IDEMPOTENCY123",
  "skipChainOrRequiredCheck": false
}
'
{
  "message": "Completion request added to queue"
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string<uuid>
required

Body

application/json

Body

Schema for completing a loyalty rule

verificationCode
string

Optional verification code for completing the loyalty rule

Example:

"VERIF123"

userId
string<uuid>

Unique identifier for the user

Example:

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

walletAddress
string

Wallet address of the user can only be used if userId is not provided

Example:

"0x1234567890abcdef1234567890abcdef12345678"

contentUrl
string

Link to the post/comment made by user

Example:

"https://x.com/Snag_Solutions/status/1735407428093522314"

loyaltyQuestionChoiceId
string

ID of the choice selected by the user

Example:

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

verifyOnly
string
default:false

Flag indicating if only verification is required, this will not create a transaction and reward the user.

Example:

false

rangeValue
number | null

Value to compare with the range

Example:

10

amount
number | null

Override amount for the reward (rounded to nearest whole number). This will override the rule amount and reward the integer passed.

Example:

10

idempotencyKey
string

Unique key to ensure idempotent requests.

Maximum string length: 70
Example:

"IDEMPOTENCY123"

skipChainOrRequiredCheck
boolean

Flag indicating if the chain or required check should be skipped.

Example:

false

Response

200

message
enum<string>
required
Available options:
Completion request added to queue,
Link click being verified, come back later to check the status