Skip to content
Sharipov Ruslan edited this page Sep 16, 2016 · 25 revisions

Serviced Apartments Worldwide

Examples are given using httpie library. Correct result XML API inputs/outputs are given here

API usage examples:

Servers:

SAW API Documentation

SAW API is a XML-based API which use username and password for authentication (pair should be sent in every request)

Important SAW integration notes

Files structure

Integration libs' directory has 4 main directories:

▾ saw /
  ▾ commands
  ▾ converters
  ▾ entities
  ▾ mappers
  • commands holds classes which responsible for fetching information from API.
  • converters holds classes which need to convert one property (format) to another.
  • mappers holds classes which perform attribute mapping of SAW API-returned data to domain objects.
  • entities holds classes which are built by mapper classes.

There are also special classes for building and parsing request/responses:

  • A special class called PayloadBuilder is responsible for build XML payloads for the SAW API.
  • A special class called ResponseParser is responsible for handling responses from the SAW API.

Synchronisation

There are two available endpoints which return property lists in SAW API.

Property list endpoint returns more detailed information about each property included in response. However, it does not include price information as property search endpoint does and property list endpoints takes sometimes 30, 40s to complete. That's why integration never sends request to property list endpoint and always uses property search endpoint.

On request properties

Property search endpoint supports filtering properties by <flag_free_sale>Y</flag_free_sale> attribute. Passing "Y" value means that only available properties will be returned (meaning to return no "On request" properties). After clarification from SAW, it's revealed that SAW API considers property as "On request" in any case when property cannot be booked and this value changes (for example, they exceeded number of bookings for one property, they just start returning "On request" status). Integration always sends search requests without flag_free_sale attribute as because we want to fetch all properties to our database and even if properties are On request while sync, they may become available just after seconds while sync.

Actual prices / availability for requested dates and number of guests will be returned only while quote price operation.

Caching

List of available countries is static and SAW integration caches the response for the TTL = 1 week

BasicProperty and DetailedProperty objects

