Skip to main content

Description

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

Endpoints

MethodPathDescription
GET/api/v1/vehiclesList vehicles
GET/api/v1/vehicles/{id}Get vehicle
POST/api/v1/vehiclesCreate or update vehicle
GET/api/v1/vehicles/dashboardVehicle dashboard

Required fields to create a vehicle

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

Engine types

  • combustion, electric, hybrid

Example

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"
  }'