Get quotes

  1. Prerequisites
  2. Get quotes
  3. Book a trip
  4. Trip updates
  5. Trip completion

With a valid request id, the next step is to collect all available quotes and select the best one for the desired trip.

Get quotes

  1. Request quotes
    By supplying the origin and destination GPS Coordinates to the Quotes API, quotes can be requested for immediate ("ASAP") fulfillment by leaving the local_time_of_pickup field blank or for a future date and time. It is also possible to (optionally) specify the number of passengers, amount of luggage, and references to related flight or train journeys.

This request will return a quote list identifier (id) and a validity period (validity) in seconds (presently the default is 300 seconds).

For example:

{
  id: "bb150d8c-6ef5-11e8-b948-0a580a2c0515",
  validity: 300
}

The quote list is asynchronous. It will be updated with additional records as more quotes are received from Karhoo Fleet partners. The list should populate fully reasonably quickly but end users may have constraints on their side that cause delays. It is recommended to continue to poll for updates for the longest period that your end user expectations allow for.

  1. Check for quotes
    Check the status of the list of quotes by polling every few seconds the using the /quotes/{id} endpoint, where the {id} is the quote list identifier from above.

The endpoint can continue to be polled while the status returned is PROGRESSING. After 30 seconds you should see the status change to COMPLETED, and the quote list items will no longer be updated.

The status of COMPLETED may occur before 30 seconds, if the Karhoo system has received a quote from all fleets in the area.

  1. Select a quote
    Each line in the quote list will contain detailed features of the quoted vehicle, such as the class of vehicle and its capacity (maximum number of passengers and luggage). This list should be filtered by the client to show end users any specific features or a minimum passenger capacity that they might require.

Related tasks

As part of the trip quoting process, the user might need to complete additional, related tasks.

Check availability of vehicles for a specific trip

To check the availability of vehicles for a specific trip the /quotes/availability endpoint. The details required are identical to those in getting a quote.

Reference

ServiceAPI referenceErrors reference
QuotesQuotesQuotes Errors

Troubleshooting

Some potential errors you might encounter are:

ErrorSolution
Invalid request payloadCheck the request body for invalid parameter names or values.
Could not get estimatesThis could occur if you specify an invalid place or place id.
Could not get estimates (no availability found within requested area)There might not be any fleet coverage in the specified area. You can check the availability in the area by calling the /quotes/availability endpoint. It could also indicate no vehicles available matching your passenger or luggage requirements. Try getting quotes for two or more vehicles.
Could not get estimates (could not find specified quote)Error getting estimates from estimates service. Try the /quotes/healthcheck endpoint to test the service is available.

What’s Next