-
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.
AtLeisure 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.
PlaceBookingV1
method
Request
{
"HouseCode" => "AT-123-456",
"ArrivalDate" => "2016-03-22",
"DepartureDate" => "2016-03-24",
"NumberOfAdults" => 2,
"WebsiteRentPrice" => 300,
"CustomerSurname" => "Black",
"CustomerInitials" => "Alex",
"CustomerTelephone1Number" => "555-55-55",
"BookingOrOption" => "Booking",
"CustomerEmail" => "atleisure@roomorama.com",
"CustomerCountry" => "SG",
"CustomerLanguage" => "EN",
"NumberOfChildren" => "0",
"NumberOfBabies" => "0",
"NumberOfPets" => "0",
"Test" => "Yes",
"WebpartnerCode" => "...",
"WebpartnerPassword" => "..."
}
-
HouseCode
is the property ID in their system. The code starts withXX-...
definea properties as a test, possible to book it withoutTest
flag. -
ArrivalDate
is the check-in date. -
DepartureDate
is the check-out date. -
WebsiteRentPrice
is a quoted price for the given stay. Response will return an error if the price is not equal quoted price -
CustomerSurname
- Roomorama's last name -
CustomerInitials
- Roomorama's first name -
BookingOrOption
- accepts two valuesBooking
orOption
. The second one I have no idea for what it -
CustomerEmail
- set default email to prevent emails to guest with confusing information -
CustomerCountry
,CustomerLanguage
,NumberOfChildren
,NumberOfBabies
,NumberOfPets
- mandatory fields. Not supported by Roomorama webhooks -
Test
- accepts two valuesYes
orNo
. Configures in concierge credentials
Response
{
"BookingNumber": 175607953,
"MyAccountLoginURL": "https://www.belvilla.nl/mijn-belvilla",
...
"WebPartnerCommissionBase": 0,
"WebpartnerBookingCode": "My-code"
}
Using only BookingNumber
parameter, to keep info about booking
The sync process is executed by two workers:
- Properties metadata sync
Workers::Suppliers::AtLeisure::Metadata
- Properties availabilities sync
Workers::Suppliers::AtLeisure::Availabilities
The integration with AtLeisure API implemented by AtLeisure::Importer
which fetches properties and related data layout_items
. The provided properties data keep structure of layers set in request. Layers:
-
BasicInformationV3
- basic information about property(location, name, surface...) -
MediaV2
- images -
PropertiesV1
- need to define room type and some amenities -
LayoutExtendedV2
- keeps codes of property items (beds, rooms, amenities..) -
AvailabilityPeriodV1
- keeps availabilities ascheck_in..check_out
period for two years -
CostsOnSiteV1
- keeps information about additional costs (Deposit, Taxes...)
AtLeisure supplier allows us to fetch batch of properties with full details on one request.
Metadata
Uses info from all the layers described above.
Calendar
Uses only AvailabilityPeriodV1
layer.
not resolved tasks
- Feedbacks - The supplier provides feedbacks as
GuestsBook
. It was implemented withIngest
but now we don't have this functional.