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

# Vehicles

> Manage vehicle fleets

## Description

**Vehicles** represent a company's fleet. Their consumptions generate emissions based on engine type and fuel.

## Endpoints

| Method | Path                         | Description              |
| ------ | ---------------------------- | ------------------------ |
| GET    | `/api/v1/vehicles`           | List vehicles            |
| GET    | `/api/v1/vehicles/{id}`      | Get vehicle              |
| POST   | `/api/v1/vehicles`           | Create or update vehicle |
| GET    | `/api/v1/vehicles/dashboard` | Vehicle dashboard        |

## Required fields to create a vehicle

* `id`, `type`, `companyId`, `buildingId`, `licencePlate`
* Optional: `vehicleCategoryId`, `motorType`, `fuelTypeId`, `brand`, `model`

## Engine types

* `combustion`, `electric`, `hybrid`

## Example

```bash theme={null}
curl -X POST "https://www.manglai.io/api/v1/vehicles" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "uuid",
    "type": "vehicle",
    "companyId": "uuid",
    "buildingId": "uuid",
    "licencePlate": "1234ABC",
    "motorType": "electric"
  }'
```
