Quickstart

Get your loyalty program running in 5 steps.

1

Create an API key

Go to API Keys and create a key. Copy it immediately.

2

Create a program

curl -X POST https://loyalty.yortfm.com/v1/shops/YOUR_SHOP_ID/programs \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "My Program", "type": "stamps", "goal": 5}'
3

Define a rule

curl -X POST https://loyalty.yortfm.com/v1/shops/YOUR_SHOP_ID/programs/PROGRAM_ID/rules \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event_type": "CHECKIN", "conditions": {}, "effect": {"type": "stamp"}}'
4

Send a check-in event

curl -X POST https://loyalty.yortfm.com/v1/events \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "shop_id": "YOUR_SHOP_ID",
    "customer_id": "vis_123",
    "event_type": "CHECKIN",
    "event_id": "checkin_001",
    "timestamp": "2026-08-19T14:30:00Z"
  }'
5

Check the balance

curl https://loyalty.yortfm.com/v1/shops/YOUR_SHOP_ID/customers/vis_123 \
  -H "X-API-Key: YOUR_KEY"

Response: { "stamps": 1, "goal": 5 }