Creating Vehicles

After configuring attributes, templates, and lifecycle states, you can create a Vehicle. For this, call the POST /vehicles endpoint and specify the following parameters in the request body:

Member

Description

Remarks

vehicleName

The name of the participant Vehicle.

Data type: string
Character length: Min- 1 & Max- 64

vehicleCode

Any unique ID associated with the participant Vehicle being created.

Data type: string
Character length: Min- 1 & Max- 64

vehicleOwnerId

The participant ID of the participant type as specified in allowedOwners during the creation of the said type.

Data type: string
Character length: Min- 1 & Max- 64

vehicleCategory

Category of the Vehicle.

Data type: string

vehicleSubCategory

Subcategory of the Vehicle.

Data type: string

vehicleMode

The mode of the Vehicle among land, sea, and air.

Data type: string

fuelType

The fuel type of the Vehicle among Petrol, Diesel, Electric, CNG, and Manual.

Data type: string

vehicleStructure

Structure of the Vehicle among Single Unit, Tractor, and Trailer.

Data type: string

cargoArea

Cargo area of the Vehicle.

Data type: number

payloadCapacity

Payload capacity of the Vehicle.

Data type: number

operatorId

Operator ID of the Vehicle.

Data type: string

regnNo

Registration Number of the Vehicle.

Data type: string

regnYear

Registration year of the Vehicle.

Data type: number

availability

The availability of the Vehicle according to Days/Dates/Time.

Data type: object

vehicleOwnership

The owner of the Vehicle among self, seller, and partner.

Data type: string

ownerDetails

Details of the Vehicle owner if the Vehicle is sourced via an intermediary (broker, etc.).

Data type: object

serviceability

Vehicle serviceability.

Data type: object

reportingCenter

Reporting Center of the Vehicle (Participant ID of reporting Facility).

Data type: string

The following example request body shows how to create and update a Vehicle named Semi Truck:

{
  "vehicleName": "Semi Truck",
  "vehicleCode": "MH01A1234",
  "vehicleOwnerId": "participant:b03369f6-9d60-4f6e-bc06-2dd2e74d9ea1",
  "vehicleCategory": "Truck",
  "vehicleSubCategory": "Van",
  "vehicleOwnership": "self",
  "vehicleMode": "Land",
  "fuelType": "Petrol",
  "regnNo": "MH 01 AA 1234",
  "regnYear": 2020,
  "vehicleStructure": "Single-unit",
  "cargoArea": 100,
  "payloadCapacity": 100,
  "operatorId": "ID",
  "availability": {
    "days": [
      "Mon",
      "Tue",
      "Wed"
    ]
  },
  "ownerDetails": {
    "name": "John Doe",
    "contact": "8382372232"
  },
  "serviceability": {
    "cities": [
      "Mumbai",
      "Delhi" ]
  },
  "reportingCenter": "facilities:4d6e7125-aaa3-4ea1-9fd4-44c4f1cad179"
}
{
  "vehicleName": "Semi Truck",
  "vehicleCode": "MH01A1000",
  "vehicleOwnerId": "participant:b03369f6-9d60-4f6e-bc06-2dd2e74d9ea1",
  "vehicleCategory": "Truck",
  "vehicleSubCategory": "Semi-truck",
  "vehicleOwnership": "self",
  "vehicleMode": "Land",
  "fuelType": "Petrol",
  "regnNo": "MH 01 AA 1000",
  "regnYear": 2020,
  "vehicleStructure": "Single-unit",
  "cargoArea": 100,
  "payloadCapacity": 100,
  "operatorId": "ID",
  "availability": {
    "days": [
      "Mon",
      "Tue",
      "Wed"
    ]
  },
  "ownerDetails": {
    "name": "John Doe",
    "contact": "8382372232"
  },
  "serviceability": {
    "cities": [
      "Mumbai",
      "Delhi" ]
  },
  "reportingCenter": "facilities:4d6e7125-aaa3-4ea1-9fd4-44c4f1cad179"
}

Did this page help you?