> 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/rest-api/dispatch-leo.md). Agents can also search and read this documentation through its [MCP server](https://cde-inc.gitbook.io/cde-cad-documentation/~gitbook/mcp).

# Dispatch & LEO

Manage dispatch calls, active units, BOLOs, and real-time location tracking for law enforcement operations.

***

{% hint style="success" %}
**GET →** `/api/calls`
{% endhint %}

List all active dispatch calls for the community.

**Curl example:**

```
curl https://cdecad.com/api/calls \
  -H "Authorization: Bearer <token>" \
  -H "x-community-id: community_abc123"
```

**Response:**

```
{
  "calls": [
    {
      "id": "call_001",
      "type": "911",
      "status": "active",
      "location": "Legion Square",
      "description": "Report of shots fired",
      "assignedUnits": ["1-A-12", "1-A-15"],
      "createdAt": "2025-01-15T22:30:00Z"
    }
  ]
}
```

{% hint style="info" %}
**POST →** `/api/calls`
{% endhint %}

Create a new dispatch call.

**Request body:**

```
{
  "type": "911",
  "location": "Vinewood Blvd & Alta St",
  "description": "Vehicle accident, injuries reported",
  "communityId": "community_abc123"
}
```

**Curl example:**

```
curl -X POST https://cdecad.com/api/calls \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "911",
    "location": "Vinewood Blvd & Alta St",
    "description": "Vehicle accident, injuries reported",
    "communityId": "community_abc123"
  }'
```

**Response (201 Created):**

```
{
  "message": "Call created successfully",
  "call": {
    "id": "call_002",
    "type": "911",
    "status": "pending",
    "location": "Vinewood Blvd & Alta St",
    "description": "Vehicle accident, injuries reported",
    "assignedUnits": [],
    "createdAt": "2025-01-15T23:00:00Z"
  }
}
```

{% hint style="success" %}
**GET →** `/api/units`
{% endhint %}

List all active units in the community. Returns on-duty officers and their current status.

**Response:**

```
{
  "units": [
    {
      "id": "unit_001",
      "callsign": "1-A-12",
      "name": "Officer Smith",
      "status": "available",
      "department": "LSPD"
    }
  ]
}
```

{% hint style="success" %}
**GET →** `/api/bolos`
{% endhint %}

List all active BOLOs (Be On the Lookout) for the community.

**Response:**

```
{
  "bolos": [
    {
      "id": "bolo_001",
      "type": "vehicle",
      "description": "White Benefactor Schafter, plate ABC1234",
      "reason": "Wanted in connection with armed robbery",
      "createdBy": "Officer Johnson",
      "createdAt": "2025-01-15T20:00:00Z"
    }
  ]
}
```

{% hint style="info" %}
**POST →** `/api/dispatch/location-update`
{% endhint %}

Update a unit's real-time location. Typically called from FiveM at regular intervals.

**Request body:**

```
{
  "unitId": "unit_001",
  "x": 215.3,
  "y": -810.5,
  "z": 30.7,
  "heading": 90.0
}
```

{% hint style="success" %}
**GET →** `/api/dispatch/locations`
{% endhint %}

Get all unit locations for the dispatch map. Returns the latest known position of every active unit.

**Response:**

```
{
  "locations": [
    {
      "unitId": "unit_001",
      "callsign": "1-A-12",
      "x": 215.3,
      "y": -810.5,
      "z": 30.7,
      "heading": 90.0,
      "updatedAt": "2025-01-15T23:05:00Z"
    }
  ]
}
```

{% hint style="info" %}
**Real-Time Updates**

Dispatch calls and unit statuses are also broadcast via WebSocket for real-time updates. The REST endpoints provide a snapshot of current state, while WebSocket events push changes as they happen.
{% endhint %}
