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

# Vehicles

## Look Up by License Plate

```
GET /api/civilian/fivem-vehicle/:plate
```

Plate lookup including insurance and registration status. For full flags/BOLO data, prefer `/api/civilian/fivem-plate-lookup/:plate` (see Traffic Stops & Plate Reader).

### Response

```json
{
  "id": "60f7b2c8e1234a001f345678",
  "plate": "ABC123",
  "make": "Honda",
  "model": "Civic",
  "color": "Blue",
  "year": 2020,
  "stolen": false,
  "impounded": false,
  "insurance": true,
  "insuranceStatus": "Valid",
  "insuranceExpiry": "2027-04-01T00:00:00Z",
  "registration": true,
  "registrationStatus": "Valid",
  "registrationExpiry": "2027-04-01T00:00:00Z",
  "owner": "John Doe",
  "ownerPhone": "555-1234",
  "ownerAddress": "123 Main St"
}
```

## Register a Vehicle

```
POST /api/civilian/fivem-register-vehicle
```

### Request Body

```json
{
  "plate": "ABC123",                    // required
  "ownerId": "123-45-6789",             // required: civilian _id, SSN, or licenseNumber
  "communityId": "DISCORD_GUILD_ID",    // required
  "make": "Honda",                      // optional
  "model": "Civic",                     // optional
  "color": "Blue",                      // optional
  "year": 2020                          // optional
}
```

If the plate already exists in the community, the existing record is updated (owner reassigned, optional fields overwritten). Plates are normalized to upper-case with whitespace stripped before storage and comparison.

### Response

```json
{
  "action": "created",                  // 'created' | 'updated'
  "vehicleId": "60f7b2c8e1234a001f345678",
  "message": "Vehicle registered successfully",
  "vehicle": {
    "plate": "ABC123",
    "owner": "John Doe",
    "make": "Honda",
    "model": "Civic"
  }
}
```

## Sync a Civilian's Vehicles

```
POST /api/civilian/fivem-sync-vehicles
```

Bulk upsert the vehicles owned by a single civilian. Useful when a player's garage state changes server-side.

### Request Body

```json
{
  "ownerId": "123-45-6789",             // required: civilian _id, SSN, or licenseNumber
  "communityId": "DISCORD_GUILD_ID",    // required
  "vehicles": [                         // required: array
    {
      "plate": "ABC123",                // required
      "make": "Honda",
      "model": "Civic",
      "color": "Blue",
      "year": 2020
    }
  ]
}
```

Newly-created vehicles are stamped with a 1-year `registrationExpiry` and `registrationStatus: "Valid"`. Existing vehicles have only the supplied fields overwritten; fields omitted from the request keep their current value.

### Response

```json
{
  "success": true,
  "created": 2,
  "updated": 1,
  "failed": 0,
  "message": "Synced 3 vehicles"
}
```
