A Vehicle is represented by the Vehicle object, described in this section.
Use the following API call to get a complete example Vehicle:
GET /api/beta/vehicles/example
Response:
{
"vehicle": {
"id": "vehicle_id",
"ctime": "2017-10-06T07:51:19.330322726Z",
"mtime": "2017-10-06T07:51:19.330322788Z",
"active_booking_id": null,
"type": "car-basic",
"functions": [
"passenger"
],
"our_ref": "your-vehicle-id",
"image_url": "https://opentransport.com/path/to/vehicle-image.png",
"make": "Beetle",
"year": 2018,
"licence_plate": "E655 CHK",
"vehicle_licence": "abc123",
"vehicle_extra_info": "",
"passengers_max": 5,
"load_m3": 100,
"driver_name": "Henry Ford",
"driver_email": "[email protected]",
"driver_phone_number": "+44 7123 456 7890",
"driver_licence": "12345",
"driver_extra_info": "Description of driver here",
"owner_name": "Henry Ford",
"owner_email": "[email protected]",
"owner_phone_number": "+44 7123 456 7890",
"owner_licence": "12345",
"owner_extra_info": "Description of driver here",
"price_per_km": 2000,
"price_per_km_currency": "GBP",
"price_per_minute": 1000,
"price_per_minute_currency": "GBP",
"extra_price_airport": 1010,
"extra_price_airport_currency": "GBP",
"extra_price_parking": 2020,
"extra_price_parking_currency": "GBP",
"webhooks": {
"vehicle-booking-create": "https://my-server.com/opentransport/webhooks/booking/create"
}
}
}
This section describes the individual fields that make up a Vehicle.
id
- (string) Unique Open Transport ID of the vehiclectime
- (datetime) Time the Vehicle was createdmtime
- (datetime) Time the Vehicle was last modifiedour_ref
- (string) Your reference for a Vehicle to support integration with your own systems (must be unique, a reference string may only be associated with a single vehicle)webhooks
- (object) An object describing the Vehicle Webhookstype
- (string) The Vehicle type key - see the complete list of Vehicle Typesfunctions
- (array) List of Vehicle Function keys this Vehicle provides - see the complete list of Vehicle Functionsmake
- (string) The make of the Vehicleyear
- (number) The year of the Vehiclelicence_plate
- (string) The licence plate of the Vehiclevehicle_licence
- (string) The Vehicle licence of the Vehiclevehicle_extra_info
- (string) Extra informationa about the Vehiclepassengers_max
- (number) The maximum number of passengers this Vehicle is capable of transportingload_m3
- (number) The capacity (in metres cubed) of the Vehicleimage_url
- (string) URL of a picture of the vehicledriver_name
- (string) The driver’s namedriver_email
- (string) The driver’s email addressdriver_phone_number
- (string) The driver’s phone numberdriver_licence
- (string) The driver’s licence numberdriver_extra_info
- (string) Extra information about the driverowner_name
- (string) The owner’s nameowner_email
- (string) The owner’s email addressowner_phone_number
- (string) The owner’s phone numberowner_licence
- (string) The owner’s licenceowner_extra_info
- (string) Extra information about the ownerprice_per_km
- (number) The price per kilometre of the Vehicleprice_per_km_currency
- (string) The currency of the price per kilometre of the Vehicle (e.g. GBP
)price_per_minute
- (number) The price per minute of the Vehicleprice_per_minute_currency
- (string) The currency of the price per minute of the Vehicleextra_price_airport
- (number) The price of airport visitsextra_price_airport_currency
- (string) The currency of the price of airport visitsextra_price_parking
- (number) The price for parkingextra_price_parking_currency
- (string) The currency of the price for parking