-
Notifications
You must be signed in to change notification settings - Fork 0
AtLeisure
AtLeisure (also known as @Leisure) provides properties with instant confirmation over Europe. At the time of this writing, the countries with the largest number of properties coming from AtLeisure are, in order: France, Italy, Spain and Netherlands.
AtLeisure uses a JSON-RPC 2.0 interface for interacting with its service. Concierge provides a simple JSON-RPC client, API::Support::JSONRPC
for such interfaces.
A general overview of the services provided by their API can be found here. AtLeisure also provides an "Affiliate Portal" where it's possible to track calls and documentation. The web interface is located at https://www.leisure-partners.net/. Authentication happens with the same credentials described in the Authentication section below.
All calls to AtLeisure's API must be authenticated using a username and password combination. These are sent as regular parameters for every JSON-RPC method call, and are named WebpartnerCode
and WebpartnerPassword
, respectively.
Checking if a property is available and getting the price for a given stay is covered by the CheckAvailabilityV1
method.
Request
{
"HouseCode" => "SI-04280-06",
"ArrivalDate" => "2016-04-02",
"DepartureDate" => "2016-04-05",
"Price" => 320,
"WebpartnerCode" => "...",
"WebpartnerPassword" => "..."
}
-
HouseCode
is the property ID in their system. -
ArrivalDate
is the check-in date. -
DepartureDate
is the check-out date. -
Price
is a guess about the price for the given stay. Unfortunately, even if you have no clue on what the price is, this parameter is still required.0
can be used in case there is no prior estimation. See the Response section below on possible outcomes.
Response
The response returned by AtLeisure varies according to whether or not the property is available and if the submitted price is correct. Possible scenarios are:
Property is unavailable on the selected dates
{
"Available" => "No"
}
Property is available on the selected dates and the suggested price is correct
{
"Available" => "Yes",
"PriceMessage" => "Correct",
"CorrectPrice" => 320,
"OnRequest" => "No"
}
Property is available on the selected dates, but the suggested price is not correct
{
"Available" => "Yes",
"PriceMessage" => "Incorrect",
"CorrectPrice" => 320,
"OnRequest" => "No"
}
All prices are quoted in EUR.
Note that the response includes an OnRequest
parameter. Currently, only properties with instant confirmation are supported. Therefore, if a property is available but the OnRequest
parameter is set to "Yes"
, the property should not be available on Roomorama.