lt.identifiers
lt.identifiers pairs a scanned value (raw) with the thing it stands for (target), under one scan scheme. A value has one live target at a time; retired bindings are kept as history. See Identifier bindings for binders, exclusive targets and the bind scan step.
Reading takes no auth context. Binding, rebinding and retiring take one, and the caller must hold role management or a role the scheme names in identifier.binders; anyone else gets 403.
listBindings
Section titled “listBindings”const result = await lt.identifiers.listBindings({ scheme: 22, target: 'PRN-007' });// result.data.bindings → [{ id, scheme_version, raw, target, exclusive, bound_by, bound_via, bound_at, retired_at, retired_by }]A scheme’s live bindings, newest first.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
scheme | number | Yes | The scan scheme the bindings are kept under |
raw | string | No | A scanned value: answers its live target |
target | string | No | A target: the values bound to it |
includeRetired | boolean | No | Retired bindings too |
limit | number | No | 1 to 500, default 100 |
offset | number | No | Rows to skip |
Returns: LTApiResult<{ bindings }>
const result = await lt.identifiers.bind({ scheme: 22, raw: 'PL-0193', target: 'PRN-007' });Pairs a value with a target. Under a scheme with identifier.exclusiveTarget, the target’s old value is retired in the same transaction.
| Field | Type | Required | Description |
|---|---|---|---|
scheme | number | Yes | Scan scheme version |
raw | string | Yes | The scanned value |
target | string | Yes | What it stands for |
Returns: LTApiResult<{ binding, already, retired }>: 201 bound; 200 when the pair already stands; 409 when the value is bound to another target.
rebind
Section titled “rebind”const result = await lt.identifiers.rebind({ scheme: 22, raw: 'PL-0193', target: 'PRN-012' });Moves a value to a new target. Its old binding (and, under an exclusive scheme, the target’s old value) is retired and the new one inserted in one transaction. Same parameters as bind.
Returns: LTApiResult<{ binding, already, retired }> with status 200.
retire
Section titled “retire”const result = await lt.identifiers.retire({ scheme: 22, id: '41' });Ends one live binding. It stays as history, and the value is free to bind again.
| Field | Type | Required | Description |
|---|---|---|---|
scheme | number | Yes | Scan scheme version |
id | string | Yes | The binding id |
Returns: LTApiResult<IdentifierBinding>: 200 with the retired binding; 404 when no live binding has that id under the scheme.
