Despegar API usage
This is the usage documentation for the Despegar API.
For other, more detailed, information see here.
WARNING: We are currently deprecating version 1.0, if your application uses the root version in its configuration, it WILL break in a few months. The new version will not be backward compatible. Check your application(s) and make sure you are using the full version URL (for example http://api.despegar.com/v1/languages) for all calls to our methods. For more information see here.
- General
All API responses are JSON, we also support JSONP with the standard callback parameter.
API responses are heavily cached. Polling for changes should be done sparingly in any case, and polling at a rate faster than once a minute (for semantically identical requests) is considered abusive.
Additionally, all API responses are GZIP'd. The Content-Encoding header is always set, but some proxies will strip this out. The proper way to decode API responses can be found here.
In order to have a fair quantity of requests per day, you need to specify an API Key, see here for more information.
API usage is throttled by IP address. Each IP can make a certain number of requests per-day. Without an API key, this limit is quite low.
Note that API keys do not "stack." A single IP running a dozen registered applications can make the same number of requests per day as an IP running a single registered application.
- Methods
Many API methods are vectorized. That is to say, they will accept multiple values within a single parameter on a request.
If a parameter on this page is in the url path and plural you can pass multiple values separated by commas. The documentation for specific methods will call out vectorized parameters further.
Response
All methods return a json string which contains three main root nodes -- although not all are present at all times.
- data: This node may have a custom key like availability (generally the same as the top URL sub-level of the method), or simply be called data; it contains the actual result of the method. You can see each response structure in the method detail page clicking below.
- meta: Contains summary information (meta data) of the method execution. Examples are time, which contains the milliseconds it took the method to complete, and reference, a unique identifier of the transaction used for tracking and debugging purposes.
Each method may add specific summary data (like pagination information); see the Response Summary section in the method detail page for details. - errors: This node is only present when the method returned an error, and it contains details about what happened. Use the reference value from the meta node when reporting it back to us (assuming it's not a problem with the request, or something that can be solved on your end).
- Availability
- Cars
- [ get ]Gets specific car information after doing the search.[ get ]Searches cars cluster applying filters.[ get ]Searches cars applying filters.
- Combined Products
- [ get ]Gets best combined product[ get ]Gets best combined product of the given combined product along with the possibles combined products varying the clusters and filtering them by the parameters[ get ]Gets best combined product of the given combined product along with the possibles combined products varying the hotels and filtering them by the parameters[ get ]Gets detailed information for selected package[ get ]Gets booking information for selected package
- Flights
- [ get ]Searches flights for one way travels.[ get ]Searches flights for roundtrip travels.[ get ]Get the best price for airplane ticket.[ get ]Returns cluster information from a previous search.[ get ]Returns itinerary information from a previous search.[ get ]/availability/flights/multipleDestinations/{from}/{to}/{departureDate}/{adults}/{children}/{infants}Searches flights for multiple destination travels.[ get ]Reprices and confirms itinerary information from a previous search. Returns the real price with all taxes included.[ get ]Get the top searched flights.[ get ]Get the search data for ticket.
- Hotels
- [ get ]Retrive booking availability on the hotel identified by a sessionTicket on the previous availability search.[ get ]Gets summary of availability on the hotels identified by a set of ids.[ get ]Gets detailed booking availability on the hotel identified by an id.[ get ]Gets booking availability on the hotel by an id. Returns rooms by payment information for checkout form[ get ]Gets booking availability on the hotels in a particular city.[ get ]Get the best price for hotel.[ get ]Get all the best prices for hotels in a particular city.[ get ]Get the best price for the given hotel id.[ get ]Gets booking availability on the hotels in a radius from a location.[ get ]Deprecated Gets summary booking availability on the hotel identified by an id.[ get ]Gets the top searched cities for hotels.
- Packages
- [ get ]Gets possible destinations, itinerary types and departure months for packages.[ get ]Searches for packages.[ get ]Gets package detailed information[ get ]Gets package booking information
- Booking
- [ get ]Gets the credit cards validation information.[ get ]Gets the credit cards validation information by CardCode, BankCode and CardType.[ get ]Gets the available installments options for the provider
- Assisted
- [ post ]Saves the booking intent for an operator to call the client for finishing the booking.[ post ]Saves the booking intent for an operator to call the client for finishing the booking.[ post ]Schedules a callback to the customer. Intended for when the customer booked a hotel or flight and the call center was closed.[ post ]Updates the booking intent for an operator to call the client for finishing the booking.[ post ]Updates the booking intent for an operator to call the client for finishing the booking.
- Cars
- [ get ]Returns the input fields needed for the booking process.[ post ]Complete the booking process.[ post ]Saves partial data in the session identified by the ticket number..[ post ]Commits the information saved in partial calls, and performs the booking.
- Combined Products
- [ get ]Returns the input fields needed for the booking process.[ post ]Saves partial data in the session identified by the ticket number.[ post ]Complete the booking process.[ post ]Commits the information saved in partial calls, and performs the booking.
- Flights
- [ get ]Returns the input fields needed for the booking process.[ post ]Complete the booking process.[ post ]Saves partial data in the session identified by the ticket number..[ post ]Commits the information saved in partial calls, and performs the booking.
- Hotels
- [ get ]Returns the input fields needed for the booking process.[ post ]Saves partial data in the session identified by the ticket number.[ post ]Complete the booking process.[ post ]Commits the information saved in partial calls, and performs the booking.
- Packages
- [ get ]Returns the input fields needed for the booking process.[ post ]Saves partial data in the session identified by the ticket number.[ post ]Complete the booking process.[ post ]Commits the information saved in partial calls, and performs the booking.
- Configuration
- [ get ]Gets configuration defaults by country.[ get ]Gets configuration defaults by country.[ get ]Gets the system configuration.
- Flights
- [ get ]Get Flight review summary[ get ]Get Flight Tracker[ get ]Returns all airlines by ids
- Geo
- [ get ]Gets all countries in the system.[ get ]Get countries identified by a set of ids.[ get ]Gets all cities in the system.[ get ]Get cities identified by a set of ids.[ get ]Gets cities in a radius from a location.[ get ]Gets all airports in the system.[ get ]Get airports identified by a set of ids.[ get ]Gets airports in a radius from a location.[ get ]Get States or Provinces for country
- Autocomplete
- [ get ]Returns all matching objects for the input string[ get ]Returns all matching cities for the input string[ get ]Returns all matching airports for the input string[ get ]Returns all airlines for the input string
- Miscellaneous
- [ get ]Get the pictures of the city
- Reviews
- [ get ]Gets customer latest reviews about the site[ get ]Get the reviews of the city[ get ]Get the reviews summary of cities[ get ]Get the reviews of the airline[ get ]Get the reviews summary of airlines
- Weather
- [ get ]Get weather historic data for a city[ get ]Get weather current conditions for the city[ get ]Get 10 day weather forecast for the city
- Hotels
- [ get ]Gets the amenities for the hotels identified by a set of ids.[ get ]Gets all amenities in the system.[ get ]Get amenities identified by a set of ids.[ get ]Gets the reviews for the hotel identified by id.[ get ]Gets hotels identified by a set of ids.[ get ]Get the reviews summary of hotels[ get ]Get all hotels.[ get ]Get points of interests nearby the hotel with that id.
- Miscellaneous
- [ get ]Gets all currencies in the system[ get ]Get the ratio between two currencies identified by a single id[ get ]Gets currencies identified by a set of ids[ get ]Simulates an error for testing purposes[ get ]Gets all languages supported by the system
- Self service
- Flight Product
- [ get ]Get allowed operations on the product[ get ]Get parameters to request cancellation of order[ put ]Request cancellation of order[ get ]Get parameters to request invoice[ put ]Request invoice[ get ]Get parameters to request a special requirement[ put ]Request a special feature or requirement[ get ]Get parameters to file a suggestion/complaint[ put ]File a suggestion[ get ]Get parameters to request cancellation of order[ put ]File a payment error[ get ]Get flight information[ put ]Change flight
- Transaction
- [ get ]Get information about the transaction[ get ]Get allowed operations on the transaction[ get ]Get transaction history[ get ]Get transaction purchase history[ get ]Get transaction timeline[ get ]Get token of last email[ put ]Add email to transaction[ delete ]Remove email from transaction[ put ]Add phone to transaction[ delete ]Remove phone to transaction
- Self service hotels
- [ get ]Get information about the transaction
- Social Profile Service
- [ get ]Add email to social profile[ get ]Remove email from social profile
