Create New Vehicle
POST/api/vehicle/
Register a new vehicle in the system with support for document (ITV) and image upload.Required fields:- vehicle_type: Vehicle type (must be one of the allowed values)- plate: Vehicle license plate (validated format)- shipping_type: Transport type (must be one of the allowed values)- cargo_type: Array of cargo types allowed for this vehicleValidations:- If shipping_type is fresh, fresh_cargo_temp is required- All types (vehicle_type, shipping_type, cargo_type) are validated against allowed lists- The license plate (plate) is validated with a regular expressionAllowed types:- Vehicles: ${Vehicle.validTypes.join(', ')}- Transport types: ${Vehicle.validShippingTypes.join(', ')}- Cargo types: ${Vehicle.validCargoTypes.join(', ')}Request example:json{ vehicle_type: truck, plate: 1234ABC, shipping_type: dry, cargo_type: [construction, industrial], fresh_cargo_temp: null, image: (binary), itv: (binary)}
Request
Responses
- 200
- 400
- 401
Individual vehicle
Request error
Unauthorized