Resolve a flagged device swap
const url = 'https://example.com/api/v1/admin/printers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/identity/resolve';const options = { method: 'POST', headers: {'X-Label-Hub-Key': '<X-Label-Hub-Key>', 'Content-Type': 'application/json'}, body: '{"expected_observed_id":"example","expected_observed_kind":"example","resolution":"same_device"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/admin/printers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/identity/resolve \ --header 'Content-Type: application/json' \ --header 'X-Label-Hub-Key: <X-Label-Hub-Key>' \ --data '{ "expected_observed_id": "example", "expected_observed_kind": "example", "resolution": "same_device" }'Ends the device-swap flag of a printer (#231). same_device accepts the flagged device as the printer and keeps its calibration; replaced does the same and deletes every stored calibration of the printer, in one transaction. The held sheet and calibration jobs are released once the change is committed. 404 for an unknown printer, 409 no-identity-mismatch when no swap is flagged and 409 identity-changed when the flagged device is no longer the one reviewed. Admin only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Body of POST /admin/printers/{id}/identity/resolve.
object
The flagged device the admin reviewed (observed_id)
Its kind (observed_kind); the call binds to this device
Same_device: the flagged device is accepted and the calibration stays; replaced: the device was swapped, so its stored calibration is deleted
Responses
Section titled “Responses”Successful Response
Lesbare Darstellung eines Druckers.
Enthält alle DB-Felder — keine internen Implementierungsdetails.
trays is the tray list of a page printer and null for tape printers.
object
object
object
Stored label layout per tape width in mm (#258), keyed by the width as a string; a missing width uses the tape default (62 mm across/compact, else along)
object
A stored layout default for one tape width of one printer.
None fields fall back to the built-in default for the tape (62 mm: across, compact;
every other width: along).
object
How the label content runs on endless tape.
The built-in QL 62 mm across-width layouts (docs/design/ql-layout-presets).
object
A configured tray of a page printer.
Example
{ "layout_defaults": { "additionalProperty": { "orientation": "across", "preset": "compact" } }}Validation Error
object
object
object
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}