Public API v1 • SDK Module

SDK Badges

Scan a badge QR and record a check-in — built for kiosks and entrance desks.

What it does

This module records badge check-ins. It’s intentionally narrow: you provide the scanned QR payload and an optional location label.

If the badge is revoked or unknown, you’ll get a clear error.

Scopes

  • badges:write – required

Best practice: kiosk keys should have only this scope.

Check-in

POST/api/public/v1/badges/checkin
SDK
ts
await confera.badges.checkin({
  qr: "ABC123",
  location: "Entrance A",
});
cURL
bash
curl -X POST "https://your-domain/api/public/v1/badges/checkin" \
  -H "X-API-Key: cat_..." \
  -H "Content-Type: application/json" \
  -d '{"qr":"ABC123","location":"Entrance A"}'

Duplicate scans

If the same badge is scanned again, the API returns 409 with a payload like:{ ok: false, duplicate: true }. In a kiosk, treat that as "already checked in" (not an error).

Recommended handling
ts
import { ConferaApiError } from "@confera/sdk";

try {
  await confera.badges.checkin({ qr: token, location: "Entrance A" });
  return { ok: true };
} catch (e) {
  if (e instanceof ConferaApiError && e.status === 409) {
    return { ok: true, already: true };
  }
  throw e;
}

Kiosk tips

Fast feedback

Always show a clear green/red result. Kiosk UIs should not display raw JSON.

Timeouts

Use a short timeout and retry once. If the network is down, don’t block the queue.