als_get_rates.cgi

Top  Previous  Next

Description

The get_rates web service will retrieve all Product Rates  and information  about those products i.e.( Vendor, Category, Location ) available to in your system based on if the product  and that are active and web enabled.

 

Pricing is date sensitive in AL-Desk, which allows new pricing to have a Date of Booking and Date of Activity.

 

For convenience, The als_get_rates.cgi supports a date Param (default to today) that sets both Booking and Activity date.

 

bookingdate and activitydate are also supported. 

 

Returned rates include only those for active Products that are tagged for webportal use and also have the rate itself available for use on the web portal returned.

 

 

 

Param Condition

Effect

No date params

bookingdate and activitydate will use today's date

date is used

bookingdate and activitydate will use the value from date

bookingdate only

activitydate will use today's date

activitydate only

bookingdate will use today's date

 

 

Example Usage     http://127.0.0.1/als_get_rates.cgi

 

This method is Content Management Enabled.

 

For product info pages use the productinfo switch to return extended product info for products, useful for use when implementing a shopping cart.

 

http://www.alstracker.dnsalias.com/aldesk/als_get_rates.cgi?product=1&productinfo=true

 

 

Inputs

Parameter

Description

Required

Example

Data Type

Location

Location Code to limit the result set to a specific location

 

See also als_get_locations.cgi for Location Codes

 

Optional

location=5

Integer

Category

Category Code to limit the result set to a specific category

 

See also als_get_categories.cgi for Category Codes

 

Optional

category=2

Integer

Vendor

Vendor to limit the result set to a specific location

 

See also als_get_vendors.cgi for Vendor Codes

 

 

Optional

vendor=4

Integer

Product

Product to limit the result set to a specific location

 

See also als_get_products.cgi

 

When getting rates for a specific product, extended product information can be brought over also using the productinfo param.

 

 

Optional

product=2

Integer

boookingdate

sets the Date of Booking

 

if bookingingdate does not exist then date is used. If neither exists then today's date is used

 

Optional

bookingdate=20050110

 

activitydate

sets the Date of Activity

 

if activitydate does not exist then date is used. If neither exists then today's date is used

 

Optional

activitydate=20050110

 

 

Date

Results limited to booking date and activity date those that are greater and equal to the input date for both booking date and activity  date.

 

If the date is not input then todays date will be used.

 

Optional

date=20050110

 

or

 

date=today

for todays date

Date

productinfo

Brings over rate info for a product as well as extended product info.

 

requires use of the product param as this option is only available for rates for one product

 

 

Optional

productinfo=true

 

Boolean

content

Invokes Content Management data

Optional

content=true

Boolean

wholesale

Adds Wholesale Price to the result set

Optional

wholesale=true

Boolean

 

Returned Fields

#

Field Name

Description

Data Type

1

Code

AL-Desk Associated Code

Integer

2

Product

AL-Desk Associated Code

Integer

3

Vendor

AL-Desk Associated Code

Integer

4

VendorName

Name of the Vendor

String

5

ProductName

Name of the Product

String

6

ProductRateName

Name of the Product Rate

String

7

Seat

Indicates whether this product requires a seat be reserved

Boolean

8

VendorRate

Product Rate + tax

Float

9

Category

AL-Desk Associated Code

Float

10

CategoryName

Name of the Category

String

11

Location

AL-Desk Associated Code

Integer

12

LocationName

Name of the Location

String

 

XML Example

 

http://www.alstracker.dnsalias.com/aldesk/als_get_rates.cgi?product=32

 

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

- <root>

- <rates>

<row code="83" product="32" vendor="4" vendorname="Old Lahaina Luau" productname="Traditional Hawaiian Luau" prodratename="Adult" seat="True" vendorrate="85.42" category="12" categoryname="Luaus" location="3" locationname="Maui" />

<row code="84" product="32" vendor="4" vendorname="Old Lahaina Luau" productname="Traditional Hawaiian Luau" prodratename="Child 2-12" seat="True" vendorrate="54.17" category="12" categoryname="Luaus" location="3" locationname="Maui" />

<row code="85" product="32" vendor="4" vendorname="Old Lahaina Luau" productname="Traditional Hawaiian Luau" prodratename="Infant Under 2 Free" seat="True" vendorrate="0" category="12" categoryname="Luaus" location="3" locationname="Maui" />

</rates>

</root>

 

Below is an example of a multiple XML result set bringing over extended product information and rates 

for a given product

 

http://www.alstracker.dnsalias.com/aldesk/als_get_rates.cgi?product=32&productinfo=true

 

Notices that rates and product are contains in the XML.

 

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

- <root>

- <rates>

<row code="83" prodratename="Adult" seat="True" vendorrate="85.42" />

<row code="84" prodratename="Child 2-12" seat="True" vendorrate="54.17" />

<row code="85" prodratename="Infant Under 2 Free" seat="True" vendorrate="0" />

</rates>

- <products>

<row code="32" vendor="4" vendorname="Old Lahaina Luau" category="12" location="3" locationname="Maui" productname="Traditional Hawaiian Luau" description="An evening at the Old Lahaina Lu'au is an evening of traditional Hawaiian cuisine, music, cultural dances and island crafts. Guests will appreciate a genuine reflection of Hawaii's rich history while enjoying an ocean view and sunset." webjpglocation="http://www.alstracker.dnsalias.com/aldesk/images/test.jpg" vouchernotes="Check-in at 1251 Front St, Lahaina. Dress Casual with light coverup. April 1st - September 30th. Meet at Old Lahaina Luau at 5:45 pm, located at 1251 Front Street. Luau ends at 8:45 pm. October 1st - March 31st. Meet at Old Lahaina Luau at 5:15 pm, located at 1251 Front Street. Luau ends at 8:15 p." categoryname="Luaus" />

</products>

</root>