AlmondTill/G3N API

On this page

suspendDevice

mutation · in the family Device

What it does

Suspend a device — the kill switch for a lost or compromised till.

active → suspended — the manager-imposed kill switch; instantly revocable via reactivate. Compose with revokeAllDeviceSessions to also kill the live sessions.

Careful

The device stops working immediately; pair it back deliberately.

Who may call it

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

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.
revisionID ID!yesThe revision id you read on the record; the change is refused if an edit landed in the meantime.
reasonStringnoNo 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 ExampleSuspendDevice($id: ID!, $revision: ID!, $reason: String) {
  suspendDevice(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    deviceType
    registerId
    code
  }
}

Variables:

{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

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

Example response

{
  "data": {
    "suspendDevice": {
      "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