FideliaDevelopers · POS APIFrançais

Keys & pairing

Keys

Each till has its own key: fk_live_ followed by 40 characters (fk_test_ in the sandbox). Send it on every request:

Authorization: Bearer fk_live_...

The cashier never sees a key. Your software shows a code; the shop owner types it in Fidelia.

  1. Start: no key needed.
curl -X POST https://api.fidelia.se/pos/v1/pairing \
  -H "Content-Type: application/json" \
  -d '{ "device_name": "Till 1", "partner_id": "pt_..." }'
{ "pairing_id": "806a7164-…", "code": "760978", "poll_secret": "fp_...", "expires_at": "…" }
  1. Show the code on the till’s screen: “Open Fidelia → Tills & POS and type 760 978”. The owner sees your device name and your company (from partner_id), picks a name and a location, and connects it.

  2. Poll every 3 seconds with the poll secret:

curl https://api.fidelia.se/pos/v1/pairing/806a7164-… \
  -H "Authorization: Pairing fp_..."
Status Meaning
202 { "status": "pending" } Not entered yet: keep polling.
200 { "status": "approved", "key": "fk_live_...", "shop": { … } } Save the key. It is handed out once.
410 pairing_expired The 10 minutes are over: start again.

Then call GET /me with the new key to load the shop’s cards and settings.

Partner id

Your partner_id (pt_ + 24 characters) comes with your sandbox. Send it when pairing: the till and the shop are then linked to your company (referral agreements, support).

Without pairing

A developer setting up a single shop by hand can ask the owner for a key: Fidelia → Tills & POS → API key for a developer. It is shown once.