{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"27cf663f-2778-4ba5-b884-3fbd8b60e70c","name":"Foco Multimídia Connectivity APIs","description":"# Sobre a Api\n\nA **Foco Multimídia Connectivity APIs** disponibiliza uma interface totalmente baseada no padrão [OTA (2017B)](https://modelviewers.pilotfishtechnology.com/modelviewers/OTA/), permitindo que parceiros integrem seus sistemas de forma prática, segura e eficiente para envio e recebimento de dados.\n\nPor meio da API, é possível gerenciar **disponibilidade**, **restrições**, **reservas**, além de executar outras ações operacionais suportadas pela nossa interface, garantindo padronização e confiabilidade na troca de informações.\n\nA seguir, estão os serviços disponibilizados:\n\n| **Serviços** | **Mensagens OTA** |\n| --- | --- |\n| Teste de conectividade | `OTA_PingRQ` |\n| Criação de reservas | `OTA_HotelResNotifRQ` |\n| Edição de reservas (somente V2) | `OTA_HotelResModifyRQ` |\n| Cancelamento de reservas | `OTA_CancelRQ` |\n| Consulta de reservas | `OTA_ReadRQ` |\n| Notificação de reservas | `OTA_NotifReportRQ` |\n| Consulta de quartos e tarifas | `OTA_HotelRoomListRQ` |\n| Pesquisar disponibilidade e restrições | `OTA_HotelAvailGetRQ` |\n| Alterar disponibilidade e restrições | `OTA_HotelAvailNotifRQ` |\n| Buscar planos de tarifa | `OTA_HotelRatePlanRQ` |\n| Buscar preços | `OTA_HotelRatePlanRQ` |\n| Alterar preços | `OTA_HotelRatePlanNotifRQ` |\n| Pesquisa de disponibilidade e preços | `OTA_HotelAvailRQ` |\n| Buscar hotéis | `OTA_HotelSearchRQ` |\n\n# Autenticação\n\nTodas as requisições aos serviços da **Foco Multimídia Connectivity APIs** devem ser realizadas exclusivamente por meio do protocolo **HTTPS**, garantindo integridade e a criptografia no transporte de dados.\n\nPara autenticação, a API utiliza o **Basic Authentication**, no qual as credenciais são enviadas no header de cada requisição:\n\n`Authorization: Basic {usuário:senha}`\n\n### Falha de autenticação\n\nCaso ocorra um erro de autenticação, a API retornará o status **HTTP 401 – Unauthorized**.  \nEsse status indica que a requisição foi recebida, porém **não foi possível validar as credenciais enviadas no header Authorization**.\n\nAlém do código HTTP, a API retornará uma resposta contendo o detalhamento do erro:\n\n``` xml\n<OTA_HotelSearchRS xmlns=\"http://www.opentravel.org/OTA/2003/05\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.opentravel.org/OTA/2003/05 OTA_HotelSearchRQ.xsd\" TimeStamp=\"2019-10-16 12:45:07\" CorrelationID=\"d22d1394df86e120e074e5879de9f3ad\" Target=\"Production\" Version=\"1.0\">\n    <Errors>\n        <Error Type=\"13\" Status=\"Incomplete\">Please check your credentials.</Error>\n    </Errors>\n</OTA_HotelSearchRS>\n\n ```\n\nCaso o erro persista:\n\n- Verifique os headers da requisição;\n    \n- Verifique as suas credenciais;\n    \n- Sua credencial tem acesso a este endpoint? (Caso não tenha certeza, entre em contato conosco).\n    \n\n# Formato de requisições e respostas\n\n## Requisição\n\nNeste exemplo, o usuário busca um hotel utilizando seu código, data de início e fim para buscar um hotel:\n\n``` xml\n<OTA_HotelSearchRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.opentravel.org/OTA/2003/05 OTA_HotelResModifyNotifRS.xsd\" TimeStamp=\"2018-06-22T14:56:37+00:00\">\n  <Criteria AvailableOnlyIndicator=\"false\">\n    <Criterion>\n      <HotelRef HotelCode=\"6\"/>\n      <StayDateRange Start=\"2018-09-20\" End=\"2018-09-22\"/>\n    </Criterion>\n  </Criteria>\n</OTA_HotelSearchRQ>\n\n ```\n\n## Resposta\n\nTeremos como resposta todas as informações daquele hotel. Desde preço mínimo praticado, a informações sobre as políticas do hotel, e imagens do mesmo.\n\n``` xml\n<OTA_HotelSearchRS xmlns=\"http://www.opentravel.org/OTA/2003/05\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.opentravel.org/OTA/2003/05 OTA_HotelResModifyNotifRS.xsd\" TimeStamp=\"2018-06-22T14:56:37+00:00\">\n  <Success>ok<Success/>\n  <Properties>\n    <Property HotelCode=\"6\" HotelName=\"Le Parc Caetité\" ChainName=\"Rede Le Parc\">\n      <Position Latitude=\"-12.9774975\" Longitude=\"-38.4391573\"/>\n      <RateRange CurrencyCode=\"BRL\" MinRate=\"200\"/>\n      <Address>\n        </AddressLine>Rua Padre Casimiro Quiroga  - Imbui - São Paulo</AddressLine/>\n      </Address>\n      <VendorMessages>\n        <VendorMessage Title=\"Descriptions\" InfoType=\"1\">\n          <SubSection SubTitle=\"Description\">\n            <Paragraph Name=\"Description Summary\">\n              <Text>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</Text>\n            </Paragraph>\n          </SubSection>\n        </VendorMessage>\n        <VendorMessage Title=\"Images\" InfoType=\"1\">\n          <SubSection SubTitle=\"Hotel images\">\n            <Paragraph Name=\"Hotel images\">\n              <Image>motor_reserva/images/acao_automatica/cliente_6/201808081533731153aniversario2sb.jpg</Image>\n            </Paragraph>\n            <Paragraph Name=\"Hotel images\">\n              <Image>motor_reserva/images/configuracao_estabelecimento/cliente_6/201808151534342303201711161510850769qrt.jpg</Image>\n            </Paragraph>\n          </SubSection>\n          <SubSection SubTitle=\"Room images\">\n            <Paragraph Name=\"Room\">\n              <Image>motor_reserva/images/quarto/cliente_6/201409151410836212foto10.jpg</Image>\n            </Paragraph>\n          </SubSection>\n        </VendorMessage>\n        <VendorMessage Title=\"Policy\" InfoType=\"1\">\n          <SubSection SubTitle=\"Polítíca de cancelamento Geral\">\n            <Paragraph Name=\"Cancellation policy\">\n              <Text>Cancelamentos de reservas pagas, com até 15 dias, antes do check-in, serão devolvidas sem custos para o cliente, descontadas as despesas bancárias ou administrativas se houver;\n%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Com%20menos%20de%203%20dias%20de%20anteced%C3%AAncia%2C%20ser%C3%A1%20devolvido%20apenas%2040%25%20do%20valor%20da%20reserva%3B%20%20%20%20%20\n%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20O%20n%C3%A3o%20comparecimento%20na%20data%20prevista%20para%20o%20check-in%2C%20ser%C3%A1%20considerado%20NO%20SHOW%20e%20cobrado%20integralmente%3B%20%20%20%20%20\n                O cancelamento de um Pacote de diárias, após o check-in, implica no pagamento integral do preço do Pacote, independente do número de dias efetivamente utilizados.</Text>\n            </Paragraph>\n          </SubSection>\n        </VendorMessage>\n        <VendorMessage Title=\"Policy\" InfoType=\"1\">\n          <SubSection SubTitle=\"Deposit policy\">\n            <Paragraph Name=\"Deposit policy\">\n              <Text>Para pagamento em depósito bancário, os valores serão creditados na conta informada abaixo    Caixa Econômica    Ag. 0230-5    CC. 3180928-6    BUSINESS PREMIUM EMPREENDIMENTOS LTDA    CNPJ: 08.372.087/0001-30\n                A reserva será mantida por 24 horas para comprovação do pagamento. Enviar comprovante do depósito para o email reservas@focomultimidia.com</Text>\n            </Paragraph>\n          </SubSection>\n        </VendorMessage>\n        <VendorMessage Title=\"Policy\" InfoType=\"1\">\n          <SubSection SubTitle=\"Child policy\">\n            <Paragraph Name=\"Child policy\">\n              <Text>A criança grátis de 1 a 6 anos completos dorme na cama dos pais.</Text>\n            </Paragraph>\n          </SubSection>\n        </VendorMessage>\n        <VendorMessage Title=\"Policy\" InfoType=\"1\">\n          <SubSection SubTitle=\"Contracts policy\">\n            <Paragraph Name=\"Contracts policy\">\n              <Text>Se hoje é o dia das crianças... Ontem eu disse: o dia da criança é o dia da mãe, dos pais, das professoras,\n%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mas%20tamb%C3%A9m%20%C3%A9%20o%20dia%20dos%20animais%2C%20sempre%20que%20voc%C3%AA%20olha%20uma%20crian%C3%A7a%2C%20h%C3%A1%20sempre%20uma%20figura%20oculta%2C%20que%20%C3%A9%20um%20cachorro%20atr%C3%A1s.%20O%20que%20%C3%A9%20algo%20muito%20importante!\n%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Primeiro%20eu%20queria%20cumprimentar%20os%20internautas.%20-Oi%20Internautas!%20Depois%20dizer%20que%20o%20meio%20ambiente%20%C3%A9%20sem%20d%C3%BAvida%20nenhuma%20uma%20amea%C3%A7a%20ao%20desenvolvimento%20sustent%C3%A1vel.\n                E isso significa que é uma ameaça pro futuro do nosso planeta e dos nossos países. O desemprego beira 20%, ou seja, 1 em cada 4 portugueses.  </Text>\n            </Paragraph>\n          </SubSection>\n        </VendorMessage>\n        <ContactNumbers>\n          <ContactNumber PhoneTechType=\"1\" PhoneUseType=\"6\" PhoneNumber=\"7130132022\"/>\n          <ContactNumber PhoneTechType=\"1\" PhoneUseType=\"6\" PhoneNumber=\"7130132222\"/>\n          <ContactNumber PhoneTechType=\"1\" PhoneUseType=\"6\" PhoneNumber=\"71999588545\"/>\n        </ContactNumbers>\n        <Amenities>\n          <Amenity PropertyAmenityType=\"1\"/>\n          <Amenity PropertyAmenityType=\"2\"/>\n          <Amenity PropertyAmenityType=\"3\"/>\n          <Amenity PropertyAmenityType=\"4\"/>\n          <Amenity PropertyAmenityType=\"5\"/>\n        </Amenities>\n      </VendorMessages>\n  </Properties>\n</OTA_HotelSearchRS>\n\n ```\n\n# Limites por requisições\n\nA API possui um limite de acesso a cada serviço definido para cada hotel:\n\n| **Limite por minuto** | **Mensagens OTA** |\n| --- | --- |\n| 200 | `OTA_HotelSearchRQ` |\n| 150 | `OTA_HotelAvailGetRQ` |\n| 160 | `OTA_HotelAvailNotifRQ` |\n| 180 | `OTA_HotelRatePlanRQ` |\n| 300 | `OTA_HotelResNotifRQ` |\n| 130 | `OTA_HotelResModifyRQ` |\n| 100 | `OTA_CancelRQ` |\n| 150 | `OTA_ReadRQ` |\n\n# Notificações\n\nQuando novas reservas forem adicionadas ao nosso sistema, os parceiros serão automaticamente notificados.  \nPara receber essas notificações, é necessário cadastrar uma **URI** válida para o recebimento das mensagens.\n\nA ativação desse recurso deve ser solicitada por meio do e-mail [api@focomultimidia.com](https://mailto:api@focomultimidia.com).","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5813884","team":189340,"collectionId":"27cf663f-2778-4ba5-b884-3fbd8b60e70c","publishedId":"RzZ7oLb1","public":true,"publicUrl":"https://docs-hotels.focomultimidia.com","privateUrl":"https://go.postman.co/documentation/5813884-27cf663f-2778-4ba5-b884-3fbd8b60e70c","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"225995"},"documentationLayout":"classic-double-column","version":"8.11.4","publishDate":"2019-04-23T18:51:12.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/995bf3405496631f5c7e6e484d1254ceb86b18c5aaec377c2dc0150e855049f5","favicon":"https://focomultimidia.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://docs-hotels.focomultimidia.com/view/metadata/RzZ7oLb1"}