4.3 ww.dll API Reference : API descriptions : Functions with database access : createpass
 
createpass
 
Description
createpass is used to create new pass or new access information. It takes the following required parameters: <department>, <category>, <item>. If <access>1</access> is specified, the call creates an access record in the access table. If <access>1</access> is not specified or is set to 0, the call creates a pass record in the gst_pass table. The call takes the following optional parameters: <guest_no>, <start_date>, <expires> and any other fields in the gst_pass and/or access tables
 
Input fields
 
XML tag
Description
<guest_no>
Guest number. Optional if the <access> tag is set to 1 (if used, it is ignored). Required if the <access> tag is set to 0 or the <access> tag is not specified.
<department>
<item> department.
<category>
<item> category.
<item>
Item.
<start_date>
Optional. Start date.
<expires>
Optional. Expiration date.
<access>
Optional. Creates an access record. Boolean.
<other field>
Optional. Any field from the gst_pass or access table.
 
Return fields
 
XML tag
Description
<pass_no>
New pass number.
 
Example
 
Example invocation:
<func>createpass</func><guest_no>26000001</guest_no><start_date>06-07-2007</start_date><department>PASSES</department>
<category>EMPLOYEE</category><item>EMPLOYEE</item>
<amt_paid>399.95</amt_paid><points1>2</points1>
 
To create a new pass record:
 
<func>createpass</func><guest_no>212000000</guest_no<start_date>06-07-2007</start_date><department>PASSES</department<category>ADULTPASS</category><item>2007ADSEAS</item><amt_paid>399.95</amt_paid><points1>2</points1>
To create a new access record:

<func>createpass</func><start_date>06-08-2007</start_date><department>TICKETS</department> <category>ADULTS</category><item>01DYADTKT</item><total_uses>3</total_uses><amt_paid>19.95</amt_paid><access>1</access>
 
Example return string:
OK :<pass_no>1000001</pass_no>
 
See also
createaccess