Skip to main content

Create a new vehicle

POST 

/v1/vehicles

Registers a new vehicle in the system. If no supplierId is provided, the first company of the fleet will be used. Vehicle type and capacity information can be specified.

Request

Body

required
    plateNumber stringrequired
    vehicleTypeId stringrequired
    supplierId string
    make string

    The make of the vehicle. Require if the model is provided.

    model string

    The model of the vehicle.

    year number

    The release year of the vehicle.

    color string
    passengers number
    luggage number

Responses

Vehicle successfully created

Schema
    _id stringrequired

    The ID of the vehicle

    plateNumber stringrequired

    The plate number of the vehicle

    vehicleTypeId stringrequired

    The vehicle type ID of the vehicle

    vehicleTypeName stringrequired

    The vehicle type name of the vehicle

    supplierId stringrequired

    The supplier ID of the vehicle

    make string

    The make of the vehicle. Require if the model is provided.

    model string

    The model of the vehicle

    year number

    The year of the vehicle

    color string

    The color of the vehicle

    passengers number

    The passengers of the vehicle

    luggage number

    The luggage of the vehicle

    createdDate date-time

    The created date of the vehicle

    latestUpdate date-time

    The latest update date of the vehicle

Loading...