{"openapi":"3.0.0","x-samples-languages":["curl","javascript","node","java","kotlin","python","php","go","swift"],"info":{"version":"v1.0","title":"Bookings API 1.0","x-hugo-values":{"tags":["api"],"categories":["Bookings"],"public":true,"weight":80}},"paths":{"/":{"post":{"tags":["Bookings"],"summary":"Book a Trip","description":"You can book a trip by using a Quote ID received from a recent [/v2/quotes/_{id}_](/get_id-1#retrieve-quote-list) request. To do this you will need to provide:\n\n  * 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).'}`\n\n  * Passenger Details. First name, last name and phone number are mandatory.\n\n  * 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').\n\nYou may optionally provide:\n\n  * The number of additional passengers (excluding the named rider) and total number of suitcases. The defaults for these values are 0.\n\n  * A Trip ID provided by the demand partner as a reference.\n\n  * Comments provided by the rider/ person booking. These may be useful for revendenvous instructions.\n\n  * A Cost Center Reference to be used by the booker.\n\nA 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\".\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingRequest"}}},"description":"request body","required":true},"responses":{"201":{"description":"Booking created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"409":{"$ref":"#/components/responses/409Conflict"},"412":{"$ref":"#/components/responses/QuotedPriceIncreased"},"424":{"$ref":"#/components/responses/424FailedDependency"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/with-nonce":{"post":{"tags":["Bookings"],"summary":"Book a Trip only if the preauthorisation of the payment_nonce is successful","description":"This endpoint is similar to `/v1/bookings/` but it includes an extra `payment_nonce` parameter. You only need to use this endpoint if you were instructed by Karhoo to do so.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingRequestPaymentNonce"}}},"description":"request body","required":true},"responses":{"201":{"description":"Booking created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"402":{"$ref":"#/components/responses/402PaymentRequired"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"409":{"$ref":"#/components/responses/409Conflict"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/{id}":{"get":{"tags":["Bookings"],"summary":"Get Booking Details","description":"Get details and status of an existing Booking using the Booking ID obtained from the [/bookings](/v1/bookings/#book-a-trip) endpoint.\nPlease note that the `follow_code` field is empty for security reasons.","parameters":[{"name":"id","in":"path","required":true,"description":"Booking ID","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"responses":{"200":{"description":"Booking details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"402":{"$ref":"#/components/responses/402PaymentRequired"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]},"patch":{"tags":["Bookings"],"summary":"Amend a Booking","description":"Update a subset of booking details for an existing trip.","parameters":[{"name":"id","in":"path","required":true,"description":"Booking ID","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingAmendmentRequest"}}},"description":"Trip properties to amend","required":true},"responses":{"200":{"description":"Booking amendment accepted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"402":{"$ref":"#/components/responses/402PaymentRequired"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"424":{"$ref":"#/components/responses/424FailedDependency"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/{id}/cancel":{"post":{"tags":["Bookings"],"summary":"Cancel a Booking","description":"Cancel an existing booking using the Booking ID.","parameters":[{"name":"id","in":"path","required":true,"description":"The Booking ID","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCancellation"}}},"description":"The reason for cancelling the trip","required":true},"responses":{"204":{"description":"Booking has been successfully cancelled"},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"409":{"$ref":"#/components/responses/409Conflict"},"424":{"$ref":"#/components/responses/424FailedDependency"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/{id}/cancel-fee":{"get":{"tags":["Bookings"],"summary":"Retrieve the estimated cancellation fee","description":"This endpoint returns the estimated cancellation fee for the booking.\nIf the cancellation is free at the moment of making the call, the\n\"cancellation_fee\" field will be false. Otherwise the response will\ncontain the estimated cancellation amount if its available.\n","parameters":[{"name":"id","in":"path","required":true,"description":"The Booking ID","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"responses":{"200":{"description":"The estimated cancellation fee","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationFee"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"409":{"$ref":"#/components/responses/409Conflict"},"422":{"$ref":"#/components/responses/422UnprocessableEntity"},"424":{"$ref":"#/components/responses/424FailedDependency"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/{id}/history":{"get":{"tags":["Bookings"],"summary":"Get Booking History","description":"Get the history of a booking (all records relating to a single booking) using the Booking ID.\nPlease note that the `follow_code` fields are empty for security reasons.","parameters":[{"name":"id","in":"path","required":true,"description":"The Booking ID","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"responses":{"200":{"description":"Booking history retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingHistoryResponse"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/{id}/status":{"get":{"tags":["Bookings"],"summary":"Get Booking Status","description":"Get the status of a Booking -- i.e. the last status update received by the system.","parameters":[{"name":"id","in":"path","required":true,"description":"The Booking ID","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"responses":{"200":{"description":"Booking status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingStatus"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/{id}/track":{"get":{"tags":["Bookings"],"summary":"Get Position of a Trip","description":"Get the position of the vehicle during the course of a booking. This could be the location of the vehicle whilst the driver is on route to pickup the passenger or the location of the vehicle whilst the passenger is on board.\n","parameters":[{"name":"id","in":"path","required":true,"description":"The ID of the Booking","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"responses":{"200":{"description":"Latest position retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingInfo"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/search":{"post":{"tags":["Bookings"],"summary":"Search Booking History","description":"Search your booking history filtering the results by the specific criteria.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"description":"request body","required":true},"responses":{"200":{"description":"The search results are returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/organisations/{id}":{"get":{"tags":["Bookings"],"summary":"Get Trips for an Organisation","description":"Get all trips for the organisation which corresponds to the provided Organisation ID.\nThe number of trips for an organisation may be more than can fit into a single response. If this is the case you will need to paginate the full set of results using multiple requests. Refer to **Pagination**.\nPlease note that the `follow_code` fields are empty for security reasons.","parameters":[{"in":"query","name":"pagination_offset","description":"Record number to start from. The results will be sorted in reverse chronological order.","required":true,"schema":{"type":"number"}},{"in":"query","name":"pagination_row_count","description":"Number or records to return in one go. Large requests have a greater chance of timing out. The default and maximum value is set to 50.","required":true,"schema":{"type":"number"}},{"name":"id","in":"path","required":true,"description":"The Organisation ID","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"responses":{"200":{"description":"The history of trips for this organisation is returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsList"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/fleets/{id}":{"get":{"tags":["Bookings"],"summary":"Get Trips for a Fleet","description":"Get all trips for the fleet which corresponds to the entered Fleet ID.\nPlease note that the `follow_code` fields are empty for security reasons.","parameters":[{"in":"query","name":"pagination_offset","description":"Record number to start from. The results will be sorted in reverse chronological order.","required":true,"schema":{"type":"number"}},{"in":"query","name":"pagination_row_count","description":"Number or records to return in one go. Large requests have a greater chance of timing out. The default and maximum value is set to 50.","required":true,"schema":{"type":"number"}},{"name":"id","in":"path","required":true,"description":"The ID of the Fleet","example":"385468a9-98fb-4267-a6c8-e324dee13714","schema":{"type":"string"}}],"responses":{"200":{"description":"The history of trips for this fleet is returned successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsList"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}},"security":[{"Bearer":[]}]}},"/follow/{code}":{"get":{"tags":["Bookings"],"summary":"Follow a Booking","description":"This returns minimal booking information required for the passenger to access without being logged in. For security reasons, this endpoint will return 404 after the trip completes or the driver cancels.","parameters":[{"name":"code","in":"path","required":true,"description":"The follow code of the Booking","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"responses":{"200":{"description":"Booking follow information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingFollowResponse"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}}}},"/follow/{code}/cancel":{"post":{"tags":["Bookings"],"summary":"Cancel a Booking given a follow link","description":"Allows to cancel a trip with a follow code.","parameters":[{"name":"code","in":"path","required":true,"description":"The follow code of the Booking","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCancellation"}}},"description":"The reason for cancelling the trip"},"responses":{"204":{"description":"Booking has been successfully cancelled"},"400":{"$ref":"#/components/responses/400InvalidInput"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"409":{"$ref":"#/components/responses/409Conflict"},"424":{"$ref":"#/components/responses/424FailedDependency"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}}}},"/follow/{code}/cancel-fee":{"get":{"tags":["Bookings"],"summary":"Get cancellation fee for a Booking given a follow code","description":"Informs of any fees before cancellation with a follow code.\nThis endpoint returns the estimated cancellation fee for the booking.\nIf the cancellation is free at the moment of making the call, the\n\"cancellation_fee\" field will be false. Otherwise the response will\ncontain the estimated cancellation amount if its available.\n","parameters":[{"name":"code","in":"path","required":true,"description":"The follow code of the Booking","example":"z5djzf98rfwms2o2erdlsjfxe","schema":{"type":"string"}}],"responses":{"200":{"description":"The estimated cancellation fee","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationFee"}}}},"400":{"$ref":"#/components/responses/400InvalidInput"},"404":{"$ref":"#/components/responses/404NotFound"},"409":{"$ref":"#/components/responses/409Conflict"},"422":{"$ref":"#/components/responses/422UnprocessableEntity"},"424":{"$ref":"#/components/responses/424FailedDependency"},"429":{"$ref":"#/components/responses/429RateLimit"},"500":{"$ref":"#/components/responses/500InternalServerErr"},"502":{"$ref":"#/components/responses/502BadGateway"}}}},"/healthcheck":{"get":{"tags":["Healthcheck"],"summary":"Check Services","description":"This allows you to monitor the health and performance of the Auth API.","responses":{"204":{"description":"Success response, no content. Service is ok"}}}}},"servers":[{"url":"https://rest.sandbox.karhoo.com/v1/bookings"}],"components":{"responses":{"QuotedPriceIncreased":{"description":"Quoted price has increased during a booking","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Error number"},"message":{"type":"string","example":"Quoted price has increased by 5 pounds","description":"Details of the error"}}}}}},"400InvalidInput":{"description":"Bad Request. The request was invalid.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K0002","description":"Error number"},"message":{"type":"string","example":"Invalid request payload","description":"Details of the error"}}}}}},"401Unauthorized":{"description":"Unauthorized. The request requires user authentication (not logged in).","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K6001","description":"Error number"},"message":{"type":"string","example":"Could not authenticate","description":"Details of the error"}}}}}},"402PaymentRequired":{"description":"Payment required. The request needs to submit a valid credit card.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K4006","description":"Error number"},"message":{"type":"string","example":"Could not book trip (payment pre-authorisation failed)","description":"Details of the error"}}}}}},"403Forbidden":{"description":"Forbidden. The credentials provided do not have sufficient authority for this request. Please request access by emailing [API Support](api@karhoo.com?subject=API%20Access%20Request).","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K0005","description":"Error number"},"message":{"type":"string","example":"Missing required role for this request","description":"Details of the error"}}}}}},"404NotFound":{"description":"Not found.  Booking not found, or following information is not available anymore.","content":{"*/*":{"schema":{"type":"object","description":"Details of the error that occurred whilst processing the request","required":["code","message"],"properties":{"code":{"type":"string","description":"Internally generated code for this error","example":"K4003"},"message":{"type":"string","description":"Details of the actual error","example":"Could not book trip (could not find specified quote)"}}}}}},"409Conflict":{"description":"Conflict. The resource is already in use or has been changed","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K0007","description":"Error number"},"message":{"type":"string","example":"The quote is already in use","description":"Details of the error"}}}}}},"422UnprocessableEntity":{"description":"The request was understood and correct but we are unable to process the contained instructions","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K4024","description":"Error number"},"message":{"type":"string","example":"Booking already completed","description":"Details of the error"}}}}}},"424FailedDependency":{"description":"Failed Dependency. The method could not be performed on the resource because the requested action depended on another action and that action failed.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K4020","description":"Error number"},"message":{"type":"string","example":"Could not book trip with the selected DMS","description":"Details of the error"}}}}}},"429RateLimit":{"description":"Error. Too Many Requests. Exceeded the rate limit for requests.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K0006","description":"Error number"},"message":{"type":"string","example":"Rate limit exceeded","description":"Details of the error"}}}}}},"500InternalServerErr":{"description":"Internal server error. Something has gone wrong on the website's server, but the server could not be more specific on what the exact problem is.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K0001","description":"Error number"},"message":{"type":"string","example":"General request error","description":"Details of the error"}}}}}},"502BadGateway":{"description":"Bad Gateway. The server, which was acting as a gateway or proxy, received an invalid response from the upstream server.","content":{"*/*":{"schema":{"type":"object","properties":{"code":{"type":"string","example":"K0000","description":"Error number"},"message":{"type":"string","example":"Bad Gateway error","description":"Details of the error"}}}}}}},"securitySchemes":{"Bearer":{"description":"To access all endpoints in this API a valid Bearer Token must be passed in the 'Authorization' header.\nA Bearer Token is generated by the /v1/auth/token API.\n<br>The following syntax must be used in the 'Authorization' header :\n`Bearer: xxxxxx.yyyyyyy.zzzzzz`","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Address":{"type":"object","description":"Specifies a geographic location","required":["display_address","place_id"],"properties":{"display_address":{"type":"string","description":"A description of the location of a person or organization, used by the driver as directions for pickup.","example":"2 Eastborne Terrace"},"position":{"$ref":"#/components/schemas/LatLong"},"place_id":{"maxLength":255,"pattern":"^[a-zA-Z0-9-_]*$","type":"string","description":"Unique place ID associated with the given address.","example":"EhpCcm93bmVsbCBTdCwgU2hlZmZpZWxkLCBVSw"},"poi_type":{"$ref":"#/components/schemas/POIType"},"timezone":{"type":"string","description":"Timezone of the address","example":"london/europe"}}},"Agent":{"type":"object","description":"Details of the agent associated with the booking","properties":{"user_id":{"type":"string","description":"User identifier"},"user_name":{"type":"string","description":"User name"},"organisation_id":{"type":"string","description":"Organisation identifier"},"organisation_name":{"type":"string","description":"Organisation name"}}},"Booking":{"type":"object","required":["id","status","origin","destination","quote","meeting_point"],"properties":{"id":{"type":"string","description":"The Karhoo generated Booking ID","example":"b6a5f9dc-9066-4252-9013-be85dfa563bc"},"passengers":{"$ref":"#/components/schemas/Passengers"},"partner_traveller_id":{"type":"string","example":"XiC6Bl2iFQhGWs6PsN7b","description":"In case you are using an OAuth integration to allow your users to book trips with Karhoo, we will record the id of your user as it appears in your system in this field. This allows you to conveniently search bookings using your own id for a specific user. The value of the <i>partner_traveller_id</i> field is automatically populated based on the user token obtained in the OAuth flow so it is secure. It can be also populated explicitly during booking by passing your ID inside the <i>partner_traveller_id</i> field."},"status":{"$ref":"#/components/schemas/State"},"state_details":{"$ref":"#/components/schemas/StateDetails"},"origin":{"$ref":"#/components/schemas/Address"},"destination":{"$ref":"#/components/schemas/Address"},"date_scheduled":{"type":"string","description":"Date and time the trip is scheduled for, YYYY-MM-DDTHH:MM format.\n\nPlease note that this is UTC time. If you want the local time you will need to convert it to the timezone of the pickup point.\n","example":"2024-04-26T13:46:28.223Z"},"quote":{"$ref":"#/components/schemas/Quote"},"fare":{"$ref":"#/components/schemas/Fare"},"external_trip_id":{"type":"string","description":"External trip-id (from the fleet)."},"display_trip_id":{"type":"string","description":"Identifier to display to customer to be used in receipt or to communicate to Customer Support.","example":"A5TH-R27D"},"fleet_info":{"$ref":"#/components/schemas/FleetInfo"},"vehicle":{"$ref":"#/components/schemas/Vehicle"},"partner_trip_id":{"type":"string","maxLength":128,"description":"Trip ID provided by the demand partner","example":"9975d6f2-75e0-463a-85f8-d6b17d2b0143"},"comments":{"type":"string","description":"comment to the driver or fleet","example":"They are waiting by the green door at Fake Street 2a"},"flight_number":{"type":"string","description":"Flight number of passenger if provided","example":"BA1326"},"train_number":{"type":"string","description":"Train number","example":"1326-32"},"date_booked":{"type":"string","description":"Date and time the booking was made, in YYYY-MM-DDTHH:MM format.\nPlease note that this is UTC time. If you want the local time you will need to convert it to the timezone of the pickup point.\n"},"meeting_point":{"$ref":"#/components/schemas/MeetingPoint"},"agent":{"$ref":"#/components/schemas/Agent"},"cost_center_reference":{"type":"string","description":"Optional cost center reference to be used by the booker","example":"EMEA-sales"},"cancelled_by":{"$ref":"#/components/schemas/User"},"follow_code":{"type":"string","description":"The code that can be used to follow the trip. This field is populated only when user has role UNAUTHENTICATED_TRIP_ADMIN and books a trip via [/bookings](/v1/bookings/#book-a-trip) or [/bookings/with-nonce](/v1/bookings/with-nonce/#book-a-trip-with-nonce), otherwise it's empty."},"meta":{"$ref":"#/components/schemas/BookingMeta"},"train_time":{"type":"string","description":"Train time","example":"2024-04-26T13:46:28.223Z"},"service_level_agreements":{"$ref":"#/components/schemas/SLASummary"}}},"CancellationFee":{"type":"object","required":["cancellation_fee"],"properties":{"cancellation_fee":{"type":"boolean"},"fee":{"$ref":"#/components/schemas/Fee"}}},"Fee":{"type":"object","required":["type","currency"],"properties":{"currency":{"type":"string"},"type":{"type":"string","enum":["FIXED","METERED"]},"value":{"type":"number","format":"int32","example":1150,"description":"Estimated cancellation fee in the base value of the currency, ie. penny, cents"}}},"BookingAmendmentRequest":{"type":"object","properties":{"comments":{"type":"string","maxLength":512,"description":"Free form comments provided by the rider / person booking.","example":"Please let reception know you are there. Will wait in lobby"},"flight_number":{"type":"string","maxLength":8,"description":"Flight number of passenger","example":"BA1326","pattern":"^[a-zA-Z\\d\\-\\s]{1,8}$"},"train_number":{"type":"string","description":"Train number","maxLength":15,"example":"1326-32"},"passengers":{"$ref":"#/components/schemas/AmendPassengers"}}},"BookingCancellation":{"type":"object","required":["reason"],"properties":{"reason":{"$ref":"#/components/schemas/CancellationReason"},"explanation":{"type":"string","description":"Optional explanation whenever the user cancellation reason is set to OTHER","example":"The car was too dirty"}}},"BookingFollowResponse":{"type":"object","description":"Contains the status of the Booking and vehicle information","required":["status"],"properties":{"origin":{"$ref":"#/components/schemas/Address"},"destination":{"$ref":"#/components/schemas/Address"},"date_booked":{"type":"string","description":"Date and time the booking was made, in YYYY-MM-DDTHH:MM format.\nPlease note that this is UTC time.\nIf you want the local time you will need to translate it using the\ntimezone of the pickup point.\n"},"date_scheduled":{"type":"string","description":"Date and time the trip is scheduled for, YYYY-MM-DDTHH:MM format.\nPlease note that this is UTC time.\nIf you want the local time you will need to translate it using the\ntimezone of the pickup point.\n","example":"2024-04-26T13:46:28.223Z"},"status":{"$ref":"#/components/schemas/State"},"state_details":{"$ref":"#/components/schemas/StateDetails"},"vehicle":{"$ref":"#/components/schemas/Vehicle"},"tracking":{"$ref":"#/components/schemas/TrackingInfo"},"fleet_info":{"$ref":"#/components/schemas/FleetInfo"},"train_number":{"type":"string"},"trip_id":{"type":"string"},"display_trip_id":{"type":"string","example":"A5TH-R27D"},"passengers":{"$ref":"#/components/schemas/Passengers"},"quote":{"$ref":"#/components/schemas/Quote"},"meeting_point":{"$ref":"#/components/schemas/MeetingPoint"},"meta":{"$ref":"#/components/schemas/BookingMeta"},"train_time":{"type":"string","description":"Train time","example":"2024-04-26T13:46:28.223Z"},"flight_number":{"type":"string","description":"Flight number","example":"AC-8002"},"service_level_agreements":{"$ref":"#/components/schemas/SLASummary"}}},"BookingHistoryEntry":{"description":"One entry in the history of a booking","type":"object","required":["state","timestamp"],"properties":{"state":{"$ref":"#/components/schemas/Booking"},"timestamp":{"type":"string","format":"date-time"},"position":{"$ref":"#/components/schemas/LatLong"}}},"BookingHistoryResponse":{"description":"The entire history of a booking, made up of history entries","type":"object","required":["history_items"],"properties":{"history_items":{"description":"A list of booking history entries","type":"array","items":{"$ref":"#/components/schemas/BookingHistoryEntry"}}}},"BookingMeta":{"type":"object","description":"Any key value pairs to be associated with a booking","additionalProperties":{"type":"string"}},"BookingRequest":{"type":"object","required":["passengers"],"properties":{"meta":{"$ref":"#/components/schemas/BookingMeta"},"quote_id":{"type":"string","description":"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}_](/get_id-1#retrieve-quote-list) API.","example":"9361d590-7472-11e8-82da-0a580a2c041d:NDgyOWY0MjctZmI4MC00OWQxLWFlZDUtY2U5ZmFiNGI1MjM1O3RheGk=","nullable":true},"service_id":{"type":"string","description":"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/](/v1/services/#retrieve-service-list) API. If service_id is present in the booking request it takes a priority over the quote_id.","example":"9361d590-7472-11e8-82da-0a580a2c041d:mpv_taxi"},"passengers":{"$ref":"#/components/schemas/Passengers"},"partner_trip_id":{"type":"string","maxLength":128,"description":"Trip ID provided by the demand partner.","example":"9975d6f2-75e0-463a-85f8-d6b17d2b0143"},"comments":{"type":"string","maxLength":512,"description":"Free form comments provided by the rider / person booking.","example":"Please let reception know you are there. Will wait in lobby"},"flight_number":{"type":"string","maxLength":8,"description":"Flight number of passenger","example":"BA1326","pattern":"^[a-zA-Z\\d\\-\\s]{1,20}$"},"train_number":{"type":"string","description":"Train number","maxLength":15,"example":"1326-32"},"cost_center_reference":{"type":"string","maxLength":35,"description":"Optional cost center reference to be used by the booker.","example":"EMEA-sales"},"train_time":{"type":"string","description":"Train time","example":"2018-01-02T15:04:00Z","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$"}}},"BookingRequestPaymentNonce":{"type":"object","required":["passengers","payment_nonce"],"properties":{"meta":{"$ref":"#/components/schemas/BookingMeta"},"quote_id":{"type":"string","description":"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}_](/get_id-1#retrieve-quote-list) API.","example":"9361d590-7472-11e8-82da-0a580a2c041d:NDgyOWY0MjctZmI4MC00OWQxLWFlZDUtY2U5ZmFiNGI1MjM1O3RheGk=","nullable":true},"service_id":{"type":"string","description":"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/](/v2/services/#retrieve-service-list) API. If service_id is present in the booking request it takes a priority over the quote_id.","example":"9361d590-7472-11e8-82da-0a580a2c041d:mpv_taxi"},"passengers":{"$ref":"#/components/schemas/Passengers"},"partner_trip_id":{"type":"string","maxLength":128,"description":"Trip ID provided by the demand partner.","example":"9975d6f2-75e0-463a-85f8-d6b17d2b0143"},"comments":{"type":"string","maxLength":512,"description":"Free form comments provided by the rider / person booking.","example":"Please let reception know you are there. Will wait in lobby"},"flight_number":{"type":"string","maxLength":8,"description":"Flight number of passenger","example":"BA1326","pattern":"^[a-zA-Z\\d\\-\\s]{1,20}$"},"train_number":{"type":"string","description":"Train number","maxLength":15,"example":"1326-32"},"cost_center_reference":{"type":"string","maxLength":35,"description":"Optional cost center reference to be used by the booker.","example":"EMEA-sales"},"payment_nonce":{"type":"string","description":"The nonce associated to the payment method that will be used to charge the passenger's credit card. Most integrations should ignore this parameter unless explicitly instructed by Karhoo on how to use it.","example":"078a0eb8-e857-11e8-9f32-f2801f1b9fd1"},"train_time":{"type":"string","description":"Train time","example":"2018-01-02T15:04:00Z","pattern":"^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$"},"loyalty_nonce":{"type":"string","description":"Loyalty nonce identifies a loyalty pre-authorisation, previously made by the passenger.","example":"b37fd38e-76e1-416a-a3kb-i81e80289l82"}}},"BookingStatus":{"type":"object","description":"Contains the status of the Booking and, if the vehicle is enroute to either the pickup or dropoff locations the location of it.","required":["status"],"properties":{"status":{"$ref":"#/components/schemas/State"},"position":{"$ref":"#/components/schemas/LatLong"},"timestamp":{"type":"string","format":"date-time"}}},"BookingsList":{"type":"object","properties":{"bookings":{"description":"A list of bookings","type":"array","items":{"$ref":"#/components/schemas/Booking"}}}},"CancellationReason":{"type":"string","description":"The status of the Trip Request\n<ul>\n  <li>OTHER_USER_REASON</li>\n  <li>DRIVER_DIDNT_SHOW_UP</li>\n  <li>ETA_TOO_LONG</li>\n  <li>DRIVER_IS_LATE</li>\n  <li>CAN_NOT_FIND_VEHICLE</li>\n  <li>NOT_NEEDED_ANYMORE</li>\n  <li>ASKED_BY_DRIVER_TO_CANCEL</li>\n  <li>FOUND_BETTER_PRICE</li>\n  <li>NOT_CLEAR_MEETING_INSTRUCTIONS</li>\n  <li>COULD_NOT_CONTACT_CARRIER</li>\n</ul>\n","enum":["OTHER_USER_REASON","DRIVER_DIDNT_SHOW_UP","ETA_TOO_LONG","DRIVER_IS_LATE","CAN_NOT_FIND_VEHICLE","NOT_NEEDED_ANYMORE","ASKED_BY_DRIVER_TO_CANCEL","FOUND_BETTER_PRICE","NOT_CLEAR_MEETING_INSTRUCTIONS","COULD_NOT_CONTACT_CARRIER"],"example":"ETA_TOO_LONG"},"Direction":{"type":"object","required":["kph","heading"],"properties":{"kph":{"type":"number","format":"int32","description":"Vehicle speed (units?)","example":30},"heading":{"type":"number","format":"int32","description":"Vehicle direction (compass degrees)","example":180}}},"Driver":{"type":"object","description":"Details of the vehicle's driver","required":["first_name","last_name","phone_number"],"properties":{"first_name":{"type":"string","description":"Driver's first name","example":"Michael"},"last_name":{"type":"string","description":"Driver's last name","example":"Higgins"},"phone_number":{"type":"string","description":"Driver's contact phone number","example":"+441111111111"},"photo_url":{"type":"string","description":"URL to retrieve driver's photo","example":"https://karhoo.com/drivers/mydriver.png"},"license_number":{"type":"string","description":"Driver's licence number","example":"ZXZ151YTY"}}},"Error":{"type":"object","description":"Details of the error that occurred whilst processing the request","required":["code","message"],"properties":{"code":{"type":"string","description":"Internally generated code for this error"},"message":{"type":"string","description":"Details of the actual error"}}},"Fare":{"type":"object","description":"Contains the breakdown of the actual fare for the booking. Fare object will be DEPRECATED soon. You should use Fares API instead.","required":["total","currency"],"properties":{"total":{"type":"number","format":"int32","example":3550,"description":"The total amount in the base value of the currency, ie. penny, cents"},"currency":{"type":"string","description":"3-letter currency code defined in ISO 4217","example":"GBP"},"gratuity_percent":{"type":"number","format":"int32","example":15,"description":"Percentage of total fare that is the gratuity"},"breakdown":{"type":"array","items":{"$ref":"#/components/schemas/FareComponent"}}}},"FareComponent":{"type":"object","description":"Details of a particular component of the fare","required":["value","name"],"properties":{"value":{"type":"number","format":"int32","description":"Fare component amount in the base value of the currency, ie. penny, cents","example":1030},"name":{"type":"string","description":"Name of the fare component","example":"Basic amount"},"description":{"type":"string","description":"Description of the component","example":"Basic amount before any taxes or extras"}}},"FleetInfo":{"type":"object","properties":{"fleet_id":{"type":"string","description":"The ID of the fleet"},"name":{"type":"string","description":"The name of the fleet"},"logo_url":{"type":"string","description":"URL to get the fleet logo from"},"description":{"type":"string","description":"Description of the fleet"},"phone_number":{"type":"string","description":"The fleet's phone-number"},"terms_conditions_url":{"type":"string","description":"URL to get the fleet terms-and-conditions from"},"email":{"type":"string","example":"dispatch-co@karhoo.com","description":"Fleets's email address"}}},"LatLong":{"type":"object","description":"Specifies a geographic location in terms of its Latitude and Longitude coordinates.","required":["latitude","longitude"],"properties":{"latitude":{"type":"number","format":"float","description":"The latitude in degrees. It must be in the range [-90.0, +90.0]","example":51.5086692},"longitude":{"format":"float","type":"number","description":"The longitude in degrees. It must be in the range [-180.0, +180.0]","example":-0.1375291}}},"Luggage":{"type":"object","required":["total"],"properties":{"total":{"type":"number","format":"int32","description":"The total number of suitcases for a booking."}}},"MeetingPoint":{"type":"object","description":"Specifies a position to meet a taxi","required":["position","type"],"properties":{"position":{"$ref":"#/components/schemas/LatLong"},"type":{"$ref":"#/components/schemas/MeetingPointType"},"instructions":{"description":"The meeting point instructions","type":"string"},"note":{"description":"[DEPRECATED] Note","type":"string"}}},"MeetingPointType":{"type":"string","description":"If being picked up at an Airport, the pickup type:\n<ul>\n  <li>NOT_SET: Ignore the MeetingPoint object. No Meeting Point for the specified location</li>\n  <li>DEFAULT: Standard driver behavior for pickup or dropoff</li>\n  <li>PICK_UP: This is a special pick up point for this location</li>\n  <li>DROP_OFF: This is a special dropoff up point for this location</li>\n  <li>MEET_AND_GREET: Usually when the driver will meet the passenger with a greeting sign</li>\n  <li>CURB_SIDE: The driver will wait curbside at a designated pickup point</li>\n  <li>STAND_BY: The passenger must call when they are ready. Usually with their luggage when an airport</li>\n</ul>\n","enum":["NOT_SET","DEFAULT","PICK_UP","DROP_OFF","MEET_AND_GREET","CURB_SIDE","STAND_BY"]},"POIType":{"type":"string","description":"A \"Point of Interest\" (POI) is a location on the map where there are restrictions to where a driver can pick up a passenger. The type of Point of Interest:\n<ul>\n  <li>NOT_SET_POI_TYPE: Not specified</li>\n  <li>ENRICHED: Standard Karhoo POI Type that usually defines CURB_SIDE, MEET_AND_GREET or STAND_BY meeting points</li>\n  <li>REGULATED: POI usually defining restricted PICK_UP and DROP_OFF meeting points</li>\n  <li>NEAREST: POI usually defining recommended PICK_UP and DROP_OFF meeting points</li>\n</ul>\n","enum":["NOT_SET_POI_TYPE","ENRICHED","REGULATED","NEAREST"]},"PassengerInformation":{"type":"object","required":["last_name","phone_number"],"properties":{"first_name":{"type":"string","maxLength":70,"pattern":"^[^!@#$%^&*~()_+=\\|/<>]+$","description":"Passenger's first name","example":"John"},"last_name":{"type":"string","maxLength":70,"pattern":"^[^!@#$%^&*~()_+=\\|/<>]+$","description":"Passenger's last name","example":"Smith"},"email":{"type":"string","format":"email","example":"john.smith@karhoo.com","description":"Passenger's email address"},"phone_number":{"type":"string","example":"+4412345678","description":"The passenger's contact phone number"},"locale":{"type":"string","example":"en_GB","maxLength":10,"description":"Passenger's preferred locale for communication"},"partner_traveller_id":{"type":"string","description":"Passenger identifier provided by demand partner.","example":"16736808-e032-4eeb-8c34-5d521c3b540b"}}},"Passengers":{"type":"object","required":["passenger_details"],"properties":{"additional_passengers":{"type":"number","format":"int32","description":"Number of additional passengers, not including the first named passenger.","example":0},"passenger_details":{"description":"There should be details of at least one Passenger provided in this array","type":"array","items":{"$ref":"#/components/schemas/PassengerInformation"}},"luggage":{"$ref":"#/components/schemas/Luggage"}}},"AmendPassengers":{"type":"object","properties":{"passenger_details":{"description":"There should be details of at least one Passenger provided in this array","type":"array","items":{"$ref":"#/components/schemas/AmendPassengerInformation"}}}},"AmendPassengerInformation":{"type":"object","properties":{"first_name":{"type":"string","maxLength":70,"pattern":"^[^!@#$%^&*~()_+=\\|/<>]+$","description":"Passenger's first name","example":"John"},"last_name":{"type":"string","maxLength":70,"pattern":"^[^!@#$%^&*~()_+=\\|/<>]+$","description":"Passenger's last name","example":"Smith"},"phone_number":{"type":"string","example":"+4412345678","description":"The passenger's contact phone number"},"locale":{"type":"string","example":"en_GB","maxLength":10,"description":"Passenger's preferred locale for communication"}}},"Quote":{"type":"object","description":"Contains the breakdown of either the quoted fare for the booking.","required":["total","currency"],"properties":{"type":{"$ref":"#/components/schemas/QuoteType"},"total":{"type":"number","format":"int32","example":3550,"description":"[DEPRECATED] The total amount in the base value of the currency, ie. penny, cents"},"currency":{"type":"string","description":"3-letter currency code defined in ISO 4217","example":"GBP"},"gratuity_percent":{"type":"number","format":"int32","example":15,"description":"Percentage of total quote that is the gratuity"},"breakdown":{"type":"array","description":"[DEPRECATED]","items":{"$ref":"#/components/schemas/FareComponent"}},"vehicle_class":{"type":"string","description":"The requested vehicle category from the quote. This is historical in nature and will not change.\nRefer to the VEHICLE object for current vehicle class.\n","example":"Saloon"},"qta_high_minutes":{"type":"number","format":"int32","example":8,"description":"The highest estimated time of arrival at the time of booking."},"qta_low_minutes":{"type":"number","format":"int32","example":5,"description":"The lowest estimated time of arrival at the time of booking."},"vehicle_attributes":{"$ref":"#/components/schemas/VehicleAttributes"},"source":{"$ref":"#/components/schemas/QuoteSource"},"high_price":{"type":"number","format":"int32","example":3550,"description":"The high end of the quote amount in the base value of the currency, ie. penny, cents"},"low_price":{"type":"number","format":"int32","example":3050,"description":"The low end of the quote amount in the base value of the currency, ie. penny, cents"}}},"QuoteSource":{"type":"string","description":"The source of the quote\n<ul>\n  <li>FLEET: The quote is provided directly by the fleet</li>\n  <li>MARKET: The quote is computed based on the current market</li>\n</ul>\n","enum":["FLEET","MARKET"],"example":"FLEET"},"QuoteType":{"type":"string","description":"The status of the Trip Request:\n<ul>\n  <li>QUOTE_TYPE_NOT_SET - A null status. Never use this.</li>\n  <li>FIXED - The fare was quoted at a fixed price.</li>\n  <li>METERED - The fare was quoted as metered.</li>\n  <li>ESTIMATED - the fare quoted is an estimate and may change</li>\n</ul>\n","enum":["QUOTE_TYPE_NOT_SET","FIXED","METERED","ESTIMATED"],"example":"FIXED"},"SearchRequest":{"type":"object","properties":{"trip_states":{"type":"array","items":{"$ref":"#/components/schemas/State"}},"trip_type":{"$ref":"#/components/schemas/TripType"},"created_after":{"description":"Search for bookings made after this time in RFC3339 format","type":"string","example":"2024-04-26T13:46:28.224Z","format":"date-time","nullable":true},"email":{"type":"string","format":"email","example":"john.doe@example.com","description":"Passenger's email address"},"partner_traveller_id":{"type":"string","example":"XiC6Bl2iFQhGWs6PsN7b","description":"In case you are using an OAuth integration to allow your users to book trips with Karhoo, we will record the id of your user as it appears in your system in this field. This allows you to conveniently search bookings using your own id for a specific user. The value of the <i>partner_traveller_id</i> field is automatically populated based on the user token obtained in the OAuth flow so it is secure. It can be also populated explicitly during booking by passing your ID inside the <i>partner_traveller_id</i> field."},"prebook_time_after":{"description":"Search for pre-booked trips with a pickup time later than this in RFC3339 format","type":"string","example":"2024-04-26T13:46:28.224Z","format":"date-time","nullable":true},"prebook_time_before":{"description":"Search for pre-booked trips with a pickup time earlier than this in RFC3339 format","type":"string","example":"2024-04-26T13:46:28.224Z","format":"date-time","nullable":true},"trip_time_before":{"description":"Search for trips which happened before given time","type":"string","format":"date-time","nullable":true},"trip_time_after":{"description":"Search for trips which happened after given time","type":"string","format":"date-time","nullable":true},"only_without_final_price":{"description":"Search only for trips that have no final price","type":"boolean"},"pagination_offset":{"description":"How many results to skip (for pagination)","type":"number","format":"int32"},"pagination_row_count":{"description":"How many results to return (for pagination)","type":"number","format":"int32"},"fleet_id":{"description":"The fleet ID","type":"string","example":"a172b836-8c38-4b8f-b101-e0e9db60f093"},"partner_trip_id":{"description":"Trip ID provided by the demand partner","type":"string","example":"9975d6f2-75e0-463a-85f8-d6b17d2b0143"},"external_trip_id":{"description":"External trip ID provided by DMS","type":"string","example":"9975D6F229L8FOG9"},"forename":{"description":"First name of a passenger to search by","type":"string","maxLength":70,"example":"Humphrey"},"lastname":{"description":"Last name of a passenger to search by. A suffix search will be used","type":"string","maxLength":70,"example":"Featherington"},"display_trip_id":{"description":"Trip Display trip ID provided by Karhoo","type":"string","example":"A5TH-R27D"},"order_by":{"description":"Ordering parameters (\"-\" means DESC ordering, without \"-\" ASC, plus ordering param name)\n<ul>\n  <li>id - sorts the trip by TripID</li>\n  <li>date - sorts the trip by date scheduled if it's prebooked trip and by booking time if it's ASAP trip</li>\n  <li>booking_date - sorts the trip by booking time</li>\n  <li>reference - sorts the trip by PartnerTripID</li>\n  <li>name - sorts the trip by passenger first name</li>\n  <li>surname - sorts the trip by passenger last name</li>\n  <li>vehicle - sorts the trip by vehicle class (string value)</li>\n  <li>state - sorts the trip by trip state (string value)</li>\n  <li>fleet - sorts the trip by fleet name</li>\n  <li>origin - sorts the trip by origin location display address</li>\n  <li>destination - sorts the trip by destination location display address</li>\n</ul>\n","type":"array","items":{"type":"string"},"example":"\"-date\" sorts descending by \"date\" field"}}},"SearchResponse":{"type":"object","properties":{"bookings":{"description":"A list of bookings matching your search criteria","type":"array","items":{"$ref":"#/components/schemas/Booking"}}}},"TrackingInfo":{"type":"object","description":"The position of a vehicle serving an in-progress booking.","properties":{"position":{"$ref":"#/components/schemas/LatLong"},"direction":{"$ref":"#/components/schemas/Direction"},"origin_eta":{"type":"number","format":"int32","description":"ETA when the vehicle will arrive at the pickup location"},"destination_eta":{"type":"number","format":"int32","description":"ETA when the vehicle will arrice at the dropoff location"}}},"TripType":{"type":"string","description":"Which type of trip to search for (defaults to \"BOTH\"):\n<ul>\n  <li>BOTH</li>\n  <li>ASAP</li>\n  <li>PREBOOK</li>\n</ul>\n","enum":["BOTH","PREBOOK","ASAP"]},"User":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"id":{"type":"string"},"email":{"type":"string"}}},"Vehicle":{"type":"object","description":"Details of the vehicle that will service this Booking","required":["vehicle_class","vehicle_license_plate","driver"],"properties":{"type":{"type":"string","description":"Represents the physical description of a vehicle. Next to passenger capacity and luggage capacity\ndetails overall capacity transit capabilities.\n<ul>\n<li>moto - a two-wheeled motor vehicle,</li>\n<li>standard - a vehicle with two rows of seats, the front one shared with the driver (also referred to as saloon or sedan),</li>\n<li>mpv - a vehicle designed to transport passengers in the rear seating rows, with reconfigurable seats in two or three rows (multi-purpose vehicle, also referred to as minivan),</li>\n<li>bus - a vehicle designed to carry more people than an MPV (multi-rows), also referred to as minibus or microbus.</li>\n</ul>\n","example":"standard","nullable":true},"tags":{"type":"array","description":"A set of vehicle's attributes. <ul> <li>electric - a fully battery electric vehicle,</li> <li>hybrid - a mixed hybrid combustion vehicle,</li> <li>wheelchair - equipped to handle wheelchairs,</li> <li>child-seat - provides a child seat,</li> <li>taxi - provides a regulated metered fare,</li> <li>executive - describes a premium model of vehicle.</li> </ul> The list might be extended in future.\n","example":["electric"],"items":{"type":"string"}},"vehicle_class":{"type":"string","description":"Vehicle category","example":"MPV"},"description":{"type":"string","description":"Make, model and colour of vehicle","example":"Renault Scenic (Black)"},"vehicle_license_plate":{"type":"string","description":"Vehicle's licence plate value","example":"123 XYZ"},"make":{"type":"string","description":"Vehicle brand","example":"BMW"},"model":{"type":"string","description":"Vehicle model","example":"5-series"},"colour":{"type":"string","description":"Karhoo vehicle color\n  <ul>\n    <li> BLACK </li>\n    <li> BLUE </li>\n    <li> BROWN </li>\n    <li> GOLD </li>\n    <li> GRAY </li>\n    <li> GREEN </li>\n    <li> ORANGE </li>\n    <li> PURPLE </li>\n    <li> RED </li>\n    <li> SILVER </li>\n    <li> TAN </li>\n    <li> WHITE </li>\n    <li> YELLOW </li>\n  </ul><br>\n","enum":["BLACK","BLUE","BROWN","GOLD","GRAY","GREEN","ORANGE","PURPLE","RED","SILVER","TAN","WHITE","YELLOW"],"example":"Black"},"driver":{"$ref":"#/components/schemas/Driver"},"attributes":{"$ref":"#/components/schemas/VehicleAttributes"}}},"VehicleAttributes":{"type":"object","description":"A list of attributes a vehicle can have","properties":{"passenger_capacity":{"type":"number","format":"int32","example":3},"luggage_capacity":{"type":"number","format":"int32","example":2},"hybrid":{"type":"boolean","example":false},"electric":{"type":"boolean","example":true},"child_seat":{"type":"boolean"}}},"State":{"type":"string","description":"The status of the Request:\n<ul>\n  <li><s>REQUESTED</s>: <i>DEPRECATED, Never use this</i> The Request is matching to the most efficient available driver (By Dispatch).</li>\n  <li>CONFIRMED: The Request has been accepted by Dispatch.</li>\n  <li>DRIVER_EN_ROUTE: A driver is \"en route\" to the start location. This state can occur multiple times in case of a driver re-assignment.</li>\n  <li>ARRIVED: The driver has arrived. This state might be skipped in some cases</li>\n  <li>POB: Passenger is in the vehicle and the ride has \"started\".</li>\n  <li>COMPLETED: Passenger has reached their destination.</li>\n  <li>NO_DRIVERS_AVAILABLE: The Request was unfulfilled because no driver was available.</li>\n  <li>DRIVER_CANCELLED:  The Request has been cancelled by the dispatch/ driver</li>\n  <li>BOOKER_CANCELLED: The Request has been cancelled by the rider</li>\n  <li>KARHOO_CANCELLED: The Request has been cancelled by Karhoo</li>\n  <li>FAILED: There was an issue with the booking and Karhoo is investigating it.</li>\n  <li>PREAUTH_DECLINED: There was an issue with payment preauth and Karhoo is investigating it.</li>\n  <li>INCOMPLETE: Trip state is pending, and needs investigation by an Agent to reach its final state.</li>\n</ul>\n","enum":["REQUESTED","COMPLETED","DRIVER_EN_ROUTE","CONFIRMED","ARRIVED","POB","DRIVER_CANCELLED","BOOKER_CANCELLED","NO_DRIVERS_AVAILABLE","KARHOO_CANCELLED","FAILED","PREAUTH_DECLINED","INCOMPLETE"],"example":"CONFIRMED"},"StateDetails":{"type":"string","description":"The state details of the Request:\n<ul>\n  <li>\n    <h4>Dispatch cancellation reasons</h4>\n    <ul>\n      <li>REQUESTED_BY_USER: Dispatch has cancelled the trip by user request.</li>\n      <li>PASSENGER_DIDNT_SHOW_UP: Dispatch has cancelled the trip because user didn't show up.</li>\n      <li>DRIVER_CANCELED: Driver has cancelled the trip.</li>\n      <li>SUPPLIER_CANCELLED: Supplier has cancelled the trip.</li>\n      <li>DISPATCH_CANCELLED: Dispatch has cancelled the trip.</li>\n      <li>NO_AVAILABILITY_IN_THE_AREA: Dispatch has cancelled the trip as no availability in the the area.</li>\n      <li>NO_FEE: Dispatch has cancelled the trip due to some fee issue.</li>\n      <li>OTHER_DISPATCH_REASON: Other dispatch cancellation reason.</li>\n    </ul>\n  </li>\n  <li>\n    <h4>User cancellation reasons</h4>\n    <ul>\n      <li>DRIVER_DIDNT_SHOW_UP: User has cancelled the trip because driver didn't show up.</li>\n      <li>ETA_TOO_LONG: User has cancelled the trip because estimated time of arival too long.</li>\n      <li>DRIVER_IS_LATE: User has cancelled the trip because driver is late.</li>\n      <li>CAN_NOT_FIND_VEHICLE: User has cancelled the trip because user can not find vehicle.</li>\n      <li>NOT_NEEDED_ANYMORE: User has cancelled the trip as not needed anymore.</li>\n      <li>ASKED_BY_DRIVER_TO_CANCEL: User has cancelled the trip because driver has asked user to cancel the trip.</li>\n      <li>FOUND_BETTER_PRICE: User has cancelled the trip because found better price.</li>\n      <li>NOT_CLEAR_MEETING_INSTRUCTIONS: User has cancelled the trip due to not clear meeting instructions.</li>\n      <li>COULD_NOT_CONTACT_CARRIER: User has cancelled the trip because could not contact carrier.</li>\n      <li>OTHER_USER_REASON: User has cancelled the trip.</li>\n    </ul>\n  </li>\n  <li>\n    <h4>Karhoo cancellation reasons</h4>\n    <ul>\n      <li>FRAUD: Karhoo has cancelled the trip as suspicious booking.</li>\n      <li>NO_AVAILABILITY: Karhoo has cancelled the trip because no availability found.</li>\n      <li>ASKED_BY_USER: Karhoo has cancelled the trip because user asked to cancel the trip.</li>\n      <li>ASKED_BY_DISPATCH: Karhoo has cancelled the trip because dispatch asked to cancel the trip.</li>\n      <li>ASKED_BY_DRIVER: Karhoo has cancelled the trip because driver asked to cancel the trip.</li>\n      <li>FAILIURE: Karhoo has cancelled the trip becuase booking is failed.</li>\n      <li>PREAUTH_FAILED: Karhoo has cancelled the trip. There was an issue with payment preauth and Karhoo is investigating it.</li>\n      <li>OTHER_KARHOO_REASON: Karhoo has cancelled the trip due to unknown reason.</li>\n    </ul>\n  </li>\n  <li>\n    <h4>Other State Details</h4>\n    <ul>\n      <li>FOLLOW_ON: Driver is completing a previous trip before coming to pickup location - only seen when state is DRIVER_EN_ROUTE</li>\n    </ul>\n  </li>\n</ul>\n","example":"REQUESTED_BY_USER"},"SLASummary":{"type":"object","description":"Service level information for the booking.","properties":{"free_cancellation":{"$ref":"#/components/schemas/FreeCancellationInformation"},"free_waiting_time":{"$ref":"#/components/schemas/FreeWaitingTime"}}},"FreeCancellationInformation":{"type":"object","description":"Information about the free cancellation policy. If the\n\"type\" is set to TimeBeforePickup then minutes field\nwill contain information about the free cancellation period.\nThe cancellation will be free up till X minutes before the\nscheduled arrival for the pre booked trips and X minutes after\nmaking a booking for ASAP trips.\n\nIf the type is set to BeforeDriverEnRoute, then the cancellation\nis free until the driver is en route to the pickup point.\n","required":["type"],"properties":{"type":{"type":"string","enum":["TimeBeforePickup","BeforeDriverEnRoute"]},"minutes":{"type":"integer","minimum":0}}},"FreeWaitingTime":{"type":"object","required":["minutes"],"description":"Information about the free waiting time included in the fare.","properties":{"minutes":{"type":"integer","minimum":0}}}}},"x-readme":{"explorer-enabled":true,"proxy-enabled":true}}