> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lmrp.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Civilian records and the PNC

> Why civilian data has two sets of endpoints, what each side can see, and how official history is kept.

A civilian character has two kinds of data about it, held by two different parties.

| | Owner's data | Official data |
| - | - | - |
| Examples | Name, address, occupation, private notes, how a vehicle is described | Licence status and points, a vehicle's registration, insurance, MOT and tax status, records, warrants, markers |
| Changed by | The member who owns the character | Authorised staff |
| Endpoints | `/api/civilians/...` | `/api/pnc/...` |
| Permission | `civilians.manage_own`, held by everyone | `pnc.view` to read, one `pnc.*.manage` permission per kind of change |

Owning a character grants nothing over its official data. Holding a PNC permission grants nothing over a character's profile.

## What each side sees

| | Owner | PNC user |
| - | - | - |
| Profile | Yes | Yes, except the owner's private `notes` |
| Which account owns the character | Yes | Only with `civilians.manage` |
| Driving licence, points, endorsements | Yes, without who recorded them and without removed endorsements | Yes, in full |
| Vehicles and their official statuses | Yes | Yes |
| Whether a vehicle is marked stolen | No | Yes |
| Records | Only those marked `visibleToSubject`, without who recorded them | All |
| Warrants and markers | No | Yes |
| History | No | Yes |

## Characters

* An account can hold up to 25 characters. They are never deleted; `status` moves between `ACTIVE`, `INACTIVE` and `DECEASED`.
* Each has a stable `id` and a human-facing `reference` such as `CIV-000123`.
* **Identity lock.** Once a character has any official history (a record, a warrant, a marker, an endorsement or a licence action), its name and date of birth are fixed for the owner. This stops a wanted character being renamed out of a search. `civilians.manage` can still correct them, and that correction is audited.

## Driving licences

A character aged 17 or over can be issued one licence through the civilian endpoints. From then on every change to it is official.

`status` is worked out each time the licence is read:

* A licence past `expiresAt` reads `EXPIRED`.
* A suspension past `suspendedUntil` has lapsed, and the licence reads `VALID` again.

`points` is the sum of endorsements that are neither removed nor expired. A removed endorsement stays in the official view, with who removed it and why.

## Vehicles

A registration is stored in capitals with no spaces or hyphens, and is unique: `lk21 abc`, `LK21-ABC` and `LK21ABC` are the same vehicle.

A vehicle's keeper is a **history of keeper periods**, not a single field. Transferring a vehicle ends one period and starts another, so the PNC can show who kept it before.

`stolen` is not a stored field. It is true while the vehicle carries an active `STOLEN_VEHICLE` marker.

## Markers and BOLOs

One model covers every flag on a person or vehicle.

| Type | Subject | Notes |
| - | - | - |
| `WANTED` | Person | One open at a time. No expiry. |
| `MISSING_PERSON` | Person | One open at a time. No expiry. |
| `PERSON_BOLO` | Person | Can expire |
| `OFFICER_SAFETY` | Person | Can expire |
| `STOLEN_VEHICLE` | Vehicle | One open at a time. No expiry. |
| `VEHICLE_BOLO` | Vehicle | Can expire |
| `GENERAL` | Either | Can expire |

A marker is `active` until it is cleared or passes `expiresAt`. Person and vehicle records return their active markers and warrants directly, and search results carry counts in `alerts`, so a client can put them in front of everything else.

## Warrants

`ACTIVE` warrants become `EXECUTED` or `CANCELLED`, recording who closed them and a note. `EXPIRED` is worked out from `expiresAt` when read. A lapsed warrant can be amended to extend it; a closed one cannot be changed.

## History and audit

Official changes leave two traces, written in one transaction with the change. If either cannot be written, nothing is saved.

* **Record history**, `GET /api/pnc/events`, is the permanent story of a person or vehicle: what changed, from what to what, why, and who did it. It is append-only; the database rejects updates and deletes.
* **The audit log**, `GET /api/audit`, records the same actions for oversight, as `pnc.licence.suspended`, `pnc.warrant.executed`, `pnc.marker.created` and so on.

Things a member does to their own character, such as registering a vehicle, appear in the record history with `bySubject: true`. The member's account is not shown there unless the reader holds `civilians.manage`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.