There is a special endpoint in SAW API to get details of the property (and we have to perform 1 additional API call for every property because propertysearch doesn't have attributes which return propertydetail endpoint. The opposite is also right: some property attributes which are returned by the propertysearch endpoint don't available after propertydetail call.

To solve this issue and to have a clearer understanding of the set of property attributes you're working on the following solution was made:

  • Created SAW::Entities::BasicProperty object
  • Created SAW::Entities::DetailedProperty object

Some attributes in these objects are the same, and some of them - unique.
Since Concierge requires the final result to be Roomorama::Property there is a special step / class which converts SAW integration domain objects (SAW::Entities::BasicProperty and SAW::Entities::DetailedProperty) to instance of Roomorama::Property.

Concierge::SafeAccessHash usage

All hashes which is coming from the remote SAW API and parsed and converted to the instance of Concierge::SafeAccessHash. Follow wiki, core class documentation and source code to get understanding of the idea.

Property types

All properties in SAW database are multi-unit. https://github.com/roomorama/roomorama-postman-partners/issues/81

Availabilities

We decided to consider all properties as available because it's not quite easy to build availabilities calendar for SAW properties. Corresponding discussion: https://github.com/roomorama/roomorama-postman-partners/issues/86

Photos

We decided to use one set of photos from property for all its units.

Amenities

SAW API doesn't have an endpoint of all available amenities (or facility services, as it called in terms of SAW documentation). As a result, the next solution was made:

  • Performed manual fetch of all properties for all countries
  • Extracted all available facility services
  • Applied uniqueness filter for the set of services
  • Created configuration file called mappers/config/amenities.json which has mapping of amenitites between SAW and Roomorama APIs

There are always facility services which has no corresponding mapping to Roomorama API-supported amenities. These facility services are being added to the end of the description field of the final Roomorama::Property, so that we can display way more better property information to Roomorama users.

Examples

Countries

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/country.aspx @~/xml/countries.xml

Request XML input example:

<request>
	<username>username</username>
	<password>password</password>
</request>

Response XML example:

<?xml version="1.0"?>
<response>
  <countries>
    <country id="32">
      <country_name>Argentina</country_name>
    </country>
    <country id="36">
      <country_name>Australia</country_name>
    </country>
    <country id="40">
      <country_name>Austria</country_name>
    </country>
    <country id="56">
      <country_name>Belgium</country_name>
    </country>
    <country id="116">
      <country_name>Cambodia</country_name>
    </country>
    <country id="124">
      <country_name>Canada</country_name>
    </country>
    <country id="152">
      <country_name>Chile</country_name>
    </country>
    <country id="156">
      <country_name>China</country_name>
    </country>
    <country id="203">
      <country_name>Czech Republic</country_name>
    </country>
    <country id="208">
      <country_name>Denmark</country_name>
    </country>
    <country id="250">
      <country_name>France</country_name>
    </country>
    <country id="268">
      <country_name>Georgia</country_name>
    </country>
    <country id="276">
      <country_name>Germany</country_name>
    </country>
    <country id="300">
      <country_name>Greece</country_name>
    </country>
    <country id="348">
      <country_name>Hungary</country_name>
    </country>
    <country id="356">
      <country_name>India</country_name>
    </country>
    <country id="360">
      <country_name>Indonesia</country_name>
    </country>
    <country id="372">
      <country_name>Ireland</country_name>
    </country>
    <country id="380">
      <country_name>Italy</country_name>
    </country>
    <country id="392">
      <country_name>Japan</country_name>
    </country>
    <country id="410">
      <country_name>Korea, Republic of</country_name>
    </country>
    <country id="458">
      <country_name>Malaysia</country_name>
    </country>
    <country id="470">
      <country_name>Malta</country_name>
    </country>
    <country id="528">
      <country_name>Netherlands</country_name>
    </country>
    <country id="554">
      <country_name>New Zealand</country_name>
    </country>
    <country id="608">
      <country_name>Philippines</country_name>
    </country>
    <country id="616">
      <country_name>Poland</country_name>
    </country>
    <country id="620">
      <country_name>Portugal</country_name>
    </country>
    <country id="634">
      <country_name>Qatar</country_name>
    </country>
    <country id="643">
      <country_name>Russian Federation</country_name>
    </country>
    <country id="702">
      <country_name>Singapore</country_name>
    </country>
    <country id="703">
      <country_name>Slovakia</country_name>
    </country>
    <country id="710">
      <country_name>South Africa</country_name>
    </country>
    <country id="724">
      <country_name>Spain</country_name>
    </country>
    <country id="756">
      <country_name>Switzerland</country_name>
    </country>
    <country id="764">
      <country_name>Thailand</country_name>
    </country>
    <country id="784">
      <country_name>United Arab Emirates</country_name>
    </country>
    <country id="826">
      <country_name>United Kingdom</country_name>
    </country>
    <country id="840">
      <country_name>United States</country_name>
    </country>
    <country id="704">
      <country_name>Viet Nam</country_name>
    </country>
  </countries>
</response>

Facilities

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/facilityservice.aspx @~/xml/facilities_input.xml

Request XML input example:

<request>
	<username>username</username>
	<password>password</password>
</request>

Response XML example:

<?xml version="1.0"?>
<response>
  <facilities_services>
    <facility_service id="1">
      <facility_service_name>24 hour Reception</facility_service_name>
    </facility_service>
    <facility_service id="3">
      <facility_service_name>Air Conditioning/Cooling</facility_service_name>
    </facility_service>
    <facility_service id="5">
      <facility_service_name>Parking (on site)</facility_service_name>
    </facility_service>
    <facility_service id="6">
      <facility_service_name>Laundry</facility_service_name>
    </facility_service>
    <facility_service id="7">
      <facility_service_name>Restaurant</facility_service_name>
    </facility_service>
    <facility_service id="8">
      <facility_service_name>Breakfast Room</facility_service_name>
    </facility_service>
    <facility_service id="9">
      <facility_service_name>Freesale</facility_service_name>
    </facility_service>
    <facility_service id="13">
      <facility_service_name>Test123</facility_service_name>
    </facility_service>
  </facilities_services>
</response>

Locations (for Los Angeles)

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/location.aspx @~/xml/la_locations_input.xml

Request XML input example:

<request>
  	<username>username</username>
	<password>password</password>
	<cityregionid>1265</cityregionid>
</request>

Response XML example:

<?xml version="1.0"?>
<response>
  <locations>
    <location id="1410">
      <location_name>Hollywood</location_name>
    </location>
    <location id="1517">
      <location_name>Nr. Manhattan Beach</location_name>
    </location>
  </locations>
</response>

City Regions (for USA)

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/cityregion.aspx @~/xml/cityregion_input.xml

Request XML input example:

<request>
	<username>username</username>
	<password>password</password>
	<countryid>840</countryid>
</request>

Response XML example:

<?xml version="1.0"?>
<response>
  <cityregions>
    <cityregion id="1254">
      <cityregion_name>Branson, MO</cityregion_name>
    </cityregion>
    <cityregion id="1253">
      <cityregion_name>Gatlinburg, TN</cityregion_name>
    </cityregion>
    <cityregion id="1255">
      <cityregion_name>Hollister, MO</cityregion_name>
    </cityregion>
    <cityregion id="1250">
      <cityregion_name>Kissimmee, FL</cityregion_name>
    </cityregion>
    <cityregion id="1249">
      <cityregion_name>Las Vegas, NV</cityregion_name>
    </cityregion>
    <cityregion id="1265">
      <cityregion_name>Los Angeles, CA</cityregion_name>
    </cityregion>
    <cityregion id="1257">
      <cityregion_name>Mesa, AZ</cityregion_name>
    </cityregion>
    <cityregion id="1259">
      <cityregion_name>Myrtle Beach, SC</cityregion_name>
    </cityregion>
    <cityregion id="933">
      <cityregion_name>New York City</cityregion_name>
    </cityregion>
    <cityregion id="994">
      <cityregion_name>Orlando, FL</cityregion_name>
    </cityregion>
    <cityregion id="1260">
      <cityregion_name>Park City, UT</cityregion_name>
    </cityregion>
    <cityregion id="1252">
      <cityregion_name>River Ranch, FL</cityregion_name>
    </cityregion>
    <cityregion id="1258">
      <cityregion_name>Robinsonville, MS</cityregion_name>
    </cityregion>
    <cityregion id="1256">
      <cityregion_name>Williamsburg, VA</cityregion_name>
    </cityregion>
  </cityregions>
</response>

Property List (for Spain)

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/propertylist.aspx @~/xml/spain_propertylist_input.xml

Request XML input example:

<request>
	<username>username</username>
	<password>password</password>
	<countryid>724</countryid>
</request>

Response XML example:

<?xml version="1.0"?>
<response>
  <properties>
    <property id="2894">
      <name>Atenea Park Suites Apartments</name>
      <image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39475</image_url>
      <location>Beach</location>
      <city_region>Vilanova</city_region>
      <our_rating>
        <our_rating_value>8</our_rating_value>
        <our_rating_description>STANDARD PLUS</our_rating_description>
      </our_rating>
      <customer_rating/>
      <flag_breakfast_included>False</flag_breakfast_included>
      <summary>Atenea Park Suites Apartments is located in Vilanova near to the promenade and the beach of Roges Ribes.

Atenea Park Suites Apartaments hotel, in Vilanova i la Geltr, is established in a modern architectural building and it offers 102 apartments, spread over 4 floors. </summary>
      <property_description>The apartments are comfortably furnished with a bedroom, a living room, a bathroom, a kitchen and with all services and amenities that guarantee a pleasant stay in the always beautiful Vilanova i la Geltr.

The property has a beautiful garden with two swimming pools (one for children), solarium and a terrace at the bar. It has a restaurant, a mini-gym and a private garage.

Atenea Park Suites Apartaments is situated at the beautiful seaside town of Vilanova i la Geltr, the capital of the region of Garraf, 40 km from Barcelona. The town has an excellent access to the motorway, so it takes only 30 minutes by car to get to Barcelona and 20 minutes to the airport. In case of choosing public transport, it is the most convenient to go by train.

Vilanova i la Geltr represents a perfect balance of culture, family tourism, gastronomy, leisure and commerce. There is a seafront promenade and three different beaches with fine sand. Atenea Park Suites Apartaments hotel is only 10 minutes walk from the town centre and it is located 30 meters from the beach of Ribes Roges. The mild climate means the fun lasts all year round.

</property_description>
      <accommodations>
        <accommodation_type id="-1">
          <accommodation_name>All</accommodation_name>
        </accommodation_type>
        <accommodation_type id="106">
          <accommodation_name>Studio</accommodation_name>
        </accommodation_type>
      </accommodations>
      <facility_services>
        <facility_service>24 Hour Emergency Contact</facility_service>
        <facility_service>24 Hour Reception/Concierge</facility_service>
        <facility_service>Air-Conditioning/Cooling</facility_service>
        <facility_service>Alarm Clock</facility_service>
        <facility_service>Babysitting (On Request)</facility_service>
        <facility_service>Bar</facility_service>
        <facility_service>Bathroom Welcome Pack</facility_service>
        <facility_service>Breakfast Room</facility_service>
        <facility_service>Childrens' Playground</facility_service>
        <facility_service>Coffee Shop in Property</facility_service>
        <facility_service>Coffee Shop Nearby</facility_service>
        <facility_service>Complimentary Snack Room</facility_service>
        <facility_service>Conference Facilities</facility_service>
        <facility_service>Connecting Apartments / Rooms</facility_service>
        <facility_service>Deposit Box</facility_service>
        <facility_service>Digital TV</facility_service>
        <facility_service>Dry Cleaning (Extra Cost)</facility_service>
        <facility_service>Films Available</facility_service>
        <facility_service>Fitness Centre Nearby</facility_service>
        <facility_service>Fitness Centre On-Site</facility_service>
        <facility_service>Freeview TV</facility_service>
        <facility_service>Fridge / Freezer</facility_service>
        <facility_service>Garage</facility_service>
        <facility_service>Garden</facility_service>
        <facility_service>Hair Salon On-Site</facility_service>
        <facility_service>Hairdryer</facility_service>
        <facility_service>Iron and Ironing Board</facility_service>
        <facility_service>Laundry Facilities On-Site</facility_service>
        <facility_service>Lift</facility_service>
        <facility_service>Microwave </facility_service>
        <facility_service>Minibar</facility_service>
        <facility_service>Newspaper Complimentary</facility_service>
        <facility_service>No Smoking Apartments/Rooms</facility_service>
        <facility_service>Parking Nearby</facility_service>
        <facility_service>Parking On-Site</facility_service>
        <facility_service>Reduced Mobility Facilities</facility_service>
        <facility_service>Restaurant Nearby</facility_service>
        <facility_service>Restaurant On-Site</facility_service>
        <facility_service>Rooftop Garden</facility_service>
        <facility_service>Room Service</facility_service>
        <facility_service>Snack Bar</facility_service>
        <facility_service>Snack Machine</facility_service>
        <facility_service>Solarium</facility_service>
        <facility_service>Sports Facilities</facility_service>
        <facility_service>Supermarket Nearby</facility_service>
        <facility_service>Swimming Pool Outdoors</facility_service>
        <facility_service>Tea and Coffee</facility_service>
        <facility_service>WIFI Free of Charge</facility_service>
        <facility_service>WIFI Reception Area Free of Charge</facility_service>
      </facility_services>
      <local_attractions>
        <local_attraction>Beach</local_attraction>
        <local_attraction>Trains to Barcelona</local_attraction>
      </local_attractions>
      <image_gallery>
        <image>
          <title>1 Bedroom</title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39455</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39457</large_image_url>
        </image>
        <image>
          <title>1 Bedroom</title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39460</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39462</large_image_url>
        </image>
        <image>
          <title>1 Bedroom</title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39465</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39467</large_image_url>
        </image>
        <image>
          <title>Fitness Centre</title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39470</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39472</large_image_url>
        </image>
        <image>
          <title>Atenea Park Suites Apartments</title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39475</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39477</large_image_url>
        </image>
        <image>
          <title>Atenea Park Suites Apartments</title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39480</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39482</large_image_url>
        </image>
      </image_gallery>
      <map_location>
        <latitude>41.21386</latitude>
        <longitude>1.72112</longitude>
        <full_address>Address1 Address2 Vilanova Spain</full_address>
      </map_location>
    </property>
    <property id="1394">
      <name>Citadines Barcelona Ramblas</name>
      <image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34900</image_url>
      <location>La Rambla</location>
      <city_region>Barcelona</city_region>
      <our_rating>
        <our_rating_value>9</our_rating_value>
        <our_rating_description>SUPERIOR</our_rating_description>
      </our_rating>
      <customer_rating/>
      <flag_breakfast_included>False</flag_breakfast_included>
      <summary>Located on one of the most vibrant streets in Barcelona and famous the world over, Citadines Barcelona Ramblas has the perfect location for you to soak up the atmosphere of this great city - It's just 2 steps away from the famous Plaa Catalunya and within easy reach of both the historic old town and business area.</summary>
      <property_description> Citadines Barcelona Ramblas offers 131 apartments in 2 wings with Studios for 2 people having either a double or twin beds and the 1 bedroom apartments for up to 4 people having a sofa or pullout beds in the lounge and either a a double or twin beds in the bedroom.  All Apartments are air-conditioned and have a well fitted kitchenette. Tea and coffee are provided. 

In 2013 the property was renovated in Mediterranean contemporary style to give you better comfort.

The location is excellent for visiting all the main landmarkes and attractions of one of Europes finest cities. 

Maid service is done on a weekly basis. If you are staying for 7 nights or more then it is done during the middle of the stay. If you are staying for less than 7 nights then you pay directly at the property for additional maid service.

Breakfast available, payable to the property.

City Tax which is not included in the rate and is approx 0.72 per person per night, this is payable direct to the property.

Nearest public transport.
Airport : El Prat (20 minutes by car).
Underground : Station Plaa de Catalunya (5 minutes on foot).
Taxi : front of the Apart'hotel.
</property_description>
      <accommodations>
        <accommodation_type id="-1">
          <accommodation_name>All</accommodation_name>
        </accommodation_type>
        <accommodation_type id="95">
          <accommodation_name>1-Bedroom</accommodation_name>
        </accommodation_type>
      </accommodations>
      <facility_services>
        <facility_service>24 Hour Reception/Concierge</facility_service>
        <facility_service>Air-Conditioning/Cooling</facility_service>
        <facility_service>Baby Amenities</facility_service>
        <facility_service>Babysitting (On Request)</facility_service>
        <facility_service>Bathroom Welcome Pack</facility_service>
        <facility_service>Breakfast Room</facility_service>
        <facility_service>Burners / Hobs</facility_service>
        <facility_service>Business Facilities</facility_service>
        <facility_service>Coffee Maker</facility_service>
        <facility_service>Coffee Shop Nearby</facility_service>
        <facility_service>Deposit Box</facility_service>
        <facility_service>Digital TV</facility_service>
        <facility_service>Direct Dial Telephone</facility_service>
        <facility_service>Dishwasher</facility_service>
        <facility_service>Dry Cleaning (Extra Cost)</facility_service>
        <facility_service>Fridge / Freezer</facility_service>
        <facility_service>Garage</facility_service>
        <facility_service>Hairdryer</facility_service>
        <facility_service>Iron and Ironing Board</facility_service>
        <facility_service>Kettle</facility_service>
        <facility_service>Laundry Facilities On-Site</facility_service>
        <facility_service>Lift</facility_service>
        <facility_service>Maid Service Weekly</facility_service>
        <facility_service>Microwave </facility_service>
        <facility_service>Parking On-Site</facility_service>
        <facility_service>Pets Allowed (Extra Cost)</facility_service>
        <facility_service>Restaurant Nearby</facility_service>
        <facility_service>Room Safe</facility_service>
        <facility_service>Supermarket Nearby</facility_service>
        <facility_service>Toaster</facility_service>
        <facility_service>WIFI Free of Charge</facility_service>
      </facility_services>
      <local_attractions>
        <local_attraction>The Old Gothic Quarter</local_attraction>
        <local_attraction>Miro Museum</local_attraction>
        <local_attraction>The Cathedral</local_attraction>
        <local_attraction>Ramblas</local_attraction>
        <local_attraction>Olympic Stadium</local_attraction>
        <local_attraction>Plaa Catalunya</local_attraction>
        <local_attraction>Picasso Museum</local_attraction>
        <local_attraction>Sagrada Familia</local_attraction>
        <local_attraction>Gaudi's unfinished cathedral</local_attraction>
        <local_attraction>Ciutadella Park. </local_attraction>
      </local_attractions>
      <image_gallery>
        <image>
          <title>1 Bedroom </title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34888</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34890</large_image_url>
        </image>
        <image>
          <title>1 Bedroom </title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34892</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34894</large_image_url>
        </image>
        <image>
          <title>Studio </title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34896</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34898</large_image_url>
        </image>
        <image>
          <title>Studio </title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34900</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34902</large_image_url>
        </image>
        <image>
          <title>Terrace</title>
          <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39840</thumbnail_image_url>
          <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39842</large_image_url>
        </image>
      </image_gallery>
      <map_location>
        <latitude>41.38386</latitude>
        <longitude>2.17133</longitude>
        <full_address>Address1 Address2 Barcelona Spain</full_address>
      </map_location>
    </property>
    
   ...
  </property>
</response>

Property Rates

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/propertyrates.aspx @~/xml/property_rates_input.xml

Request XML input example:

<request>
	<username>username</username>
	<password>password</password>
	<propertyid>1394</propertyid>
	<check_in>10/06/2016</check_in>
	<check_out>15/06/2016</check_out>

	<apartments>
		<accommodation_type>
			<accommodation_typeid>-1</accommodation_typeid>
			<number_of_guests>2</number_of_guests>
		</accommodation_type>
	</apartments>
</request>

Response XML example:

<?xml version="1.0"?>
<response>
  <property id="1394">
    <name>Citadines Barcelona Ramblas</name>
    <check_in>10/06/2016</check_in>
    <check_out>15/06/2016</check_out>
    <currency_code>EUR</currency_code>
    <default_currency_code>EUR</default_currency_code>
    <apartments>
      <accommodation_type id="95">
        <property_accommodation id="10612">
          <property_accommodation_name>Classic Room</property_accommodation_name>
          <number_of_guests>1</number_of_guests>
          <maximum_guests>1</maximum_guests>
          <bed_types/>
          <status>
            <flag_fair_warning>N</flag_fair_warning>
            <flag_no_allocation>N</flag_no_allocation>
            <flag_free_sale>Y</flag_free_sale>
            <flag_great_deal>N</flag_great_deal>
          </status>
          <flag_dynamic>Y</flag_dynamic>
          <price_detail>
            <net>
              <date_range>
                <date_info>
                  <date>10/06/2016</date>
                  <price>128</price>
                </date_info>
                <date_info>
                  <date>11/06/2016</date>
                  <price>128</price>
                </date_info>
                <date_info>
                  <date>12/06/2016</date>
                  <price>128</price>
                </date_info>
                <date_info>
                  <date>13/06/2016</date>
                  <price>128</price>
                </date_info>
                <date_info>
                  <date>14/06/2016</date>
                  <price>128</price>
                </date_info>
              </date_range>
              <average_price>
                <price>128.26</price>
              </average_price>
              <total_price>
                <price>641.30</price>
              </total_price>
            </net>
            <rate_plans>
              <rate_plan_code>NMUH</rate_plan_code>
              <condition_type/>
              <cancellation_policies/>
            </rate_plans>
          </price_detail>
          <flag_bookable_property_accommodation>Y</flag_bookable_property_accommodation>
        </property_accommodation>
      </accommodation_type>
    </apartments>
    <thirtyday_rates>N</thirtyday_rates>
    <flag_supported_currency>Y</flag_supported_currency>
    <flag_payable_currency>Y</flag_payable_currency>
    <flag_bookable_property>Y</flag_bookable_property>
    <flag_breakfast_included>N</flag_breakfast_included>
    <affiliate_message/>
    <cancellation_message>A cancellation period of 5 days applies</cancellation_message>
    <cancellation_days>5</cancellation_days>
    <payment_notice/>
    <propertyimportantpoints/>
  </property>
</response>

Property Details

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/propertydetail.aspx @~/xml/property_detail_input.xml

Request XML input example:

<request>
	<username>username</username>
	<password>password</password>
	<propertyid>1394</propertyid>
</request>

Response XML example:

<?xml version="1.0"?>
<response>
  <property id="1394">
    <name>Citadines Barcelona Ramblas</name>
    <image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34900</image_url>
    <country>Spain</country>
    <location>La Rambla</location>
    <city_region>Barcelona</city_region>
    <checkin_time>2:00PM</checkin_time>
    <checkout_time>12:00PM</checkout_time>
    <phone>111111111</phone>
    <fax>2222222</fax>
    <email>reservations@mansleyapartments.com</email>
    <postalcode>08002</postalcode>
    <rooms>131</rooms>
    <flag_breakfast_included>N</flag_breakfast_included>
    <cancellation_message>A cancellation period of 5 days applies</cancellation_message>
    <cancellation_days>5</cancellation_days>
    <our_rating>
      <our_rating_value>9</our_rating_value>
      <our_rating_description>SUPERIOR</our_rating_description>
    </our_rating>
    <customer_rating/>
    <property_description> Citadines Barcelona Ramblas offers 131 apartments in 2 wings with Studios for 2 people having either a double or twin beds and the 1 bedroom apartments for up to 4 people having a sofa or pullout beds in the lounge and either a a double or twin beds in the bedroom.  All Apartments are air-conditioned and have a well fitted kitchenette. Tea and coffee are provided. 

In 2013 the property was renovated in Mediterranean contemporary style to give you better comfort.

The location is excellent for visiting all the main landmarkes and attractions of one of Europes finest cities. 

Maid service is done on a weekly basis. If you are staying for 7 nights or more then it is done during the middle of the stay. If you are staying for less than 7 nights then you pay directly at the property for additional maid service.

Breakfast available, payable to the property.

City Tax which is not included in the rate and is approx 0.72 per person per night, this is payable direct to the property.

Nearest public transport.
Airport : El Prat (20 minutes by car).
Underground : Station Plaa de Catalunya (5 minutes on foot).
Taxi : front of the Apart'hotel.





</property_description>
    <accommodations>
      <accommodation_type id="-1">
        <accommodation_name>All</accommodation_name>
      </accommodation_type>
      <accommodation_type id="95">
        <accommodation_name>1-Bedroom</accommodation_name>
      </accommodation_type>
    </accommodations>
    <beddingconfigurations/>
    <property_accommodations>
      <accommodation_type id="95">
        <accommodation_name>1-Bedroom</accommodation_name>
        <property_accommodation id="8368">
          <property_accommodation_name>1 Bedroom</property_accommodation_name>
        </property_accommodation>
        <property_accommodation id="10614">
          <property_accommodation_name>1-Bedroom apartment</property_accommodation_name>
        </property_accommodation>
        <property_accommodation id="10612">
          <property_accommodation_name>Classic Room</property_accommodation_name>
        </property_accommodation>
        <property_accommodation id="8367">
          <property_accommodation_name>Studio</property_accommodation_name>
        </property_accommodation>
        <property_accommodation id="10613">
          <property_accommodation_name>Studio</property_accommodation_name>
        </property_accommodation>
      </accommodation_type>
    </property_accommodations>
    <propertyimportantpoints/>
    <facility_services>
      <facility_service>24 Hour Reception/Concierge</facility_service>
      <facility_service>Air-Conditioning/Cooling</facility_service>
      <facility_service>Baby Amenities</facility_service>
      <facility_service>Babysitting (On Request)</facility_service>
      <facility_service>Bathroom Welcome Pack</facility_service>
      <facility_service>Breakfast Room</facility_service>
      <facility_service>Burners / Hobs</facility_service>
      <facility_service>Business Facilities</facility_service>
      <facility_service>Coffee Maker</facility_service>
      <facility_service>Coffee Shop Nearby</facility_service>
      <facility_service>Deposit Box</facility_service>
      <facility_service>Digital TV</facility_service>
      <facility_service>Direct Dial Telephone</facility_service>
      <facility_service>Dishwasher</facility_service>
      <facility_service>Dry Cleaning (Extra Cost)</facility_service>
      <facility_service>Fridge / Freezer</facility_service>
      <facility_service>Garage</facility_service>
      <facility_service>Hairdryer</facility_service>
      <facility_service>Iron and Ironing Board</facility_service>
      <facility_service>Kettle</facility_service>
      <facility_service>Laundry Facilities On-Site</facility_service>
      <facility_service>Lift</facility_service>
      <facility_service>Maid Service Weekly</facility_service>
      <facility_service>Microwave </facility_service>
      <facility_service>Parking On-Site</facility_service>
      <facility_service>Pets Allowed (Extra Cost)</facility_service>
      <facility_service>Restaurant Nearby</facility_service>
      <facility_service>Room Safe</facility_service>
      <facility_service>Supermarket Nearby</facility_service>
      <facility_service>Toaster</facility_service>
      <facility_service>WIFI Free of Charge</facility_service>
    </facility_services>
    <local_attractions>
      <local_attraction>The Old Gothic Quarter</local_attraction>
      <local_attraction>Miro Museum</local_attraction>
      <local_attraction>The Cathedral</local_attraction>
      <local_attraction>Ramblas</local_attraction>
      <local_attraction>Olympic Stadium</local_attraction>
      <local_attraction>Plaa Catalunya</local_attraction>
      <local_attraction>Picasso Museum</local_attraction>
      <local_attraction>Sagrada Familia</local_attraction>
      <local_attraction>Gaudi's unfinished cathedral</local_attraction>
      <local_attraction>Ciutadella Park. </local_attraction>
    </local_attractions>
    <image_gallery>
      <image>
        <title>1 Bedroom </title>
        <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34888</thumbnail_image_url>
        <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34890</large_image_url>
      </image>
      <image>
        <title>1 Bedroom </title>
        <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34892</thumbnail_image_url>
        <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34894</large_image_url>
      </image>
      <image>
        <title>Studio </title>
        <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34896</thumbnail_image_url>
        <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34898</large_image_url>
      </image>
      <image>
        <title>Studio </title>
        <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34900</thumbnail_image_url>
        <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=34902</large_image_url>
      </image>
      <image>
        <title>Terrace</title>
        <thumbnail_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39840</thumbnail_image_url>
        <large_image_url>http://staging.servicedapartmentsworldwide.net/ImageHandler.jpg?ImageInstanceId=39842</large_image_url>
      </image>
    </image_gallery>
    <map_location>
      <latitude>41.38386</latitude>
      <longitude>2.17133</longitude>
      <full_address>Address1 Address2 Barcelona Spain</full_address>
    </map_location>
  </property>
</response>

Booking

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/propertybooking.aspx @~/xml/1_property_booking_input.xml

Request XML input example:

<request>
  <username>username</username>
  <password>password</password>
  <propertyid>1850</propertyid>
  <currency_code>EUR</currency_code>
  <check_in>21/07/2016</check_in>
  <check_out>22/07/2016</check_out>
  
  <customer_detail>
    <first_name>Ruslan</first_name>
    <last_name>Sharipov</last_name>
    <phone>+79618492980</phone>
    <email>sharipov.reg@gmail.com</email>
  </customer_detail>

  <apartments>
    <property_accommodation>
      <property_accommodationid>9733</property_accommodationid>
      <number_of_guests>1</number_of_guests>
      <guest_first_name>Ruslan</guest_first_name>
      <guest_last_name>Sharipov</guest_last_name>
    </property_accommodation>
  </apartments>
  <flag_paylater>Y</flag_paylater>
</request>

Response XML example:

<?xml version="1.0" encoding="utf-8"?>                                                                                                               [129/335]
<response>
    <booking_ref_number>MTA66653</booking_ref_number>
    <affiliate_booking_ref_number />
    <status>Booked</status>
    <booking_type>Booking Confirmation</booking_type>
    <booking_message>Thank you for booking your accommodation with us, we always endeavour to give the best service possible.</booking_message>
    <booking_pending_message />
    <currency_note />
    <paylater_note />
    <customer>
        <first_name>Ruslan</first_name>
        <last_name>Sharipov</last_name>
        <phone>+79618492980</phone>
        <email>sharipov.reg@gmail.com</email>
    </customer>
    <arrival_detail>
        <arrival_time />
        <airline />
        <flight_number />
    </arrival_detail>
    <property_detail>
        <property_name>Adagio Brussels Centre Monnaie</property_name>
        <address1>Address1</address1>
        <address2>Address2</address2>
        <city_region>Brussels</city_region>
        <state_county />
        <postalcode>1000</postalcode>
        <checkin>21/07/2016</checkin>
        <checkout>22/07/2016</checkout>
        <nights>1</nights>
        <currency_code>EUR</currency_code>
        <flag_breakfast_included>N</flag_breakfast_included>
        <apartments>
            <property_accommodation>
                <property_accommodation_name>Studio 2 people </property_accommodation_name>
                <number_of_guest>1</number_of_guest>                                                                                                  
                <bed_type />
                <guest_first_name>Ruslan</guest_first_name>
                <guest_last_name>Sharipov</guest_last_name>
                <special_requirements />
                <line_items>
                    <line_item>
                        <line_item_type>Average Nightly Net Rate</line_item_type>
                        <price>84.15</price>
                    </line_item>
                    <line_item>
                        <line_item_type>Sum of Nightly Net Rate</line_item_type>
                        <price>84.15</price>
                    </line_item>
                </line_items>
                <price>84.15</price>
                <rate_plans>
                    <rate_plan_code />
                    <condition_type />
                    <cancellation_policies />
                    <booking_rules>
                        <advanced_booking_days>
                            <min_advanced_booking_days />
                            <max_advanced_booking_days />
                        </advanced_booking_days>
                        <lengths_of_stay>
                            <min_length_of_stay>1</min_length_of_stay>
                            <max_length_of_stay />
                        </lengths_of_stay>
                    </booking_rules>
                </rate_plans>
            </property_accommodation>
            <price>84.15</price>
        </apartments>
    </property_detail>
</response>

Cancellation

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/propertybooking.aspx @~/xml/1_property_booking_input.xml

Request XML input example:

<request>
  <username>username</username>
  <password>password</password>
  <booking_ref_number>MTA66653</booking_ref_number>
</request> 

Response XML example (fail):

<?xml version="1.0" encoding="utf-8"?>
<response>
    <errors>
        <error>
            <code>9008</code>
            <description>Booking cancellation is not allowed for this booking.</description>
        </error>
    </errors>
</response>

Response XML example (success):

<?xml version="1.0" encoding="utf-8"?>
<response>
    <booking_ref_number>MTA66654</booking_ref_number>
    <affiliate_booking_ref_number />
    <property_name>Adagio Brussels Centre Monnaie</property_name>
    <address1>Address1</address1>
    <address2>Address2</address2>
    <city_region>Brussels</city_region>
    <statecounty />
    <postalcode>1000</postalcode>
    <check_in>21/07/2016</check_in>
    <check_out>22/07/2016</check_out>
    <nights>1</nights>
    <apartments>
        <property_accommodation>
            <property_accommodation_name>Studio 2 people </property_accommodation_name>
            <number_of_guest>1</number_of_guest>
        </property_accommodation>
    </apartments>
</response>

Booking list

Request example:

http POST http://staging.servicedapartmentsworldwide.net/xml/bookinglist.aspx @~/xml/1_booking_list.xml

Request XML input example:

<request>
    <username>vincent@roomorama.com</username>
    <password>roomorama@25</password>
    <booking_from_date>10/07/2016</booking_from_date>
    <booking_to_date>11/07/2016</booking_to_date>
</request>

Response XML example (fail):

<?xml version="1.0" encoding="utf-8"?>
<response>
    <errors>
        <error>
            <code>10011</code>
            <description>No booking records are available for the given date range.</description>
        </error>
    </errors>
</response>

Response XML example (success):

<?xml version="1.0" encoding="utf-8"?>
<response>
    <bookings>
        <booking>
            <booking_ref_number>MTA66654</booking_ref_number>
            <affiliate_booking_ref_number />
            <status>Cancelled</status>
            <check_in>21/07/2016</check_in>
            <check_out>22/07/2016</check_out>
            <property_name>Adagio Brussels Centre Monnaie</property_name>
            <first_name>Ruslan</first_name>
            <last_name>Sharipov</last_name>
            <flag_breakfast_included>N</flag_breakfast_included>
        </booking>
        <booking>
            <booking_ref_number>MTA66653</booking_ref_number>
            <affiliate_booking_ref_number />
            <status>Booked</status>
            <check_in>21/07/2016</check_in>
            <check_out>22/07/2016</check_out>
            <property_name>Adagio Brussels Centre Monnaie</property_name>
            <first_name>Ruslan</first_name>
            <last_name>Sharipov</last_name>
            <flag_breakfast_included>N</flag_breakfast_included>
        </booking>
    <bookings>
<response>