Acuweb API Progress

Jack Simpson

Head of Marketing and Communications

Those who believe in telekinetics, raise my hand.

We’ve been working hard behind the scenes on AcuWeb and getting it ready to roll out as soon as we can, but a lot of the work so far has been laying the groundwork to support the degree of flexibility to websites and the booking engine that we want to provide. At this stage however, everything’s getting tied together and that initial work on backend is really paying off. This week I plan on giving a quick overview of some of the messages and how they can be accessed to give a better idea on how easy AcuWeb is to use.

Today I’m going to be focusing on the Search message which allows user’s to return property information, I’ll be providing a few examples, touching on the two methods of passing in parameters along with some example output.

Input to AcuWeb can be achieved via two methods, the simplest and the one we advise for most messages is the Querystring REST style URL method. The Xml method can be used for all methods, but it must be used for commands that include secure content, such as payment details. In addition the Xml Method must be used where more complex data must be sent, for example a list of extras and their quantities.  It is possible to combine these two methods so that only certain data is provided in the XML, the rest can be sent via the Querystring.

Method One: Querystring
The easiest way of accessing the API is via the REST style URLs we expose. In the search message all the parameters are optional, if they are not provided then the system will fall back to the configured defaults (see the API Documentation for more details on the message parameters). So the very simplest message call would be:


Which would execute a search command using only default options. Often however you would want to provide parameters to allow the search to be tailored to a user’s request, in which case a common search may look like:


This would execute a search for properties available on the 1st August 2009, for 7 nights, with two adults aged 30. When passing parameters via the querystring the parameter names are not case sensitive, therefore DATE and date refer to the same parameter.

Method Two: Xml
In addition to the querystring method, it is possible to pass in input to a command via XML provided in the request stream. This is required for secure messages such as those that contain Payment data, as the querystring data is never encrypted, it is not safe to provide payment data via this method. An example of a search XML message is provided below.

   1: <Search>

   2:   <Date>2009-08-01Date>

   3:   <Nights>7Nights>

   4:   <Ages>30,30Ages>

   5: Search>

Unlike the querystring method these parameter names are case sensitive, therefore the XML node names must match the names displayed in the AcuWeb API.

It is possible to provide both XML and querystring parameters, if you provide the same parameter name in both the XML and the querystring, then the XML version will take priority.

Once the command has been executed then the results will be returned, an example of the result format is included below. There are some differences from the currently published AcuWeb API, this document will be brought up to date soon.

   1: <Search>

   2:   <Stay>

   3:     <PricingLink>Extras.aspx?PropertyCode=LC5&Date=2009-08-01&Nights=7PricingLink>

   4:     <PropertyLink>Property.aspx?PropertyCode=LC5PropertyLink>

   5:     <PropertyCode>LC5PropertyCode>

   6:     <PropertyName>The PenthousePropertyName>

   7:     <Date>2009-08-01Date>

   8:     <Nights>7Nights>

   9:     <Price currency="GBP">1275.00Price>

  10:     <Availability>AAvailability>

  11:     <Overview>Nice Cottage overlooking the sea.Overview>

  12:     <Attributes>

  13:       <Attribute>

  14:         <Name>BeachName>

  15:         <Operation>=Operation>

  16:         <Value>YValue>

  17:       Attribute>

  18:       <Attribute>

  19:         <Name>AirconName>

  20:         <Operation>=Operation>

  21:         <Value>YValue>

  22:       Attribute>

  23:     Attributes>

  24:     <Notifications>

  25:       <Notification>Please request  the sofa bed for parties greater than 4Notification>

  26:     Notifications>

  27:     <RegionCode>LCRegionCode>

  28:     <SiteCode>CBHSiteCode>

  29:     <PropertyType>HPropertyType>

  30:   Stay>

  31: Search>


In addition, we plan on adding some new nodes soon which will allow web site assets (such as web specific property descriptions as well as images) to be accessed via the AcuWeb API as well.

As you can see from the output nodes, PricingLink and PropertyLink the content of these nodes are two more REST URLs. These URLs will be present for each stay returned by the search command, this means that for each property you already have the code to make the call for the next command in the process.