Skip to main content
The Loyalty API enables you to create and manage customer loyalty programs with points earning, tiered membership levels, and redeemable rewards.

Features

  • Points-Based Rewards: Customers earn points based on purchase amounts
  • Tiered Membership: Bronze, Silver, Gold, Platinum tiers with multipliers
  • Redeemable Rewards: Create rewards that customers can redeem for discounts
  • Customer Management: Track customer profiles, points balance, and transaction history
  • Program Configuration: Flexible points earning and redemption rates

Authentication

Requires authentication and permissions:
  • loyalty:read - View loyalty data
  • loyalty:create - Create and manage programs, rewards, and redemptions
  • customers:read - View customer data
  • customers:create - Create customers
  • customers:delete - Delete customers

Base URL

https://api.restai.app/v1/loyalty

Core Concepts

Loyalty Programs

A program defines how customers earn and redeem points:
  • Points per currency unit: How many points earned per dollar spent
  • Currency per point: How much each point is worth when redeemed
  • Active status: Whether the program is currently active

Tiers

Tiers provide escalating benefits based on total points earned:
  • Bronze (0+ points): 100% point multiplier
  • Silver (500+ points): 110% point multiplier
  • Plata (2000+ points): 125% point multiplier
  • Platino (5000+ points): 150% point multiplier
Customers automatically advance tiers as they earn points.

Rewards

Rewards are benefits customers can redeem:
  • Points cost: How many points required
  • Discount type: Percentage or fixed amount
  • Discount value: Amount of discount applied

Customers

Customer records track:
  • Contact information (name, email, phone)
  • Points balance
  • Total points earned (for tier calculation)
  • Current tier
  • Transaction history

Quick Start

  1. Create a loyalty program with earning/redemption rates
  2. Configure rewards that customers can redeem
  3. Add customers as they make purchases
  4. Award points automatically based on order totals
  5. Redeem rewards when customers want to use points

Next Steps

Build docs developers (and LLMs) love