> For the complete documentation index, see [llms.txt](https://cde-inc.gitbook.io/cde-cad-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cde-inc.gitbook.io/cde-cad-documentation/fivem-developer-integration/warrants.md). Agents can also search and read this documentation through its [MCP server](https://cde-inc.gitbook.io/cde-cad-documentation/~gitbook/mcp).

# Warrants

## Create a Warrant

```
POST /api/fivem/warrant
```

### Request Body

```json
{
  "communityId": "DISCORD_GUILD_ID",
  "civilianId": "123-45-6789",        // required: civilian _id, SSN, or licenseNumber
  "charges": ["Grand Theft Auto", "Evading Police"], // required: string array or charge objects
  "description": "Suspect fled on foot", // optional
  "issuedBy": "Officer Smith"          // optional: defaults to "FiveM System"
}
```

`charges` can also be an array of objects: `[{ "code": "GTA", "description": "Grand Theft Auto", "severity": "felony" }]`

{% hint style="warning" %}
`POST /api/fivem/warrant` now **requires `actingDiscordId`** and enforces the community's warrant-create policy server-side, the same as the delete and lifecycle endpoints. A create without it returns `400`; an officer without the required access returns `403`. See [Permissions](https://cde-inc.gitbook.io/cde-cad-documentation/fivem-developer-integration/permissions.md).
{% endhint %}

### Response

```json
{
  "warrantId": "...",
  "civilianId": "...",
  "charges": [{ "description": "Grand Theft Auto" }, { "description": "Evading Police" }]
}
```

A `warrant-created` Socket.IO event is emitted to the community room.

## List Active Warrants

```
GET /api/fivem/warrants
```

Active warrants only, in the same flat row shape as [`/bolos`](https://cde-inc.gitbook.io/cde-cad-documentation/fivem-developer-integration/bolos.md). The `id` is what you pass to `PATCH /api/fivem/warrant/:warrantId` to close it out.

### Response

```json
{
  "success": true,
  "total": 1,
  "warrants": [{
    "id": "6a7a1623b68aafcb58624843",
    "type": "warrant",
    "warrantNumber": "FVM-1754...",
    "title": "Grand theft auto, Evading",
    "status": "active",
    "civilian": { "id": "6a73...", "name": "John Doe", "ssn": "TESTCID0001" },
    "charges": ["Grand theft auto", "Evading"],
    "officerName": "Sgt. Smith",
    "narrative": "",
    "createdAt": "2026-08-11T09:14:00.000Z"
  }]
}
```

## Close Out a Warrant

```
PATCH /api/fivem/warrant/:warrantId
```

Cancel a warrant, or mark it served or cleared. Judicial-gated: pass the acting officer's Discord ID, and the request is rejected unless that officer has judicial access (see [Permissions](https://cde-inc.gitbook.io/cde-cad-documentation/fivem-developer-integration/permissions.md)). Enforced server-side.

### Request Body

```json
{
  "actingDiscordId": "DISCORD_USER_ID",  // required: officer with judicial access
  "status": "served",                    // required: cancelled | resolved | served | cleared
  "notes": "Served at residence"         // optional: appended to the warrant
}
```

`served` and `cleared` both resolve the warrant (`status` becomes `resolved`). `cancelled` cancels it.

### Response

```json
{
  "success": true,
  "warrantId": "665f0a1b2c3d4e5f6a7b8c9d",
  "warrantNumber": "FVM-1717012345678",
  "status": "resolved",
  "resolvedBy": "Officer Smith",
  "resolvedDate": "2026-08-07T14:40:00.000Z"
}
```

Emits `warrant-updated`. Returns `400` for a missing or invalid `status`, `403` if the officer lacks judicial access, and `404` if the warrant isn't found.
