Migrating from V2 to V3

Overview

A lot has changed between the two versions of the API. We've changed to a new technical stack which included an evolution in how we think about search and how we display search results to our users. We want to migrate our partners to the new stack which is easier to maintain, more stable, and has a more clear API definition. Below is the guide if you're currently running on v2 and want to migrate to v3.

This isn't meant to serve as an exhaustive list of every change, but should cover a majority of the work that you'll need to do to upgrade. More details can be found in the v3 documentation.

The request

The first change that you'll need to make is the endpoint. Instead of calling:

/api/v2/trips

 The new endpoint is:

/api/v3/trips

 

As part of the migration we renamed some parameters to make them more explicit. We also attempted to make the fields as self documenting as possible. For example, the parameter radius_in_meters is clear the value needs to be in meters without having to look further into the documentation.

Here's a list of the input parameters that changed their name between v2 and v3:

Old v2 param name New v3 param name Notes
fc from_coordiante  
tc to_coordinate  
cur currency  
page from_cursor The pagination mechanism changed from a page number to a cursor, and the cursor for the next page is returned at the end of the previous page
limit count  
db start_date_local We've consolidated our date/time format to a single ISO 8601 format including the date and time
de end_date_local We've consolidated our date/time format to a single ISO 8601 format including the date and time 
seats requested_seats  
radius radius_in_meters  
sort + order sort  These two fields were combined into a single one

The response

The response has correspondingly also been reworked a bit:

Old v2 name New v3 name Notes
links link We removed a deprecated field and simplified to a single link
pager next_cursor + search_info The pager object was broken into the cursor and a search_info containing global information about the search results

The updated Trip object:

Old v2 name New v3 name Notes
links link We removed a deprecated field a simplified to a single link
trip_plan waypoints  
distance distance_in_meters Changed to a simple value without units
duration duration_in_seconds Changed to a simple value without units

Conclusion

Take a read through the entire v3 documentation page to get all of the details, but this should be a good starting point for an overview on what's changed between the two versions. You can always email us if you have any questions along the way!

Was this article helpful?
0 out of 0 found this helpful
Didn't find what you're looking for? Contact us