Another post about the AcuWeb API, since I missed posting one yesterday there will be two today. The first command I’m going to focus on today is the Property Command, more details about the request/response can be found within the AcuWeb API, but I hope to give a general overview as to how this command can be used. For more details on AcuWeb API and the search message see my previous post.
As with all AcuWeb commands input can be achieved by either XML input via HTTP POST or via the querystring. The property command accepts one parameter, which is mandatory. The PropertyCode parameter controls which property to retrieve details for. The REST URL for this page is:
The equivalent post XML is shown below, this XML should be sent via HTTP POST to the URL Property.aspx.
A list of valid property codes can be obtained using the AcuWeb API command: PropertyList. I’ll be covering this command soon in a future blog post.
Shown below is an example response, the response in some regards is quite similar to the search command, and the two commands have many shared nodes.
The key difference between the two command responses is the “…” section. This contains a list of valid start dates, and the durations which are valid for these dates. If a date/night combination does not appear then it is not a valid stay. As you can see there are two ways of identifying which nights are available, the “nights” attribute gives the specific durations which are available, for example, in the response above on the 16th May 2009, a stay of 3 or 7 nights would be valid, however on the 17th only a stay of 3 nights is valid. Alternatively valid durations can be specified by a combination of the “minNights” and “maxNights” attributes. These identify the range of the nights which are valid for that day. Therefore on the 1st Jan 2010 you could book a stay for anywhere between 3 and 14 nights.
The results retrieved from AcoWin to display these results are filtered to provide only the valid stays, cutting down on the complexity of the results for websites consuming the AcuWeb API. There are some configuration values which will control these, such as the Maximum Nights, if a property has not rules set, then the maximum nights value will default to this configuration value. For more details on the configuration values for the Property Message you should refer to the