|
als_insert_client.cgi |
Top Previous Next |
|
Description The als_insert_client.cgi interface inserts a new client into the AL-Desk Client table. The primary key of the Client table is an Integer field named Code. Upon successful insertion the new data is returned as XML including the unique identifier for the new client.That identifier can be used to update the client row using the als_update_client.cgi method.
Client information includes the optional fields of arrival and departure date. It is common in the travel industry to consider the same clients as new clients when they return for another visit.
You also may want to require arrival and departure dates and check them when users book an activity (write a voucher). Currently the Web Portal API does no error checking when writing a voucher as to whether the arrival and departure date match an activity date.
A valid client code is required to create vouchers.
As is normal for all Put calls a valid webusercode is required.
Client information can be fetched using als_get_client.cgi
All client changes, including inserts and updates are logged so that AL-Desk Audit trail changes are preserved.
Example Usage
http://127.0.0.1/als_insert_client.cgi?webusercode=1&lastname=browningd&email=aaaa@hotmail.com&arrivaldate=2005-05-21&departuredate=2005-05-31&cellphone=12345&faxphone=12361&homephone=43212
Inputs
Returned Fields
XML Example
Note: the important field returned is the code field that contains the unique id for the new client added to the table.
<?xml version="1.0" encoding="utf-8" ?> - <root> - <client> <row code="102815" name="smith, john" firstname="john" lastname="smith" hotel="1" room="102" arrivaldate="11/1/2005" departuredate="11/30/2005" homephone="208.342.7800" notes="added via web interface Hotel:Kaanapali Villas" lastvoucher="0" email="test@hello.com" faxphone="208.389.4643" cellphone="208.890.5859" otherphone="208.861.6841" workphone="208.342.7800" hotelname="Kaanapali Villas" /> </client> </root> |