API Reference

Como utilizar a API de Hotéis

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:

  1. Método: GET

  2. URL: https://hotels-api.moblix.com.br/api/AutocompleteLocation

646
  1. Params:

    • Query:
      • Nome da cidade
      • Nome do Hotel
    • IdProvider:
      • (1) Buscador Best Buy
      • (2) Metabuscador Moblix
1042
  1. Executar requisição:

https://suporte.moblix.com.br/hc/article_attachments/360058279554/mceclip2.png

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:

  1. Método: GET

  2. URL: https://hotels-api.moblix.com.br/api/Availability

1072
  1. Params:
  • IdLocation: ID retornado na pesqusa anterior:

    • Buscador Best Buy: [cityId]
    • Metabuscador: [nsidId]-[nsidNs]
313 372
  • 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

855

Exemplo da requisição:

IdLocation:57172-200
Checkin:2022-07-12
Checkout:2022-07-15
Rooms:{"adts": 2, "childAge": [0]}
IdProvider:2
  1. Executar requisição:

https://suporte.moblix.com.br/hc/article_attachments/360058279554/mceclip2.png

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