All documentation

Customers

Every purchase or reward starts by finding the customer's card. All three endpoints need customers:identify and answer with a scan ticket you use for the purchase.

Identify by QR

POST /customers/identify

The customer opens Likom and shows a QR. Send exactly what your scanner read. Two kinds of QR work:

  • A card's QR (inside one of their cards): opens that card. Answer: kind: "card".
  • The customer's own Likom QR: lists their cards at your business. If exactly one can be used, it opens at once (kind: "card"); otherwise kind: "person", and you pick a card.

Gift and event ticket QRs aren't supported yet (400 not_supported). The code is used up by this call.

FieldType
codestring, requiredWhat the scanner read (up to 200 characters)
branch_idUUIDRequired unless the key is set to one branch
bash
curl https://api.likom.co/v1/partner/customers/identify \
              -H "Authorization: Bearer $LIKOM_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"code": "<what the scanner read>", "branch_id": "0193a1c2-8f01-7b22-8c3d-1a2b3c4d5e6f"}'
json
{
              "kind": "card",
              "card": {
                "ticket": "t_9Gq2…",
                "expires_in": 900,
                "customer_id": "0193b7e0-1c2d-7e3f-8a4b-5c6d7e8f9a0b",
                "customer": "Maya Santos",
                "contact": "m•••@gmail.com",
                "card": {
                  "id": "0193b7e0-4a5b-7c6d-9e8f-0a1b2c3d4e5f",
                  "number": "4417",
                  "program": "Harbor Coffee Rewards",
                  "mechanics": ["points"],
                  "active": true,
                  "paused": false,
                  "points": "120",
                  "punches": 0,
                  "punches_required": null,
                  "cashback": "0",
                  "tier": null
                },
                "location_id": "0193a1c2-8f01-7b22-8c3d-1a2b3c4d5e6f",
                "branch": "Harbor Coffee · Pier 7",
                "currency": "USD",
                "needs_amount": true,
                "running": true,
                "not_running_reason": null,
                "rewards": [
                  {
                    "promotion_id": "0193c0d1-2e3f-7a4b-8c5d-6e7f8a9b0c1d",
                    "title": "Free pastry",
                    "uses": "Uses 100 points",
                    "available": true,
                    "blocker": null,
                    "reward": "Any pastry",
                    "price": null,
                    "min_purchase": "0"
                  }
                ],
                "done": [],
                "receipt_required": true,
                "vat_percent": 0,
                "punch_full": false,
                "typed": false
              },
              "customer": null,
              "cards": [],
              "ticket": null,
              "note": null,
              "typed": false
            }

Shortened: the card also has design, punch_cycle, pause_reason, membership, and the scan has access and fee for membership cards.

Find without a QR

POST /customers/find

For a customer who forgot their phone: look them up by their exact Likom @username. Stores can't search by email or mobile number (400 username_only). It only finds people who already have a card at your business and allow stores to find them (Likom → Privacy, on by default). The customer is told in Likom.

FieldType
querystring, requiredExact @username, with or without the @ (up to 120 characters)
branch_idUUIDRequired unless the key is set to one branch

The answer has the same shape as identify, with typed: true. A typed card can earn only: no rewards (403 needs_qr). No match, or a customer who turned lookups off, gets the same 404 customer_not_found, so a lookup never reveals whether someone uses Likom.

Pick a card

POST /customers/card

After kind: "person", show the customer's cards and send the one they pick. Answer: the card object (below), with the ticket to record on. Each person scan can open one card.

FieldType
ticketstring, requiredThe top-level ticket from the identify or find answer
card_idUUID, requiredOne of cards[].id with available: true

Each entry in cards has id, program, number (last 4 digits), mechanics, design, points, punches, punches_required, cashback, available and blocker (why it can't be used now).

The identify answer

Field
kindcard: a card is open in card · person: pick one of cards
cardThe open card (below), when kind is card
customer{id, name}, when kind is person
cardsThe customer's cards here, when kind is person
ticketFor POST /customers/card, when kind is person
noteA message to show staff, if any
typedtrue: found without a QR, earning only

The card object

Field
ticketUse it for preview, purchase and rewards
expires_inSeconds the ticket has left (15 minutes at first)
customer_id, customerThe customer's code at your business (e.g. C-7K2Q9XM, not their Likom account id) and their @username (with their name only if they chose to share it with you)
contactAlways empty
birthday_todaytrue on the customer's birthday, only if they shared their birthday with you
cardThe card: id, number, program, mechanics (points, punches, cashback, membership), balances (points, punches, punches_required, cashback), tier, active, paused
location_id, branch, currencyWhere the scan counts
needs_amountfalse: a one-tap stamp or visit card; the bill can be 0
running, not_running_reasonWhether the program runs today
rewardsWhat can be handed over now: see Rewards
doneWhat this ticket already recorded, e.g. ["purchase"]
receipt_requiredThe business wants receipt numbers (the API always does)
vat_percentVAT at this branch
punch_fullThe stamp card is full: hand over its reward before more stamps
typedFound without a QR: earning only

Privacy

Through the API you get the customer's @username, a customer code for your business and their card at your business. Their name and birthday only if they chose to share them with you; never their Likom account id, address, email or mobile, or their other shops. GET /transactions has no customer details at all. Use what you get only to serve the customer in front of you.

Still need help? Troubleshooting · [email protected]