Creating Vehicles

For creating a vehicle, call the POST /vehicles endpoint and specify the following parameters in the request body:

MemberDescriptionRemarks
vehicleNameThe name of the participant Vehicle.Data type: string
Character length: Min- 1 & Max- 64
vehicleCodeAny unique ID associated with the participant Vehicle being created.Data type: string
Character length: Min- 1 & Max- 64
vehicleOwnerIdThe 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
vehicleCategoryCategory of the Vehicle.Data type: string
vehicleSubCategorySubcategory of the Vehicle.Data type: string
vehicleModeThe mode of the Vehicle among land, sea, and air.Data type: string
fuelTypeThe fuel type of the Vehicle among Petrol, Diesel, Electric, CNG, and Manual.Data type: string
vehicleStructureStructure of the Vehicle among Single Unit, Tractor, and Trailer.Data type: string
cargoAreaCargo area of the Vehicle.Data type: number
payloadCapacityPayload capacity of the Vehicle.Data type: number
operatorIdOperator ID of the Vehicle.Data type: string
regnNoRegistration Number of the Vehicle.Data type: string
regnYearRegistration year of the Vehicle.Data type: number
availabilityThe availability of the Vehicle according to Days/Dates/Time.Data type: object
vehicleOwnershipThe owner of the Vehicle among self, seller, and partner.Data type: string
ownerDetailsDetails of the Vehicle owner if the Vehicle is sourced via an intermediary (broker, etc.).Data type: object
serviceabilityVehicle serviceability.Data type: object
reportingCenterReporting 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"
}