-
Notifications
You must be signed in to change notification settings - Fork 0
Avantio
Avantio site https://www.avantio.com/ (previous name 'itsolutions')
All required information can be found in official documentation http://feeds.avantio.com/doc/api_for_portals.pdf. This document is updated constantly. Current API version is 2.6.
Briefly, Avantio provides two ways to get data about accommodations:
-
Via XML files. List of files can be found in the documentation. This way is used by sync workers. Files are updated with different frequency from several hours to several days (more details in documentation). Avantio is multihost supplier. Each host has CODE_PARTNER provided by Avantio. To get access to files you only need CODE_PARTNER.
-
Via SOAP API. This way is used by Concierge webhooks. Each API method requires username and password to be presented in request:
<Credentials>
<Language>EN</Language>
<UserName>Foo</UserName>
<Password>123</Password>
</Credentials>
NOTE: wsdl.xml contains a lot of methods but only those which described in the documentation works fine. Others return a similar error:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>PolicyFault: the access policy has been violated</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Each Avantio accommodation always has three parameters: AccommodationCode
, UserCode
, LoginGA
. This triple used by SOAP API to identify the accommodation. As well as Roomorama requires one identifier for each property these three should be converted to one to be stored in Roomorama. Avantio::PropertyId
class responsible for converting Avantio ids to Roomorama id and vice versa. For more details see the class documentation.
To check a property availability and get the price for a given stay use IsAvailable
and GetBookingPrice
methods.
NOTE: GetBookingPrice
return valid response even for unavailable periods, so check with IsAvailable
method is required!
IsAvailable Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="ws.avantio.com/crsConnectionServices/xsd" xmlns:crs="ws.avantio.com/crsConnectionServices">
<soapenv:Header/>
<soapenv:Body>
<xsd:IsAvailableRQ>
<crs:Credentials>
<crs:Language>EN</crs:Language>
<crs:UserName>username</crs:UserName>
<crs:Password>password</crs:Password>
</crs:Credentials>
<crs:Criteria>
<crs:Accommodation>
<crs:AccommodationCode>55720</crs:AccommodationCode>
<crs:UserCode>1210075202</crs:UserCode>
<crs:LoginGA>itsalojamientos</crs:LoginGA>
</crs:Accommodation>
<crs:Occupants>
<crs:AdultsNumber>1</crs:AdultsNumber>
</crs:Occupants>
<crs:DateFrom>2016-10-01</crs:DateFrom>
<crs:DateTo>2016-10-22</crs:DateTo>
</crs:Criteria>
</xsd:IsAvailableRQ>
</soapenv:Body>
</soapenv:Envelope>