Book a Trip

You can book a trip by using a Quote ID received from a recent /v2/quotes/{id} request. To do this you will need to provide:

  • A valid Quote Id. Note that quotes have a validity period after which they expire. If you try to book a trip using an expired Quote Id, you will receive a HTTP Status Code of 400 and the error message {'Could not book trip (attempt to book an expired quote).'}

  • Passenger Details. First name, last name and phone number are mandatory.

  • If the location of the pickup or dropoff is an airport, a flight number is required so that the driver can monitor flight delays (e.g. 'BA1326').

You may optionally provide:

  • The number of additional passengers (excluding the named rider) and total number of suitcases. The defaults for these values are 0.

  • A Trip ID provided by the demand partner as a reference.

  • Comments provided by the rider/ person booking. These may be useful for revendenvous instructions.

  • A Cost Center Reference to be used by the booker.

A successful request will return a Karhoo generated Booking ID (e.g. 'b6a5f9dc-9066-4252-9013-be85dfa563bc'). This ID can be used to administer the booking using the other endpoints in this API. Such as canceling the booking, checking its status and tracking the actual trip. If the trip is booked by user with UNAUTHENTICATED_TRIP_ADMIN role the response will contain non-empty follow_code field. This code can be used to follow trip progress without any authorization. It should be delivered to end-user and must not be shared with third party persons or systems. follow_code has critical value because trip can be changed or cancelled using the code without authorization, so it's generated only once for a trip and can not be retrieved within any other endpoints such as "Get Booking Details".

Body Params

request body

meta
object

Any key value pairs to be associated with a booking

string | null

The ID of the quote that should be used for pricing this Booking. This ID is obtained from the Quote Item List returned by the /v2/quotes/{id} API.

string

The ID of the service that should be used for pricing this Booking. This ID is obtained from the Service Item List returned by the /services/ API. If service_id is present in the booking request it takes a priority over the quote_id.

passengers
object
required
string
length ≤ 128

Trip ID provided by the demand partner.

string
length ≤ 512

Free form comments provided by the rider / person booking.

string
length ≤ 8

Flight number of passenger

string
length ≤ 15

Train number

string
length ≤ 35

Optional cost center reference to be used by the booker.

string

Train time

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*