AcuWeb API: Price Command

Jack Simpson

Head of Marketing and Communications

Lorem ipsum et cetera

As yesterday I only covered one command, I’ll cover two today instead.  So far I’ve covered two commands, the Search  and Property commands, today I will be focusing on the Price command. The price command a more detailed breakdown of a properties price than the Search command provides, as well as detailing its extras. These extras can include both optional and compulsory extras.

The price command operates in essentially two modes. You must provide the command the following mandatory parameters:

· PropertyCode – The properties code
· Date – The date of the stay to query the price for.
· Nights –The number of nights for the stay

You may also optionally provide the Ages parameter, which is a comma delimited list of ages of the passengers to price the stay for.

These parameters can be sent via either querystring or XML. An example querystring is shown below.


And it’s equivalent XML version is shown below, this should be sent to Price.aspx.

   1: <Price>

   2:   <PropertyCode>LC5PropertyCode>

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

   4:   <Nights>7Nights>

   5:   <Ages>30,30Ages>

   6: Price>

The response for the Price command will always return the same structure, an example price command response is displayed below.

   1: <Price>

   2:   <BookingLink>Booking.aspx?PropertyCode=LC5&Date=2009-08-01&Nights=7BookingLink>

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

   4:   <PropertyCode>LC5PropertyCode>

   5:   <PropertyName>The PenthousePropertyName>

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

   7:   <Nights>7Nights>

   8:   <Price>1525.00Price>

   9:   <Total>1625.00Total>

  10:   <Deposit>508.33Deposit>

  11:   <CCPercent>0.00CCPercent>

  12:   <OfflinePayment>FalseOfflinePayment>

  13:   <AcceptedCards>mc*, visa*, amex*, delta, electron, maestro, soloAcceptedCards>

  14:   <BalanceDueDate>2009-06-20BalanceDueDate>

  15:   <Availability>AAvailability>

  16:   <Extras>

  17:     <Extra>

  18:       <Code>SDEPCode>

  19:       <Name>Security DepositName>

  20:       <MaxQuantity>0MaxQuantity>

  21:       <Compulsory>TrueCompulsory>

  22:       <Quantity>1Quantity>

  23:       <Price>100.00Price>

  24:     Extra>

  25:     <Extra>

  26:       <Code>PETCode>

  27:       <Name>PETName>

  28:       <MaxQuantity>1MaxQuantity>

  29:       <Compulsory>FalseCompulsory>

  30:       <Quantity>0Quantity>

  31:       <Price>25.00Price>

  32:     Extra>

  33:     <Extra>

  34:       <Code>COTCode>

  35:       <Name>Travel CotName>

  36:       <MaxQuantity>0MaxQuantity>

  37:       <Compulsory>FalseCompulsory>

  38:       <Quantity>0Quantity>

  39:       <Price>20.00Price>

  40:     Extra>

  41:   Extras>

  42: Price>

The BookingLink and PropertyLink nodes contain the REST links for other steps in the booking process for this property. Additional unit information is then listed, as well as detailed pricing information and details on the payment related configuration settings for website, for example the accepted credit/debit cards. In addition the current status of availability is returned, indicating if the property has been booked for these days since the initial search.

The final section, the “…” XML block contains all extras for the unit, include the maximum quantity allowed, the amount currently included in the total price displayed, and whether the extras is compulsory or not. Compulsory extras will always be included in the pricing routine.

Providing only the parameters listed so far will price the stay including compulsory extras only. All the property extras will be returned, and the compulsory extras will be included automatically. If additional extras are required in the price, then the option XML block can be used, this must be passed via the XML POST method. The original parameters can still be passed via the querystring, but the Extras XML must be sent via POST.

   1: <Price>

   2:   <Extras>

   3:     <Extra>

   4:       <Code>PETCode>

   5:       <Quantity>1Quantity>

   6:     Extra>

   7:   Extras>

   8: Price>

XML block, with other parameters sent via querystring using the url:

   1: <Price>

   2:   <PropertyCode>LC5PropertyCode>

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

   4:   <Nights>7Nights>

   5:   <Ages>30,30Ages>

   6:   <Extras>

   7:     <Extra>

   8:       <Code>PETCode>

   9:       <Quantity>0Quantity>

  10:     Extra>

  11:   Extras>

  12: Price>

XML block with all parameters sent via XML:

The extras included in the input XML will be added to the compulsory extras and priced in the total price calculations.