Autocomplete

General destinations

We developed an Autocomplete feature that we use to search for all possible Destinations and Hotels to be used on the SearchAvailability Request. This feature is available to all our integrating partners as well and it has the following parameters:

    • searched term: at least 3 characters that will be used to look for any destination with the specified combination, in that exact same order, anywhere in its name.

    • manager id: the unique identifying number that belongs to the Operator responsible for this integration.

    • access token: an unique token granted to the integrating partner, mandatory in all of Cangooroo's REST APIs.

    • quantity of results [optional]: the quantity of desired results for the autocomplete to return.

The result of the Autocomplete will be a list of Destinations that matched the searched term criteria.

This is an example of how the Autocomplete works:

http://commons.t4w.com.br/new/api/v1/mapping/autocomplete/all/miam/managerid/[to-be-informed]/token/[to-be-informed]

The request above is searching for the term "miam" and will have as a result over 100 Destinations results from Cities, Points of Interest and Hotels:


[ { "hotelId": 0, "destinationId": 1003944, "name": { "en": "Miami (and vicinity), Florida, United States of America", "es": "Miami (y alrededores), Florida, Estados Unidos", "pt-BR": "Miami (e arredores), Flórida, Estados Unidos da América", "id": 0 }, "type": "Multi-City (Vicinity)" }, { "hotelId": 0, "destinationId": 1009709, "name": { "en": "Miami, Florida, United States of America", "es": "Miami, Florida, Estados Unidos", "pt-BR": "Miami, Flórida, Estados Unidos da América", "id": 0 }, "type": "City" }, ... { "hotelId": 0, "destinationId": 1172849, "name": { "en": "MiMo, Miami, Florida, United States of America", "es": "MiMo, Miami, Florida, Estados Unidos", "pt-BR": "MiMo, Miami, Flórida, Estados Unidos da América", "id": 0 }, "type": "Neighborhood" }, { "hotelId": 0, "destinationId": 1602490, "name": { "en": "Miami, FL, United States (MIA/KMIA Miami Intl.)", "es": "Miami, FL, United States (MIA/KMIA Miami Intl.)", "pt-BR": "Miami, FL, United States (MIA/KMIA Miami Intl.)", "id": 0 }, "type": "Airport" }, { "hotelId": 959821, "destinationId": 1070421, "name": { "en": "Miami Mar, Sant Carles de la Rapita, Spain", "es": "Miami Mar, Sant Carles de la Ràpita, España", "pt-BR": "Miami Mar, Sant Carles de la Ràpita, Espanha", "id": 0 }, "type": "Hotel" }]

On the example above, we have 5 different results - all of them with the term "miam" on their names - of 5 different types and always the same structure:

    • hotelId: this will always have a numeric value and will only be different from zero when the result is of the type: Hotel. In all other cases, this will be zero.

    • destinationId: this will always have a numeric value and will always be the Id of the destination returned. In cases where the result is a Hotel, the destinationId will be the same of the City where the hotel is located.

    • name { en, es, pt-BR }: this will always have text values with the name of the Destination in three different languages - English, Spanish and Brazilian Portuguese.

      • name { id }: (deprecated)

    • type: this will always have a string value and will define which is the type of the current Destination. The possible types are:

        • City: all hotels are mapped within cities and sending a DestinationId of a city to the SearchAvailability Request will make Cangooroo search for all the hotels mapped within that city.

        • Multi-City: a grouping of cities that only exist for the larger cities we have mapped. This will search for the main city and all the surrounding ones.

        • Neighborhood: a district within a city. Despite hotels being mapped within cities, we have their coordinates and can place them within the neighborhoods. When using a DestinationId of neighborhood have in mind that we will only return the hotels located within that neighborhood.

        • Airport: all airports are mapped with cities but work differently from the options above. When using a DestinationId that belongs to an Airport, Cangooroo will search for hotels within a 25km radius from that airport, independently of the hotels and the airport being on the same city or even country.

        • Hotel: when the Destination is of the type Hotel, it will have two identifiers that should be looked at. The DestinationId is the city where the hotel is located. The HotelId is the identifcation number of the returned hotel. When creating the SearchAvailability Request is always mandatory to inform the DestinationId and is possible to send the desired Hotel Id as well.

Airport destinations

This autocomplete returns only airports:

http://commons.t4w.com.br/New/api/v1/mapping/airport/autocomplete/mexico/token/[to-be-informed]