Retire (unpair) a paired device
RETIRES (unpairs) a peripheral by flipping its link status to retired, taking it out of service — the parallel of a team member’s deactivate and a store’s deactivate, and the deliberate way to remove a device from the live fleet WITHOUT deleting its row (historic references stay resolvable). Unlike updateFleetDevice, it takes NO body: the path deviceId is the whole input, so there is no way to touch another field and no risk of the status-defaults-to-disconnected trap the full-record replace carries. lastSeen is re-stamped from the server clock. Idempotent: retiring an already-retired device is a no-op that returns it unchanged. There is NO delete endpoint — this never removes a row; re-pair the id (or updateFleetDevice back to a live status) to bring it back. 404s for an unknown device. PERMISSION TRAP (see solya-pos#950): the route guard accepts pos.settings.manage, but the use-case additionally asserts the kernel config:manage permission and NO pos.settings.* scope maps to it, so a principal authenticated by scopes alone clears the guard and then 403s inside the use-case.
Authorizations
Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.
Path Parameters
The paired device id, e.g. reg-paris-1-printer.
1Response
The retired device, with status: retired and lastSeen re-stamped.
The retired device, with status: retired and lastSeen re-stamped.
111111^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
