Skip to main content
POST
/
set-tiers
Governance & Cashback
curl --request POST \
  --url https://tokens.shakesco.com/set-tiers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "bronze": 123,
  "silver": 123,
  "gold": 123,
  "tokens_per_vote": 123,
  "spend_threshold": 123,
  "currency": "<string>",
  "reward_tokens": 123,
  "email": "<string>",
  "spent_amount": 123
}
'
{ "tx_hash": "0xabc..." }

Documentation Index

Fetch the complete documentation index at: https://docs.shakesco.com/llms.txt

Use this file to discover all available pages before exploring further.

For the complete documentation index, see llms.txt. These endpoints configure advanced features: Bronze/Silver/Gold tiers, token-weighted voting, and cashback rewards when customers hit spending thresholds.

Tiers

POST /set-tiers

Configure token thresholds for Bronze, Silver, and Gold tier status.
bronze
number
required
Token balance required for Bronze
silver
number
required
Token balance required for Silver
gold
number
required
Token balance required for Gold
await fetch("https://tokens.shakesco.com/set-tiers", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ bronze: 100, silver: 500, gold: 2000 }),
});
{ "tx_hash": "0xabc..." }

GET /tier-thresholds

Returns the current tier thresholds.
{
  "bronze": "100000000000000000000",
  "silver": "500000000000000000000",
  "gold": "2000000000000000000000",
  "is_active": true
}

GET /user-tier?email=…

Get the current tier for a customer. Returns 0=None, 3=Bronze, 2=Silver, 1=Gold.
{
  "tier": 3,
  "tier_label": "Bronze"
}

Voting

POST /set-voting-ratio

Define how many tokens equal one vote, enabling token-weighted governance.
tokens_per_vote
number
required
Number of tokens that constitute one vote (e.g. 10)
await fetch("https://tokens.shakesco.com/set-voting-ratio", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ tokens_per_vote: 10 }),
});
{ "tx_hash": "0xabc..." }

GET /voting-ratio

Returns the current tokens-per-vote setting.
{ "tokens_per_vote": "10000000000000000000" }

GET /voting-power?email=…

Get the voting power of a specific customer based on their token balance.
{ "voting_power": "15" }

Cashback

POST /set-cashback

Configure a cashback program: award tokens automatically when customers reach a spending threshold.
spend_threshold
number
required
Spending amount that triggers cashback, in your chosen currency
currency
string
required
Currency of the threshold (e.g. "KES", "USD"). See codes
reward_tokens
number
required
Number of tokens awarded when the threshold is met
// Award 5 tokens when a customer spends KES 500
await fetch("https://tokens.shakesco.com/set-cashback", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ spend_threshold: 500, currency: "KES", reward_tokens: 5 }),
});
{ "tx_hash": "0xabc..." }

POST /process-cashback

Record a customer’s spending and automatically award cashback if the threshold is met.
email
string
required
Customer’s email
spent_amount
number
required
Amount spent in the given currency
currency
string
required
Currency of the spent amount
await fetch("https://tokens.shakesco.com/process-cashback", {
  method: "POST",
  headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    email: "customer@example.com",
    spent_amount: 600,
    currency: "KES",
  }),
});
{ "tx_hash": "0xabc..." }

GET /cashback-settings?currency=KES

Returns the cashback configuration converted to a specific currency.
{
  "spend_threshold": "500.00",
  "spend_threshold_currency": "KES",
  "reward_tokens": "5000000000000000000",
  "is_active": true
}

GET /cashback-progress?email=…&currency=KES

How much a customer has spent toward the next cashback threshold.
{
  "spent": "320.00",
  "threshold": "500.00",
  "remaining": "180.00",
  "currency": "KES"
}

GET /cashback-reward

Returns the token reward configured for cashback (no currency conversion).
{ "reward_tokens": "5000000000000000000" }