AlmondTill/G3N API

On this page

unpairDevice

mutation · in the family Device fleet

What it does

Clear a device’s register binding.

Clear the Register binding (the pairDeviceToRegister twin — the same live-TillSession refusal). Template class A3_DEVICE (hand-derived v30).

Careful

Refuses while the register has an open till session.

Who may call it

Capability area: Device fleet — Enrolling, pairing, suspending and retiring the devices at your registers.

Arguments

NameTypeRequiredNotes
inputUnpairDeviceInput UnpairDeviceInput!yesNo further notes.

Returns

Device Device! — A Device — the PHYSICAL hardware identity (native POS apps, the in-Office browser POS, the Pi legacy-peripheral bridge), kept separate from the logical Register it serves: the pairing ref is ONE-WAY Device→Register (0..1, re-pairable — registerId lives HERE, never on the Register). Born pending_pairing via the BESPOKE enrollDevice (the pairing code returns ONCE, TTL 15 min); completePairingDevice (PUBLIC — the code IS the auth) flips it active and returns the device credential ONCE (hash-only at rest; mandatory 12-month rotation, decision I). active ⇄ suspended is the kill-switch pair; dooms from active/suspended gate on the paired Register's open TillSession. At POS the REAL principal is COMPOSITE (decision E): device session (WHERE/trust) + user session (WHO/authority) — the auth seam. NOT searchable (infrastructure — the Register non-joiner stance).

Example request

mutation ExampleUnpairDevice($input: UnpairDeviceInput!) {
  unpairDevice(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    deviceType
    registerId
    code
  }
}

Variables:

{
  "input": {
    "deviceId": "01900000-0000-7000-8000-7c291d9e0000",
    "expectedRevision": "01900000-0000-7000-8000-e02b2e6c0000"
  }
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

{
  "data": {
    "unpairDevice": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "DE-EXMP-0000-000F",
      "type": "Device",
      "caption": "Blue jeans",
      "status": "pending_pairing",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "deviceType": "pos_native_ios_phone",
      "registerId": "01900000-0000-7000-8000-c30413dd0000",
      "code": "BJ-001"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in