AlmondTill/G3N API

On this page

reissueDevicePairingCode

mutation · in the family Device fleet

What it does

Issue a fresh pairing code — for a lost code or a scheduled credential rotation.

Mint a FRESH single-use pairing code for an existing Device: pending_pairing (the lost/expired first code) or active (pre-expiry rotation — the fresh exchange REPLACES the credential, the state never regresses); a suspended device refuses (the kill switch stays killed); the prior un-exchanged code invalidates. Template class A3_DEVICE (hand-derived v30).

What happens

The old un-exchanged code dies; rotation replaces the device’s credential.

Who may call it

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

Arguments

NameTypeRequiredNotes
inputReissueDevicePairingCodeInput ReissueDevicePairingCodeInput!yesNo further notes.

Returns

DeviceEnrollment DeviceEnrollment! — The enrollDevice / reissueDevicePairingCode result — the device + its single-use pairing code, returned ONCE (hash-only at rest; the damm32 check symbol screens typos at entry).

Example request

mutation ExampleReissueDevicePairingCode($input: ReissueDevicePairingCodeInput!) {
  reissueDevicePairingCode(input: $input) {
    pairingCode
    pairingCodeExpiresAt
  }
}

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": {
    "reissueDevicePairingCode": {
      "pairingCode": "BJ-001",
      "pairingCodeExpiresAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer