Skip to main content
POST
/
api
/
loyalty
/
rule_statuses
Update Loyalty Rule Status
curl --request POST \
  --url https://admin.snagsolutions.io/api/loyalty/rule_statuses \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "loyaltyRuleId": "123e4567-e89b-12d3-a456-426614174030",
  "organizationId": "123e4567-e89b-12d3-a456-426614174001",
  "websiteId": "123e4567-e89b-12d3-a456-426614174002",
  "userId": "123e4567-e89b-12d3-a456-426614174003",
  "walletAddress": "123e4567-e89b-12d3-a456-426614174004",
  "progress": 50,
  "incProgress": 10
}
'
{
  "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"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

Body

loyaltyRuleId
string<uuid>
required

Unique identifier for the loyalty rule

Example:

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

organizationId
string<uuid>

Unique identifier for the organization

Example:

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

websiteId
string<uuid>

Unique identifier for the website

Example:

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

userId
string<uuid>

Unique identifier for the user, either userId or walletAddress must be provided

Example:

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

walletAddress
string

Unique identifier for the wallet address, either userId or walletAddress must be provided

Example:

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

progress
number

Progress of the loyalty rule

Required range: 0 <= x <= 100
Example:

50

incProgress
number

Increment progress of the loyalty rule

Required range: 0 <= x <= 100
Example:

10

Response

200

id
string<uuid>
required
websiteId
string<uuid>
required
organizationId
string<uuid>
required
userId
string<uuid>
required
loyaltyRuleId
string<uuid>
required
progress
number
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required