These docs are for v1.0. Click to read the latest docs for v2.0.
added

Migrating to Quotes v2

July 17th 2020 - A new Quotes API that will be cheaper for you to use, offers more flexibility and will support more requested features!

What's New?

We've learned a lot since we launched the first version of our Quotes API. This update represents the sum of all the partner feedback we've received thus far and establishes a new way forward for requesting and consuming content in the Karhoo marketplace.

The new API will be cheaper for you to use, offers more flexibility and will support more requested features!

Here is a quick summary of the changes we'll explain in detail below:

  • Place ID is no longer supported, only Latitude, Longitude and Display Address
  • The Availability API is now deprecated, Quotes v2 now contains all needed information.
  • The Quote response structure is now simpler and better organized for future features.

Supporting Latitude and Longitude

To better support a wider range of use cases we are removing the ability to search for quotes by Google Place ID.

{
   "origin_place_id":"ChIJtV5bzSAFdkgRpwLZFPWrJgo",
   "destination_place_id":"Eh9Ub3dlciBCcmlkZ2UgUmQsIFVuaXRlZCBLaW5nZG9tIi4qLAoUChIJW5Jn8kQDdkgRhl_LxOfF12ASFAoSCamRx0IRO1oCEXoliDJDoPjE"
}

We now only support Latitude, Longitude and a long form display address string for downstream users.

{
  "origin" : {
    "latitude": "51.501364",
    "longitude" "-0.14189",
    "display_address": "Buckingham Palace, London SW1A 1AA" 
  },
  "destination" : {
    "latitude": "51.5054564", 
    "longitude" "-0.0775452",
    "display_address": "Tower Bridge Rd, London SE1 2UP" 
  },
  "local_time_of_pickup": "2020-03-12T15:30" // Optional 
}

Cleaner Response Structure

We've now cleaned up the response payload as well. The new structure better matches other response objects in our APIs.
The mainline objects are now segmented into the following:

Vehicle Class Availability

We will now return availability information as a part of the quote response. Previously a separate call to Availability was needed to see what vehicle classes are available.

"vehicles": {
  "classes": [
    "Saloon",
    "MVP",
    "Taxi"
  ]
}

Price

The new Price object gives us the opportunity to expose net amounts when returning quotes.

"price": {
  "currency_code": "GBP",
  "high": 1500,
  "low": 1000,
  "net":{
    "high": 1350,
    "low": 900
  }
 }

Fleet

The Fleet object contains the same information as before but organized into one object

"fleet": {
  "id": "82cdc359-beed-45cb-8743-baec84e58b57",
  "name": "PHV Fleet (Robot Fleet GB)",
  "description": "Regional Private Hire Company operating in London",
  "rating": {
    "count": 0,
    "score": 0
  },
  "logo_url": "https://.../69279eb83537f0471137a72184f31edb.png",
  "terms_conditions_url": "https://.../index.html",
  "phone_number": "+44800000000"
}

Vehicle

Top level vehicle information has also been moved to its own object. Vehicle attributes has been removed in v2, an improved way of describing quote metadata will be released in the next minor update.

"vehicle": {
  "qta": {
    "high_minutes": 5,
     "low_minutes": 2
   },
   "class": "Saloon"
}

Summary

Let's have a side by side look at the improvements!

1946

👍

Have a look!

Make your way to the new Quotes API for more details!