Loyalty actions
Cashier and card operations: scan codes, register purchases, check in memberships, top up gift cards and share cards.
Every action is a
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /loyalty-actions | scan: resolve a card or reward code |
POST | /loyalty-actions | register_purchase: register a purchase or visit |
POST | /loyalty-actions | use_membership: check in a membership |
POST | /loyalty-actions | load_balance: top up a gift card |
POST | /loyalty-actions | wallet_links: card page and wallet links |
POST | /loyalty-actions | send_card: email the card link |
POST | /loyalty-actions | refresh_pass and recompute_tiers (see Actions) |
organization_id is required in every body and must be the API key's organization. There is no list, get, update or delete.
Actions
| Action | Parameters | Does |
|---|---|---|
scan | code | Finds a card (card code or referral code) or a reward code |
register_purchase | member_id, amount, note, reference | Registers a purchase or visit and awards points, stamps or cashback |
use_membership | member_id, note | Uses one check-in of a membership |
load_balance | member_id, amount, description | Tops up a gift card |
wallet_links | member_id | Returns the card page and the Apple Wallet / Google Wallet links |
send_card | member_id | Emails the card link to the customer |
refresh_pass | member_id | Pushes the latest card data to the installed wallet passes. Returns { "refreshed": true } |
recompute_tiers | program_id | Re-evaluates the tier of every member of a program. Returns { "updated": <number of members changed> } |
Common body parameters
| Name | Type | Required | Description |
|---|---|---|---|
organization_id | Number | Yes | ID of your organization |
action | String | Yes | One of the actions above |
member_id | Number | Depends on the action | ID of the card (Loyalty Members). It must belong to your organization. |
An unknown action returns 400 with "Unknown action. Use one of: scan, register_purchase, use_membership, load_balance, wallet_links, send_card, refresh_pass, recompute_tiers". A member_id of another organization returns 404 "Member not found in this organization".
Response values
The member returned by these actions is the full Loyalty Member object (numbers as numbers). Amounts in transaction and rewards are numbers.
Every balance movement also refreshes the card in Apple Wallet and Google Wallet and fires the Loyalty balance changed automation trigger (and Reward unlocked / Tier changed when that happens).
Report an issue with this documentation
Please log in to report issues with our documentation.