Storelayer Documentation
Storelayer is an HTTP API for loyalty state and logic. Your backend sends customer events and carts; Storelayer evaluates your rules and promotions, keeps a wallet per customer, and tracks referrals. Everything lives inside a project, reached at https://api.storelayer.io with a project API key.
You want to… start with…
Section titled “You want to… start with…”| You want to… | Start with… | Important distinction |
|---|---|---|
| Make your first API call | Quick start | Uses a project API key from the dashboard |
| Understand the building blocks | Introduction | Event → rule → wallet; cart → promotion |
| Award points for purchases or signups | Loyalty program guide | Rules react to events asynchronously |
| Write rule or promotion conditions | Conditions | Shared condition-group format |
| Discount a cart or redeem a coupon | Creating promotions | Cart money is integer minor units (cents) |
| Custom discount logic | Discount scripts | Script returns per-item discounts |
| Run a referral program | Referral programs | Codes, attribution, completion |
| Read or adjust balances | Wallets | Balances are keyed by asset type |
| Debug why nothing happened | Debugging and Workflows | Each event produces an inspectable run |
| Let a coding agent build it | Build with an agent | Skill, Markdown docs, OpenAPI, MCP |
Reference
Section titled “Reference”- API overview — conventions: envelope, errors, pagination, units.
- Authentication — API keys vs dashboard tokens.
- API reference — every endpoint, generated from the live OpenAPI document.
For coding agents
Section titled “For coding agents”Read /llms.txt, then fetch only the pages your task needs. Every page has a Markdown version at <path>.md (this page: /index.md). The Storelayer skill points agents at these docs.