SHUTTLE2BOOK XML FUNCTIONS

 

            To make operations with Shuttle2Book using Web-Methods, you can access to http://www.shuttle2book.com/wsShuttle/wsShuttle.asmx. This are the functions you can call on wsShuttle class:

 

 

rqAreaShuttle:

 

            Request: nothing.

 

            Response: XML document. It has one tag for each area, with two attributes: value (int) and description (string).

 

Example:

 

Response:

 

<?xml version="1.0" encoding="utf-8"?>

  <response>

<area value="3" description="Mallorca" />

<area value="4" description="Benidorm" />

  </response>

 

 

rqZonesShuttle:

 

            Request: XML document. It has the tag zones and the area (int) attibute.

 

            Response: XML document. It has one tag for each zone, with two attributes: value (int) and description (string). The first attribute has negative value to determine Airport and can have no unique values. This happends because one zone has different descriptions and this function's response is broken down.

 

Example:

 

Request:

 

<?xml version="1.0" encoding="utf-8"?>

  <zones area="3" />

 

Response:

 

<?xml version="1.0" encoding="utf-8"?>

  <response>

<zone value="-1" description="Airport" />

<zone value="1" description="Cala Blanca" />

<zone value="2" description="Magalluf" />

<zone value="2" description="Palma Nova" />

  </response>

 

 

rqPriceShuttle:

 

            Request: XML document. Tag shuttle and sub-tag credentials. The first one has attributes zone (int), date (date), pax (int) and return (int) that represent the search criteria for the price. The pax value is total adults + children number. The return value is 0 for one way and 1 for arrival and departure shuttle transfers. The credentials sub-tag has the attributes user (string) and password (string), wich values are the username and the password of the Shuttle2Book login area.

 

            Response: XML document. The unique attribute is price (decimal) and its value is the price in euros for the search criteria.

 

Example:

 

Request:

 

<?xml version="1.0" encoding="utf-8"?>

  <shuttle zone="1" date="01/01/2007" pax="3" return="0">

      <credentials user="user@alcances2012.com" password="pass" />

  </shuttle>

 

Response:

 

<?xml version="1.0" encoding="utf-8"?>

  <response price="36.0" />

 

 

rqHotelsShuttle:

 

            Request: XML document. It has the tag hotels and two attributes: zone (int) and subzona (string). This values must be same as one of rqZonesShuttle function's response.

 

            Response: XML document. It has one tag for each hotel on this zone, with two attributes: value (int) and description (string).

 

Example:

 

Request:

 

<?xml version="1.0" encoding="utf-8"?>

  <hotels zone="2" subzona="Alcudia" />

 

Response:

 

<?xml version="1.0" encoding="utf-8"?>

  <response>

<hotel value="1" description="Hotel Alcudia" />

<hotel value="46" description="Sol Mirlos" />

  </response>    

 

 

newShuttle:

 

            Request: XML document. It has one main shuttle tag and additional sub-tags. This main tag has attributes hotelid (int), zone (int), pax (int), return (int), area (string) and optional attibute other (string). The pax value is total adults + children number. The return value is 0 for one way and 1 for arrival and departure shuttle transfers. The hotelid value must be one of the value attribute on hotel tag of rqHotelsShuttle function's response, but it can be -1 too if the hotel is not on the list; in that case, it has to be defined on other attribute. The area value must be one of the description attribute on area tag of rqAreaShuttle function's response. The arrival and departure sub-tags have similar attributes and only one of them is requiered, but both can be filled. Only arrival means shuttle transfer from airport to resort; only departure means shuttle transfer from resort to airport; both means return shuttle transfer (return attribute's value 1). Both sub-tags have this attributes: xxxdate (date), xxxtime (time), fcode (string) and acode (string). xxxdate is arrdate for arrival or depdate for departure and its value is the date of the flight (the date flight arrives/departures to/from the resort's airport). xxxtime is arrtime for arrival or deptime for departure and its value is the time of the flight (the time flight arrives/departures to/from the resort's airport). The data sub-tag has name (string), reference (string), adults (int) and notes (string) attributes and children sub-tag. All attributes are required, but reference and notes values are optional (they can be ""). The children sub-tag has number (int) attribute and as many times as its value age sub-tags with value (int) attribute. This represent the children number and their ages. number value + adults value has to be equal pax value. Finally, the credentials sub-tag has the attributes user (string) and password (string), wich values are the username and the password of the Shuttle2Book login area.

 

            Response: XML document. The unique attribute is resnum (string) and its value is the confirmed shuttle transfer reservation number. It always starts with "T" character.

 

Example:

 

Request:

 

<?xml version="1.0" encoding="utf-8"?>

  <shuttle hotelid="652" zone="2" pax="2" return="0" area="Mallorca">

      <arrival arrdate="01/05/2007" arrtime="14:00" fcode="AB9292" acode="LGW" />

      <departure />

      <data name="Mr.Smith" reference="23456" adults="1" notes="">

            <children number="1">

                  <age value="5" />

            </children>

      </data>

      <credentials user="user@alcances2012.com" password="pass" />

  </shuttle>

 

Response:

 

<?xml version="1.0" encoding="utf-8"?>

  <response resnum="T608" />

 

Example (Other):

 

Request:

 

<?xml version="1.0" encoding="utf-8"?>

  <shuttle hotelid="-1" other="Hotel Fulanito" zone="2" pax="2" return="1" area="Mallorca">

      <arrival arrdate="01/05/2007" arrtime="14:00" fcode="AB9292" acode="LGW" />

      <departure depdate="10/05/2007" deptime="16:00" fcode="AB9293" acode="LGW" />

      <data name="Mr.Smith" reference="23456" adults="2" notes="">

            <children number="0" />

      </data>

      <credentials user="user@alcances2012.com" password="pass" />

  </shuttle>

 

Response:

 

<?xml version="1.0" encoding="utf-8"?>

  <response resnum="T608" />

 

 

Error:

 

            If there is any problem or error, all functions will response the same XML document.

 

Response:

 

<?xml version="1.0" encoding="utf-8"?>

  <response>

<error />

  </response>