Exemplo de utilização da API de Hotéis utilizando o Postman:
1. Obter token de acesso
Siga os passos em: Obter Token de Acesso
2. Utilizar token de acesso
Siga os passos em: Utilizando o Token
3. Executar consulta para pegar o id da região
Preenchimento dos parâmetros:
-
Método: GET
-
URL: https://hotels-api.moblix.com.br/api/AutocompleteLocation
-
Params:
- Query:
- Nome da cidade
- Nome do Hotel
- IdProvider:
- (1) Buscador Best Buy
- (2) Metabuscador Moblix
- Query:
- Executar requisição:
Resposta:
{
"success": true,
"hasResult": true,
"exceptionErro": null,
"erro": null,
"data": [
{
"label": "Brasilia - Brasil",
"latitude": null,
"longitude": null,
"bestBuyDetails": {
"cityId": 284,
"countryId": 10
},
"details": null
},
{
"label": "Brasilia De Minas - Brasil",
"latitude": null,
"longitude": null,
"bestBuyDetails": {
"cityId": 114642,
"countryId": 10
},
"details": null
}
],
"totalItens": 0
}
4. Executar Consulta de disponibilidade:
Preenchimento dos parâmetros:
-
Método: GET
- Params:
-
IdLocation: ID retornado na pesqusa anterior:
- Buscador Best Buy: [cityId]
- Metabuscador: [nsidId]-[nsidNs]
-
Checkin: Data do início da estadia
-
Checkout: Data do final da estadia
-
Rooms: Dados de hóspedes
{ "adts": 2, "childAge": [ 0 ] }
-
IdProvider: O mesmo escolhido na requisição anterior
Exemplo da requisição:
IdLocation:57172-200
Checkin:2022-07-12
Checkout:2022-07-15
Rooms:{"adts": 2, "childAge": [0]}
IdProvider:2
- Executar requisição:
Resposta:
{
"success": true,
"hasResult": true,
"exceptionErro": null,
"erro": null,
"data": [
{
"name": "AIRAM",
"type": "Hotel",
"rate": "1",
"localization": "NEAR MANE GARRINCHA STADIUM",
"images": [
"https://cdn.cloudservice.com/HotelsV3/1231/2009101411231950.jpg"
],
"offers": [
{
"reservationCode": "20606658/6416322583266251512/82|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 33.33% OF BOOKING PRICE. <BR />Child discount<BR />Exclusive discount",
"totalPrice": 557,
"best": false,
"cheapest": true
},
{
"reservationCode": "18150858/6416322583266251512/261|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 33.33% OF BOOKING PRICE. <BR />Child discount<BR />Exclusive discount",
"totalPrice": 567,
"best": false,
"cheapest": false
},
{
"reservationCode": "20606658/6416322583266251512/81|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 33.33% OF BOOKING PRICE. <BR />Child discount",
"totalPrice": 618,
"best": false,
"cheapest": false
},
{
"reservationCode": "18150858/6416322583266251512/260|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 33.33% OF BOOKING PRICE. <BR />Child discount",
"totalPrice": 630,
"best": false,
"cheapest": false
}
]
},
{
"name": "OYO ESPLANADA",
"type": "Hotel",
"rate": "1",
"localization": "VILA PLANALTO",
"images": [
"https://cdn.tourismcloudservice.com/HotelsV3/867463/2020831105756412.jpg"
],
"offers": [
{
"reservationCode": "20606720/6416322583266251512/42|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 33.99% OF BOOKING PRICE.STARTING 10/07/2022 CXL-PENALTY FEE IS 100.00% OF BOOKING PRICE. <BR />Child discount<BR />Special discount",
"totalPrice": 593,
"best": false,
"cheapest": true
},
{
"reservationCode": "18324441/6416322583266251512/224|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 33.99% OF BOOKING PRICE.STARTING 10/07/2022 CXL-PENALTY FEE IS 100.00% OF BOOKING PRICE. <BR />Child discount<BR />Special discount",
"totalPrice": 602,
"best": false,
"cheapest": false
},
{
"reservationCode": "20606720/6416322583266251512/40|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 34.07% OF BOOKING PRICE.STARTING 10/07/2022 CXL-PENALTY FEE IS 100.00% OF BOOKING PRICE. <BR />Child discount<BR />Special discount",
"totalPrice": 774,
"best": false,
"cheapest": false
},
{
"reservationCode": "20606720/6416322583266251512/41|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 34.07% OF BOOKING PRICE.STARTING 10/07/2022 CXL-PENALTY FEE IS 100.00% OF BOOKING PRICE. <BR />Child discount<BR />Special discount",
"totalPrice": 774,
"best": false,
"cheapest": false
},
{
"reservationCode": "18324441/6416322583266251512/222|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 34.07% OF BOOKING PRICE.STARTING 10/07/2022 CXL-PENALTY FEE IS 100.00% OF BOOKING PRICE. <BR />Child discount<BR />Special discount",
"totalPrice": 786,
"best": false,
"cheapest": false
},
{
"reservationCode": "18324441/6416322583266251512/223|09/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.CXL charges apply as follows:STARTING 09/07/2022 CXL-PENALTY FEE IS 34.07% OF BOOKING PRICE.STARTING 10/07/2022 CXL-PENALTY FEE IS 100.00% OF BOOKING PRICE. <BR />Child discount<BR />Special discount",
"totalPrice": 786,
"best": false,
"cheapest": false
}
]
},
{
"name": "VERONA HPLUS LONG STAY",
"type": "Hotel",
"rate": "1",
"localization": "BRASILIA",
"images": [
"https://cdn.tourismcloudservice.com/HotelsV3/1331071/202251910623967.jpg"
],
"offers": [
{
"reservationCode": "20675128/6416322583266251512/574|10/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.Política Geral – Mensalista \r-.......**********************************.... ",
"totalPrice": 595,
"best": false,
"cheapest": true
}
]
},
{
"name": "RIVIERA",
"type": "Hotel",
"rate": "1",
"localization": "NEAR CENTRE",
"images": [
"https://cdn.tourismcloudservice.com/HotelsV3/867487/2020831114441283.jpg"
],
"offers": [
{
"reservationCode": "14974124/6416322583266251512/774|10/Jul/2022",
"currency": "BRL",
"description": "EXTRA BED FOR CHILDREN IS NOT GUARANTEED.Política Geral \rHorários:\rHorário de Check-in (Entrada): a partir das 14:00hs. \rHorário de Check-out (Saída): até as 12:00hs \rCafé da Manhã *******************************************************************.... ",
"totalPrice": 631,
"best": false,
"cheapest": true
},
"totalItens": 0
}
Atenção!
Para cidade, utilize sempre o NsidNs 200.
Segue, abaixo, uma lista dos códigos disponíveis.
Hotel: NsidNs: 100
Cidade: NsidNs = 200
Aeroporto: "NsidNs": 500