Vehicle object

A Vehicle is represented by the Vehicle object, described in this section.

Example vehicle

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"
		}
	}
}

Vehicle fields

This section describes the individual fields that make up a Vehicle.

System fields

  • id - (string) Unique Open Transport ID of the vehicle
  • ctime - (datetime) Time the Vehicle was created
  • mtime - (datetime) Time the Vehicle was last modified
  • our_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 Webhooks

Vehicle details

  • type - (string) The Vehicle type key - see the complete list of Vehicle Types
  • functions - (array) List of Vehicle Function keys this Vehicle provides - see the complete list of Vehicle Functions
  • make - (string) The make of the Vehicle
  • year - (number) The year of the Vehicle
  • licence_plate - (string) The licence plate of the Vehicle
  • vehicle_licence - (string) The Vehicle licence of the Vehicle
  • vehicle_extra_info - (string) Extra informationa about the Vehicle
  • passengers_max - (number) The maximum number of passengers this Vehicle is capable of transporting
  • load_m3 - (number) The capacity (in metres cubed) of the Vehicle
  • image_url - (string) URL of a picture of the vehicle

Driver details

  • driver_name - (string) The driver’s name
  • driver_email - (string) The driver’s email address
  • driver_phone_number - (string) The driver’s phone number
  • driver_licence - (string) The driver’s licence number
  • driver_extra_info - (string) Extra information about the driver

Owner details

  • owner_name - (string) The owner’s name
  • owner_email - (string) The owner’s email address
  • owner_phone_number - (string) The owner’s phone number
  • owner_licence - (string) The owner’s licence
  • owner_extra_info - (string) Extra information about the owner

Costs and pricing

  • price_per_km - (number) The price per kilometre of the Vehicle
  • price_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 Vehicle
  • price_per_minute_currency - (string) The currency of the price per minute of the Vehicle
  • extra_price_airport - (number) The price of airport visits
  • extra_price_airport_currency - (string) The currency of the price of airport visits
  • extra_price_parking - (number) The price for parking
  • extra_price_parking_currency - (string) The currency of the price for parking

See also