Pockard Loyalty API
This is the technical API reference for the Pockard loyalty system — earning and redeeming points, tier configuration, card assignment, OTP protection, reports. Every endpoint comes with a request/response example and a cURL command.
A note on language. The API itself returns its message text in Georgian, and pointsLabel is whatever the company configured. Those values are reproduced verbatim below, with an English gloss in brackets — do not match on the English text.
Authorization
Every endpoint (except the two explicitly marked public) requires an
Authorization: Bearer {token} header. The token comes from POST /api/auth/login.
curl -X POST https://api.pockard.online/api/auth/login \ -H "Content-Type: application/json" \ -d '{"login":"salaro_01","password":"MyPassword123"}' # the response contains token, role, companyId, permissions (bitmask)
The token you receive is then sent with every subsequent request:
curl https://api.pockard.online/api/manager/loyalty/stats \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
API key (for your POS)
A POS, ERP or other system should not sign in with a member of staff's password — when that person
leaves or changes it, the integration stops. In the manager web panel, under "Integrations", create an
API key (requires the ManageIntegrations permission) and send it in the
X-Api-Key header. The key is shown once, at creation; only its hash is stored.
curl -X POST https://api.pockard.online/api/manager/loyalty/transaction \ -H "X-Api-Key: pk_Vd3...xQ" \ -H "Content-Type: application/json" \ -d '{"cardCode":"A1B2C3","cashAmount":45.50,"externalId":"RCPT-000184"}'
/api/manager/loyalty/* endpoints, and only with the permissions
it was given (transactions, history, reports, statistics). Operations it posts appear in the history
under the key's name. A revoked key gets 401 immediately.
Rate Limiting
The API applies per-IP rate limiting through three policies. Most loyalty endpoints sit in the general policy (60 req/min); /api/manager/card/initiate and the auth endpoints use the auth policy (5 req/min).
| Policy | Algorithm | Limit |
|---|---|---|
| auth | Fixed Window | 5 req/min |
| general | Sliding Window | 60 req/min |
| general (with an API key) | Sliding Window | 300 req/min per key |
Permissions (bitmask)
Access for company staff (cashier / manager) is controlled by a long bitmask carried in the JWT permissions claim. Bits combine with | — for example a cashier who can run a transaction and view their own history has 32 | 4096 = 4128.
The Admin role passes every policy automatically, regardless of the bitmask.
| Permission | Bit | What it controls |
|---|---|---|
| ManageLoyalty | 32 | Running a transaction (POST /transaction), next-code, customer/card lookup, sending an SMS OTP. |
| ConfigureLoyalty | 64 | Editing and voiding transactions, the staff list, and every staff member’s operations in history and reports (without it, only their own). |
| ViewStats | 2048 | Statistics: GET /stats, GET /segments, GET /report/range. |
| ViewHistory | 4096 | Transaction history: GET /transactions. |
| ViewReports | 8192 | Reports: GET /report/daily, GET /report/range, GET /transactions. |
| ViewOwnHistory | 128 | Retired — replaced by ViewHistory and ViewReports. |
| UseFlatLoyalty | 256 | Configuring a Flat loyalty program (/api/loyalty/program). |
| UseTieredLoyalty | 512 | Configuring a Tiered loyalty program and its tiers. |
| ManageIntegrations | 32768 | API keys and webhooks (/api/manager/integrations). A key cannot be given this permission. |
Every endpoint in this document carries a Policy badge showing what it requires. User token means the endpoint uses a customer token rather than a manager/staff one. Public means no authorization at all.
Program settings
The company’s loyalty program type (Flat or Tiered), cashback percentage, point value, expiry, bonuses, and — for Tiered programs — the list of tiers. Amounts are in the company’s currency; a Pockard admin sets it and the API converts nothing.
The current loyalty program configuration, tiers included, for the company of the authorized caller (companyId claim).
curl https://api.pockard.online/api/loyalty/program \ -H "Authorization: Bearer {token}"
{
"id": "p1...",
"companyId": "f7e8d9c0-...",
"programType": 1,
"flatCashbackPercent": 0,
"isActive": true,
"pointsLabel": "ქულა",
"pointValue": 0.01,
"pointExpiryDays": 365,
"minEarnAmount": 5,
"maxEarnPerTransaction": null,
"minRedemptionPoints": 100,
"welcomeBonusPoints": 20,
"birthdayBonusPercent": 10,
"termsText": null,
"pointsIcon": null,
"pointsIconColor": null,
"tiers": [
{ "id": "t1...", "name": "Silver", "minMonthlySpend": 0, "maxMonthlySpend": 300, "cashbackPercent": 5, "color": "#94A3B8", "sortOrder": 1 }
]
}
// programType: 0 = Flat, 1 = Tiered
// 404 Not Found — the program has not been configured yet
Creates or updates the company’s loyalty program (upsert). Apart from Admin, a non-admin caller needs the UseFlatLoyalty bit to configure a Flat program, or UseTieredLoyalty for a Tiered one.
// Content-Type: application/json { "programType": 1, "flatCashbackPercent": 0, "isActive": true, "pointsLabel": "ქულა", "pointValue": 0.01, "pointExpiryDays": 365, "minEarnAmount": 5, "maxEarnPerTransaction": null, "minRedemptionPoints": 100, "welcomeBonusPoints": 20, "birthdayBonusPercent": 10, "termsText": null, "pointsIcon": null, "pointsIconColor": null }
// 200 OK — the updated LoyaltyProgramDto
// 403 Forbidden — the non-admin caller lacks the matching UseFlat/UseTiered bit
Adds a new tier (only relevant for Tiered programs).
{
"name": "Gold",
"minMonthlySpend": 300,
"maxMonthlySpend": null,
"cashbackPercent": 12,
"color": "#F59E0B",
"sortOrder": 2
}
// 201 Created — LoyaltyTierDto
// 400 Bad Request — e.g. the spend ranges overlap
POST tiers. Response: 200 OK + LoyaltyTierDto, or 400 Bad Request.204 No Content, or 400 Bad Request (e.g. trying to delete the last remaining tier).Sale flow
Redeeming and earning sit on opposite sides of the payment, and the order follows from what each failure costs: deducting points and then failing the payment takes money from the customer, while awarding points on a failed sale takes it from the business. So redeem before payment (so it can still be voided) and earn after payment.
1. Scan the card → GET /api/manager/loyalty/card/{code}
2. Paying with points? → OTP: barcode in the app, or SMS
3. Redeem → POST /transaction { pointsToRedeem, redemptionOtp, cashAmount: 0 }
4. Take payment → your POS
failed → POST /operations/{operationId}/void
5. Earn → POST /transaction { cashAmount: what was actually paid }
cashAmount: 80.
- A negative
cashAmount— it means the points were worth more than the basket. Your subtraction must never fall below zero: offer the customer fewer points instead.0is fine — the points covered the price exactly. - No points rate set — if the company has not entered what one
point is worth,
pointsToRedeemis refused. The rate lives in the web panel, under the loyalty programme settings.
cashAmount and
pointsToRedeem can travel in the same request — then the redemption and
the earning are one operation, with one operationId and one
externalId. Our own till works this way: a cashier is standing there and
sees a failed payment at once. The two-step flow above is what you need when your own
system takes the payment and failure is a real risk.
externalId is
required. Step 3 cannot happen without us; in that case do not offer payment by
points.
Idempotency
When POST /transaction times out you cannot tell whether it went
through. Retrying awards the points twice; not retrying leaves them unawarded.
externalId — your receipt number — removes that choice.
- Unique per company; required for API clients.
- A second request with the same value returns the original result
(
200 OK) and creates no new transaction. - On a retry you must send the same value. A new value is a new sale.
externalId.
The sale flow sends the redemption
and the earning separately, and to the server those are two independent requests. Send
the same value for both and the second call is treated as a retry and
silently does nothing — you get the first result back. Prefix the
receipt number: R-100045 for the redemption, E-100045 for the
earning. Send both in one request and one receipt number is all you need.
operationId. One call writes several rows
(redemption, earning, welcome bonus), so no single transaction id would identify
the sale — store the operationId to void it later.
Syncing changes
One question decides whether you need this: do you store our transactions in your own database as well?
| No — the till posts and forgets | You do not need it. The data lives only with us; there is nothing to reconcile. |
| Yes — accounting, reports, your own analytics | You need it. Otherwise the two databases drift apart. |
Why filtering by date is not enough
A manager can void or correct a transaction later — the next day, even. When that
happens createdAt does not change: it stays on the day
the sale was made.
Monday 14:00 sale — you receive it and store it
Tuesday 10:00 the manager voids that sale
Tuesday 10:05 ?from=Tuesday → this row does not come back
(createdAt is still Monday)
your database still counts the points as awarded
changedSince follows the moment of change rather than
creation, so that void reaches you.
How to use it
curl https://api.pockard.online/api/manager/loyalty/transactions?changedSince=2026-09-11T08:00:00Z \ -H "Authorization: Bearer {token}"
- 1. Call every 1–5 minutes with the timestamp you stored. There is no need to poll faster — most of the time the answer is empty.
- 2. Process what comes back.
isVoided,voidedAtandeditedAttell you what changed. - 3. Remember the highest
updatedAtyou saw and store it in your database — kept in memory it is lost on restart. - 4. Send exactly that value next time.
id.
page=1, process it, move the cursor forward and repeat
until the answer is empty. Moving to page=2 risks missing a row if the
data changes between requests.
Webhooks
Instead of polling (changedSince), let Pockard send events to your https address. Add a
webhook in the manager web panel under "Integrations" and pick the events. An event is queued in the
same database transaction that saved the change — a change that was saved always reaches you, and one
that failed never does.
| Event | When |
|---|---|
| operation.created | A sale, redemption or visit was posted (one POST /transaction). |
| operation.voided | A whole operation was reversed. |
| transaction.edited | A manager corrected one row of an operation. |
| transaction.voided | One row of an operation was reversed. |
| reward.granted | A visit filled the visit card — the customer is owed a prize. |
| fraud.alert | A fraud rule flagged something. |
POST https://erp.example.com/pockard
Pockard-Event: operation.created
Pockard-Event-Id: 3f0c...
Pockard-Signature: t=1790000000,v1=5d41402abc4b2a76b9719d911017c592...
{
"id": "3f0c...",
"type": "operation.created",
"createdAt": "2026-09-26T10:14:03Z",
"companyId": "...",
"data": { "operationId": "...", "externalId": "RCPT-000184", "cardCode": "A1B2C3",
"cashAmount": 45.5, "pointsEarned": 4.55, "balanceAfter": 120.3, ... }
}
Verifying the signature
v1 is HMAC-SHA256 with the webhook's secret (whsec_...) over
{t}.{body} — exactly the bytes you received. Reject the request if the signature does not
match or t is more than 5 minutes old.
// C#
var expected = Convert.ToHexString(HMACSHA256.HashData(
Encoding.UTF8.GetBytes(secret), Encoding.UTF8.GetBytes($"{t}.{rawBody}"))).ToLowerInvariant();
var ok = CryptographicOperations.FixedTimeEquals(
Encoding.ASCII.GetBytes(expected), Encoding.ASCII.GetBytes(v1));
id. Order is not guaranteed.
Visit rewards
Every N visits the customer earns a prize. It runs alongside cashback, and
POST /transaction needs no change — the server counts the visit itself.
What counts as a visit
- The basket =
cashAmount+ the value the points covered. It must be at leastminVisitAmount. - One visit per card every
visitCooldownHourshours (24 by default). - A purchase paid entirely with points counts only when
countPointsOnlyVisitis on. - A void takes the visit back — and the prize too, if it has not been used yet.
- A visit with no amount — leave
cashAmountandpointsToRedeemempty.
Transaction response
{
"operationId": "9b1e…",
"pointsEarned": 8.00,
"visitCount": 0,
"visitsRequired": 10,
"rewardGrantId": "3f2a…"
}
rewardGrantId is returned when this sale fills the card, so the till can tell the customer
on the spot. If the company runs no visit rewards, all three fields are null.
Prize modes
- Fixed — the highest-placed active prize is handed over the moment the card fills.
- Wheel — the customer spins in the app. The server picks the prize by weight; prizes that are out of stock or expired take no part in the draw.
transferLocked: true stops a won voucher from being passed on.
Configuration
GET /api/loyalty/program/rewards | Prizes, with their current chance (chancePercent) |
POST /api/loyalty/program/rewards | Add — ticketId, weight, stock, label, color |
PUT /api/loyalty/program/rewards/{id} | Edit. Stock cannot go below what has already been given out. |
DELETE /api/loyalty/program/rewards/{id} | Deleted — or deactivated, if someone has already won it |
GET /api/loyalty/program/rewards/vouchers | Prize vouchers |
POST /api/loyalty/program/rewards/vouchers | Create — title, description, maxClaims, validFrom, validTo, transferLocked, isActive |
PUT /api/loyalty/program/rewards/vouchers/{id} | Edit — the same fields |
DELETE /api/loyalty/program/rewards/vouchers/{id} | Deleted if nobody has won it and it is not on the prize list; otherwise 400 — switch it off with isActive: false |
Points switched off
A company can keep visit rewards on their own. Once points are switched off:
- A transaction with an amount is still recorded, but earns no points (
pointsEarned: 0). - Remaining points can be spent as usual until the write-off date (7, 14 or 30 days).
- After the write-off, a request with
pointsToRedeemis refused (400).
visitRewardEnabled. A save without that field leaves the visit card untouched.
Transactions
Earning and redeeming points at the till, editing or voiding them afterwards, and reading the history.
A unified transaction — it can earn points (cashAmount) and/or redeem them (pointsToRedeem) in one call. When points are redeemed, redemptionOtp is required (see Redemption OTP). One call is one operation — one operationId, one void.
// earning points { "cardCode": "001-000042", "cashAmount": 80.00, "pointsToRedeem": null, "note": "Groceries", "redemptionOtp": null, "items": null, "externalId": "E-100045" } // redeeming points (OTP required) { "cardCode": "001-000042", "cashAmount": null, "pointsToRedeem": 50, "note": null, "redemptionOtp": "3842", "items": null, "externalId": "R-100045" } // mixed payment — one call, one operationId { "cardCode": "001-000042", "cashAmount": 80.00, "pointsToRedeem": 20, "note": null, "redemptionOtp": "3842", "items": null, "externalId": "100045" }
| cardCode* | string | The QR or barcode value. |
| cashAmount | decimal? | Cash actually taken, in GEL — with the part the points covered already subtracted. Cannot be negative. |
| pointsToRedeem | decimal? | Points to redeem. |
| redemptionOtp | string? | 4-digit code, required when pointsToRedeem > 0. |
| note | string? | Free-text note. |
| items | array? | Optional — the purchase line items (name/code/qty/unitPrice). |
| externalId* | string? | Your receipt number. Required from the API — see externalId. |
| locationId | guid? | The branch where the sale happened. Not needed when the member of staff or the API key is tied to a branch — naming a different one then returns 400. List: GET /api/manager/locations. |
| locationCode | string? | The same, by the branch's short code (e.g. VAKE). |
| voucherId | guid? | The customer's voucher redeemed with this purchase — the value of its QR code. It must belong to the cardholder and to your company. With a discount voucher, cashAmount is the sum before the voucher; the server works the discount out on the full price (cashAmount plus what the points covered) and takes it off cashAmount. Points earn on what is left to pay. See voucher-quote. |
{
"operationId": "9f1c…",
"pointsRedeemed": 0,
"pointsEarned": 8,
"balanceAfter": 328,
"tierName": "Silver",
"tierColor": "#94A3B8",
"cashbackPercent": 10,
"pointValue": 0.01
}
voucherId the answer also carries voucherId, voucherDiscount (what it took off; 0 for a plain gift voucher) and amountToPay — what the customer pays. The voucher is spent in the same operation; voiding the operation gives it back to the customer.
"შეიყვანეთ თანხა, ქულები, ან ორივე." (enter an amount, points, or both) · "არასაკმარისი ქულები. ხელმისაწვდომია: 80." (not enough points; available: 80) · "ქულების გამოყენებისთვის საჭიროა OTP კოდი." (redeeming points requires an OTP code) · "OTP კოდი არასწორია ან ვადა გასულია." (the OTP code is wrong or has expired) · with a voucher: "ვაუჩერი ამ ბარათის მფლობელს არ ეკუთვნის." (the voucher is not this cardholder's) · "უკვე გამოყენებულია…" (already used) · "ვაუჩერი მოქმედებს 30 ₾-დან…" (below the voucher's minimum purchase) · "ქულები და ვაუჩერი ერთად ფასზე მეტს ფარავს — ქულები შეამცირეთ." (points and the voucher together cover more than the price)
What a voucher takes off — without spending anything. The POS asks first, reduces the receipt, then sends POST /transaction with the same voucherId and the same amount — the answer carries the same discount. A voucher that cannot be used is not an error: canRedeem: false with the reason in problem, to show the cashier.
{
"voucherId": "3b6e…",
"amount": 40.00,
"cardCode": "A1B2C3"
}
| voucherId* | guid | The value of the voucher's QR code. |
| amount* | decimal | The full price — before the voucher and before any points. |
| cardCode | string? | The card the purchase goes on. When given, the voucher must be its holder's. |
{
"voucherId": "3b6e…",
"title": "-15% on your next visit",
"canRedeem": true,
"problem": null,
"discount": 6.00,
"amountToPay": 34.00,
"terms": { "percent": 15, "amount": null, "maxAmount": 10, "minPurchase": null },
"currency": "₾"
}
terms: null — a plain gift voucher (discount: 0). 404 — no such voucher, or it is another company's.Voiding a sale. Reverses the whole operation: every row, the points, the recorded spend and the tier together. Voiding one row on its own leaves the balance wrong. A voucher redeemed with the purchase goes back to the customer.
| ConfigureLoyalty / Admin | any operation, at any time |
| ManageLoyalty (cashier) | their own only, within 5 minutes |
Edits an existing transaction (amount, points, note). Stores editedAt and editedByUsername for the audit trail.
{
"amount": 75.00,
"pointsToRedeem": null,
"note": "Corrected: the original was wrong"
}
// 200 OK — the updated LoyaltyTransactionDto
// 400 Bad Request — validation, or an attempt to edit a voided transaction
Voids a transaction — its effect on the balance is reversed, while the record itself stays in the history with isVoided=true (soft void).
curl -X POST https://api.pockard.online/api/manager/loyalty/transactions/{transactionId}/void \ -H "Authorization: Bearer {token}" // 200 OK { "message": "Transaction voided." } // 400 Bad Request — the transaction is already voided
A ConfigureLoyalty or Admin caller sees every transaction in the company; anyone else sees only their own (createdByUsername is taken from the token automatically).
| page | int | default 1 |
| pageSize | int | default 20, max 100 |
| changedSince | datetime? | Change cursor — see changedSince. Ordered oldest first. |
| cardCode | string? | Filter by card code |
| transactionType | string? | Earn / Redeem |
| username | string? | The cardholder’s username |
| note | string? | Search within the note |
| createdByUsername | string? | Only ConfigureLoyalty/Admin may specify someone else |
| from / to | datetime? | Date range |
[
{
"id": "tx1...",
"userId": "u1...",
"username": "giorgi_k",
"phoneNumber": "+995599123456",
"cardCode": "001-000042",
"transactionType": "Earn",
"amount": 80.00,
"pointsChanged": 8,
"balanceAfter": 328,
"note": null,
"createdByUsername": "salaro_01",
"createdAt": "2026-07-18T10:00:00Z",
"isVoided": false,
"voidedAt": null,
"editedAt": null,
"editedByUsername": null
}
]
Issuing a new loyalty card
A three-step, OTP-based flow — the card is added straight into the customer’s Pockard wallet.
Generates the next sequential card code with the company prefix (001-XXXXXX).
curl https://api.pockard.online/api/manager/loyalty/cards/next-code \ -H "Authorization: Bearer {token}"
{ "code": "001-000043" }
Sends an OTP to the customer by SMS to confirm the card assignment. Governed by the auth rate-limit policy (5/min).
{
"phoneNumber": "+995599123456",
"cardCode": "001-000043",
"cardType": "Qr"
}
// cardType: "Qr" or "Barcode"
{
"message": "OTP sent to the user's phone number.",
"expiresAtUtc": "2026-07-18T14:25:00Z"
}
// 400 Bad Request
{ "message": "ამ ტელეფონის ნომრის მომხმარებელი ვერ მოიძებნა." } // no user with that phone number
{ "message": "ამ კოდის ბარათი უკვე არსებობს ამ კომპანიისთვის." } // a card with that code already exists for this company
Verifies the OTP and creates the card in the customer’s wallet.
{
"phoneNumber": "+995599123456",
"otp": "7842"
}
{ "message": "ბარათი წარმატებით გადაეცა მომხმარებელს." } // the card was handed over successfully
// 400 Bad Request
{ "message": "OTP კოდი არასწორია ან ვადა გასულია." } // the OTP code is wrong or has expired
Redemption OTP
Redeeming points (pointsToRedeem > 0) always requires a 4-digit, 3-minute OTP from the card’s original owner — by two routes: the app (Flow 1) or SMS (Flow 2, the offline fallback).
Flow 1 — the customer, not the cashier, calls this endpoint from the Pockard app. The server generates an OTP; the app shows it in large type alongside a barcode, and the cashier simply scans it.
// Authorization: Bearer {userToken} { "cardId": "a1b2c3d4-0000-0000-0000-000000000042" }
{
"otpCode": "3842",
"expiresAtUtc": "2026-07-18T14:25:00Z"
}
Flow 2 — the cashier requests an OTP by SMS (the customer has no internet). The server finds the card’s original owner by card code and sends the SMS.
{ "cardCode": "001-000042" }
{ "message": "OTP კოდი გაიგზავნა SMS-ით." } // the OTP code was sent by SMS
// 400 Bad Request
{ "message": "ბარათის მფლობელს ტელეფონის ნომერი არ აქვს რეგისტრირებული." } // the cardholder has no registered phone number
Customer and card lookup
The till’s single search box: q is tried as a card code first, then as a phone number (5XX XXX XXX, 995…, +995…). Either way it returns the card, so the operation is posted with its cardCode.
curl "https://api.pockard.online/api/manager/loyalty/lookup?q=599123456" \ -H "Authorization: Bearer {token}" // 200 — the same body as /balance/card/{cardCode}; 404 — "კლიენტი ვერ მოიძებნა." (customer not found)
Finds the customer’s card for this company by phone number — a fast transaction without scanning a card.
curl "https://api.pockard.online/api/manager/loyalty/customer?phone=%2B995599123456" \ -H "Authorization: Bearer {token}"
{
"cardCode": "001-000042",
"username": "giorgi_k",
"phoneNumber": "+995599123456",
"points": 328,
"currentTierName": "Silver",
"currentTierColor": "#94A3B8",
"currentCashbackPercent": 10
}
// 404 Not Found — "No loyalty account found for this phone number."
After scanning a card, shows the owner’s name and current balance straight away.
{
"cardCode": "001-000042",
"ownerUsername": "giorgi_k",
"ownerPhone": "+995599123456",
"points": 328
}
// 404 Not Found — "ბარათი ვერ მოიძებნა." (the card was not found)
The list of the company’s loyalty staff usernames — useful for the createdByUsername filter dropdown in reports.
["salaro_01", "salaro_02", "manager_1"]
Reports and statistics
The totals for one staff member on one day. Non-privileged staff do not need createdByUsername (their own username is used automatically); for ConfigureLoyalty and Admin it is required.
| date* | date | YYYY-MM-DD |
| createdByUsername | string? | Required for ConfigureLoyalty/Admin |
{
"date": "2026-07-18",
"createdByUsername": "salaro_01",
"totalTransactions": 24,
"earnCount": 18,
"earnTotalAmount": 960.00,
"earnTotalPoints": 96,
"redeemCount": 6,
"redeemTotalPoints": 210,
"uniqueCards": 21,
"uniqueUsers": 21,
"transactions": [ /* LoyaltyTransactionDto[] */ ]
}
A date-range report with a daily breakdown. The maximum range is one year.
| from* | date | YYYY-MM-DD |
| to* | date | ≤ 366 days from from |
| createdByUsername | string? | For ConfigureLoyalty/Admin — empty means everyone |
"End date must be on or after start date." or "Date range cannot exceed 1 year."{
"dateFrom": "2026-07-01",
"dateTo": "2026-07-31",
"createdByUsername": "",
"totalTransactions": 540,
"earnCount": 410,
"earnTotalAmount": 21400.00,
"earnTotalPoints": 2140,
"redeemCount": 130,
"redeemTotalPoints": 4800,
"uniqueCards": 312,
"uniqueUsers": 312,
"dailyBreakdown": [
{ "date": "2026-07-01", "earnCount": 14, "earnTotalAmount": 700, "earnTotalPoints": 70, "redeemCount": 4, "redeemTotalPoints": 150 }
]
}
An overall overview of the company’s loyalty program — requires ViewStats (as does GET /segments).
{
"totalCards": 312,
"totalPointsIssued": 18400,
"totalPointsRedeemed": 6200,
"totalSpendRecorded": 92400.00,
"transactionsThisMonth": 540,
"pointsIssuedThisMonth": 2140
}
User endpoints
These endpoints are used by the Pockard app — the card must always belong to the caller, otherwise 404 is returned.
{
"cardId": "a1b2c3d4-...",
"companyId": "f7e8d9c0-...",
"companyName": "Coffee House",
"points": 328,
"monthlySpend": 210.00,
"totalSpend": 1840.00,
"currentTierName": "Silver",
"currentTierColor": "#94A3B8",
"currentCashbackPercent": 10,
"nextTierMinSpend": 300,
"nextTierName": "Gold",
"pointsLabel": "ქულა",
"pointValue": 0.01,
"programType": "Tiered",
"pointsIcon": null,
"pointsIconColor": null
}
page (default 1), pageSize (default 20). Response — LoyaltyTransactionDto[], the same shape as in List transactions.
The company’s public loyalty information, for the card detail screen. If no program exists or isActive=false, returns 404.
LoyaltyProgramDto as in GET /api/loyalty/program.Error format
Every 4xx response comes back in the same shape: { "message": "..." }. The message text itself is in Georgian.
| Status | Meaning |
|---|---|
| 200 / 201 / 204 | The request succeeded. |
| 400 | Validation error (see message) — e.g. not enough points, a wrong OTP, an invalid date range. |
| 401 | The token is missing or has expired. |
| 403 | The token is valid, but you lack the required permission or policy. |
| 404 | The resource (card, transaction, program) was not found, or belongs to someone else. |
| 429 | The rate limit has been exceeded. |