Getting started
1. Create an API key
Only the business owner can create API keys.
- Open the Developers (Geliştiriciler) page in the business dashboard.
- Click New API key (Yeni API anahtarı), give the key a descriptive name (for example
POS integration), and choose the location (şube) the key will operate at. - Click Create key (Anahtar oluştur). The key starts with
sk_live_and is shown only once. Store it somewhere safe immediately. If you lose it, revoke it and create a new one.
Each API key acts as a hidden cashier bound to a single location, so you do not need to pass locationId in POST /scan requests.
Keep your key secret
Never embed an API key in browser code, mobile apps, or public repositories. Only use it on the server side of your POS integration. If you suspect a key was leaked, revoke it immediately on the Developers page.
2. Send your first request
Test your key by calling GET /me:
curl https://app.mekante.com/api/v1/public/me \
-H "Authorization: Bearer sk_live_EXAMPLE_KEY"
The response returns the business, loyalty program, and location associated with the key:
{
"role": "cashier",
"scopeLocationIds": null,
"tenant": { "name": "Docs Cafe", "status": "trial", "joinCode": "8ET7P7H3" },
"program": { "type": "points", "earnRate": 0.05, "expiryMonths": 12 },
"locations": [{ "id": "…", "name": "…" }]
}
earnRate is the number of points earned per 1 TL spent; 1 point is worth 1 TL, so 0.05 means 5%. Additional fields are returned in the response; only the most relevant ones are shown above. If you receive 401, check Authentication.
3. Next step
Read Till flow to learn how to turn a customer purchase into points or redeem a reward.