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

# ERS Integration

Bridges ERS callouts (LSPDFR-style) into CAD as real calls, civilians, and vehicles. All endpoints require ERS integration to be enabled in **Admin Panel > FiveM Settings**.

## Create a CAD Call From an ERS Callout

```
POST /api/fivem/ers/callout
```

### Request Body

```json
{
  "ersCalloutId": "ers-callout-123",
  "callType": "Structure Fire",
  "location": "Grove Street",
  "postal": "123",
  "coordinates": { "x": 100.0, "y": 200.0, "z": 50.0 },
  "description": "House fire reported",
  "priority": "high",
  "serviceType": "fire"
}
```

`serviceType` is one of `police`, `fire`, `ambulance`, or `tow`. The incident number is prefixed with `ERS-`. Calls are de-duplicated by `ersCalloutId`; submitting the same ID twice returns the existing call with `duplicate: true`.

## End an ERS Callout

```
POST /api/fivem/ers/callout-end
```

Closes the matching CAD call when the player ends the callout.

### Request Body

```json
{ "ersCalloutId": "ers-callout-123" }
```

## Mark Unit Arrived On-Scene

```
POST /api/fivem/ers/callout-arrived
```

## Attach a Unit to a Callout

```
POST /api/fivem/ers/unit-attach
```

## Spawn an ERS Civilian or Vehicle

```
POST /api/fivem/ers/civilian
POST /api/fivem/ers/vehicle
```

Creates temporary civilian/vehicle records for an ERS scenario. Requires `ersCreateCivilians`/`ersCreateVehicles` to be enabled.

## ERS Traffic Stop

```
POST /api/fivem/ers/traffic-stop
```

Same shape as the regular traffic-stop endpoint, but tagged as ERS-generated for cleanup tracking.

## Duty Status Bridge

```
POST /api/fivem/ers/duty
```

### Request Body

```json
{
  "discordId": "DISCORD_USER_ID",
  "onDuty": true,
  "department": "Police",
  "callSign": "1-A-12"
}
```

Used when `ersAutoOnDuty` is enabled. Accepting a callout automatically puts the player on duty in CAD.
