Skip to main content

Create New Vehicle

POST 

/api/vehicle/

Register a new vehicle in the system with support for document (ITV) and image uploads.

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 allowed cargo types for this vehicle

Validations:

  • 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 expression

Allowed types:

  • Vehicles: ${Vehicle.validTypes.join(', ')}
  • Transport types: ${Vehicle.validShippingTypes.join(', ')}
  • Cargo types: ${Vehicle.validCargoTypes.join(', ')}

Request example:

{
vehicle_type: truck,
plate: 1234ABC,
shipping_type: dry,
cargo_type: [construction, industrial],
fresh_cargo_temp: null,
image: (binary),
itv: (binary)
}

Request

Responses

Individual vehicle