Requests, errors and limits
Base URL and versions
All calls go to https://api.likom.co/v1/partner/… over HTTPS. The version is part of the path and is required: /partner/… without /v1 answers 404.
Within v1 we only make additive changes: new endpoints, new optional fields in requests, new fields in answers. Your code should ignore fields it doesn't know. Anything that would break an integration comes as v2, announced in the changelog first.
Requests
- Send JSON with
Content-Type: application/json. Answers are JSON in UTF-8. - Unknown fields in a request are ignored. In particular, nothing you send can set points, stamps or cashback: Likom Business works them out.
- Texts meant for people (
message,lines,skipped,blocker,note) may change wording at any time. Show them; don't parse them. The ones in these docs are examples. - Tickets and cursors are opaque strings: store and send them back as they are.
Formats
| Type | Format | Example |
|---|---|---|
| Money | A decimal string with up to 2 decimals, in the business's currency (GET /me → currency). Requests also accept numbers; send strings to avoid rounding. | "24.50" |
| Points, cashback | Decimal string | "24", "1.25" |
| Stamps (punches) | Integer | 1 |
| Ids | UUID strings | "0193a1c2-7d4e-7a10-9b2f-5c8e1f0a2b3c" |
| Times | ISO 8601 with a time zone | "2026-11-16T02:14:05.381Z" |
Bills are the full amount the customer pays, VAT included. When a rule counts the bill "before VAT", Likom Business takes off the branch's VAT itself (GET /branches → vat_percent).
Scan tickets
Identifying a customer gives a ticket: a short-lived handle on that customer's card at that branch, bound to your API key.
- It lasts 15 minutes (
expires_in, in seconds, says how long is left). After that:410 scan_expired; scan again. - Each ticket records one purchase. A second one gets
409 already_recorded. For another purchase, scan again. - A ticket only works with the key that made it.
The QR codes customers show in Likom change all the time and are used up when you identify them: scanning a screenshot or the same code twice gets 410 pass_expired.
Idempotency keys
POST /transactions and POST /redemptions require an Idempotency-Key header: 1 to 100 visible ASCII characters, no spaces.
Idempotency-Key: order-10482- Use a new key for each purchase or reward: your order id or a UUID.
- Use the same key when you retry the same purchase (a timeout, a dropped connection). Likom Business then returns the first result with
"replayed": trueinstead of recording twice. - Keys are remembered for 30 days, separately for each API key.
- A replay returns the first result even if the body is different, so never reuse a key for a different purchase.
A missing or malformed header gets 400 idempotency_key_required.
Receipt numbers
Every purchase needs receipt_ref, your receipt or order number (1 to 60 characters, with letters or digits). The same receipt number can't earn twice in a business, whether it came through the API or the Counter: the second one gets 409 receipt_used. Numbers are compared on their letters and digits only, ignoring case, spaces and punctuation: OR-10482, or 10482 and OR10482 are the same receipt. This stops one sale being claimed by two customers.
Pagination
GET /transactions returns pages of up to limit items (1–200, default 100), oldest first, and next_cursor. Pass it back as cursor with the same filters until next_cursor is null.
Rate limits
| Limit | Value | When it's reached |
|---|---|---|
| Requests per key | 120 per minute | 429 rate_limited |
| Wrong API keys per network | 30 per 10 minutes | 429 rate_limited for that network |
| Wrong or expired QR codes per key | 20 per 10 minutes | 429 rate_limited |
A 429 body has retry_after, the seconds to wait. Back off and retry after it; don't retry in a tight loop.
Errors
Every error has the same shape. code is stable, for your code. message is written for people: you can show it to your cashier as is.
{
"detail": {
"code": "receipt_used",
"message": "Receipt OR-10482 was already recorded on 16 Nov 2026. Check the number."
}
}Some errors add fields, such as scope, limit, daily_cap or retry_after. A request that doesn't match the schema gets 422 invalid_input with each problem in errors:
{
"detail": {
"code": "invalid_input",
"message": "String should have at least 1 character",
"errors": [{"field": "receipt_ref", "message": "String should have at least 1 character"}]
}
}Status codes
| Status | Meaning | Retry? |
|---|---|---|
| 200, 201 | Done | |
| 400 | Something in the request is wrong | No, fix the request |
| 401 | No key, or the key doesn't work | No |
| 403 | The key may not do this (scope, branch, address, limit) | No |
| 404 | Not found (or not this business's) | No |
| 409 | The state doesn't allow it (already recorded, already spent…) | No |
| 410 | The scan or QR has expired | Scan again |
| 422 | The body doesn't match the schema | No, fix the request |
| 429 | Too many requests | Yes, after retry_after seconds |
| 500, 502, 503, 504 | A problem on our side | Yes, with the same Idempotency-Key |
Error codes
| Code | Status | What happened |
|---|---|---|
api_key_missing | 401 | No Authorization: Bearer header |
api_key_invalid | 401 | Wrong, revoked or expired key |
missing_scope | 403 | The key lacks the permission in scope |
ip_not_allowed | 403 | Called from an address the key doesn't allow |
not_your_branch | 403 | The key is set to another branch |
branch_required | 400 | Send branch_id (the key is for any branch) |
branch_not_found | 404 | That branch isn't the business's, or is archived |
not_a_pass | 400 | What was scanned isn't a Likom QR |
not_supported | 400 | A gift or ticket QR: use the Counter in Likom Business |
pass_expired | 410 | The QR expired or was already used |
scan_expired | 410 | The ticket is older than 15 minutes |
customer_not_found | 404 | No customer of the business matches, or they don't allow lookups |
card_not_found | 404 | That card isn't one of this customer's cards here |
card_paused | 409 | An owner paused the card |
program_not_running | 409 | The program isn't running today (paused, not started or ended) |
card_full | 409 | The stamp card is full: hand over its reward first |
amount_required | 400 | This card earns by bill: send an amount above 0 |
receipt_invalid | 400 | The receipt number needs letters or digits |
receipt_used | 409 | That receipt number already earned |
already_recorded | 409 | This ticket already recorded a purchase |
over_key_limit | 403 | The bill is over the key's largest bill (limit) |
over_daily_cap | 403 | The key reached its daily total (daily_cap) |
idempotency_key_required | 400 | Missing or malformed Idempotency-Key |
needs_qr | 403 | Rewards need the customer's live QR, not a lookup |
promotion_not_found | 404 | That reward isn't on this card |
not_available | 409 | The reward can't be used now (see its blocker) |
min_purchase | 409 | The reward needs a bill of at least its minimum |
transaction_not_found | 404 | No such purchase, or older than 30 days |
redemption_not_found | 404 | No such redemption, or older than 30 days |
not_allowed | 403 | Undo refused: not this key's, or past 10 minutes without transactions:refund |
already_undone | 409 | It was already undone |
already_spent | 409 | What the purchase earned was already used |
timezone_required | 400 | since / until need a time zone |
range_too_long | 400 | Ask for 31 days at most |
bad_cursor | 400 | Use next_cursor from the last page |
rate_limited | 429 | Too many requests; wait retry_after seconds |
counter_unavailable | 503 | Recording is briefly unavailable; retry |
invalid_input | 422 | The body doesn't match the schema |
New codes may be added. Handle unknown codes by their status, and show the message.
Still need help? Troubleshooting · [email protected]