4.3 ww.dll API Reference : API descriptions : Functions with database access : getdciavail
 
getdciavail
 
Description
getdciavail finds available booking times for Private Instruction module.
 
Example:
<func>getdciavail</func><dcilist>privates,skiing,2hrpriv;privates,
skiing,4hrpriv</dcilist><start_time>03/12/2007 9:00 AM</start_time>
<end_time>03/12/2007 2:00 PM</end_time>
<instructor>swilson</instructor>

What gets returned is a list of DCIs, qty_rem and book_times. The list of DCIs is the same as what gets passed in for the call, the qty_rem returned is the number of slots available during the timeframe set by the start and end times and the book_times are the start times that are available. The qty_rem numbers returned take into account lesson type Max4Sale limits and what’s already been booked into these limits. DCI Max4Sale limits enter into this in that if a DCI Max4Sale limit is less than the lesson type Max4Sale and the DCI Max4Sale limit has been used up, and then the qty_rem returned is empty. So the number returned to qty_rem reflects the lesson type Max4Sale remaining until the DCI Max4Sale limit has been used up.
Input fields
 
XML tag
Description
<dcilist>
List of DCIs using commas to separate the department from category and category from item and using a semicolon to separate complete DCIs.
<start_time>
Defines the period to examine.
<end_time>
Defines the period to examine.
<instructor>
Optional. Instructor.
 
Return fields
 
Field
Description
department
Department.
category
Category.
item
Item.
descrip
Description.
ckmax4sale
Check Max4Sale capability.
ckpts4sale
Check Points4Sale capability.
pts4saledp
Pts4Sale Dynamic Pricing Rule.
qty_rem
Quantity remaining.
book_times
Booking times.
span
Time span.
book_prefs
Booking preferences.
startimes
Start times.
startime1
Start time 1.
startime2
Start time 2.
startime3
Start time 3.
startime4
Start time 4.
startime5
Start time 5.
startime6
Start time 6.
startime7
Start time 7.
startime8
Start time 8.
startime9
Start time 9.
startime10
Start time 10.
 
Example
 
Example invocation:
<func>getdciavail</func><dcilist>LSSNS-PRIV,ALPINE,2HOUR</dcilist>
<start_time>11/06/2007 10:00am</start_time><end_time>11/06/2007 12:00pm</end_time>
 
Example return string:
OK :…recordset
<rs:data>
<z:row department='LSSNS-PRIV' category='ALPINE '
item='2HOUR ' descrip='2 Hour Private Alpline '
ckmax4sale='False' ckpts4sale='False' pts4saledp='0' qty_rem='-, -, -, -, -, -, -, -, -'
book_times='11/06/2007 10:00:00, 11/06/2007 10:15:00, 11/06/2007 10:30:00, 11/06/2007 10:45:00, 11/06/2007 11:00:00, 11/06/2007 11:15:00, 11/06/2007 11:30:00, 11/06/2007 11:45:00, 11/06/2007 12:00:00'
span='120' book_prefs='&#x3c;Pref_Lvl1&#x3e;1&#x3c;/Pref_Lvl1&#x3e;
&#x3c;Pref_Lvl2&#x3e;1&#x3c;/Pref_Lvl2&#x3e;
&#x3c;Pref_Lvl3&#x3e;1&#x3c;/Pref_Lvl3&#x3e;
&#x3c;Pref_Lvl4&#x3e;3&#x3c;/Pref_Lvl4&#x3e;
&#x3c;Pref_Lvl5&#x3e;1&#x3c;/Pref_Lvl5&#x3e;
&#x3c;Pref_Lvl6&#x3e;1&#x3c;/Pref_Lvl6&#x3e;
&#x3c;Pref_Lvl7&#x3e;1&#x3c;/Pref_Lvl7&#x3e;
&#x3c;Pref_Lvl8&#x3e;1&#x3c;/Pref_Lvl8&#x3e;
&#x3c;Pref_Lvl9&#x3e;1&#x3c;/Pref_Lvl9&#x3e;
&#x3c;sex&#x3e;1&#x3c;/sex&#x3e;
&#x3c;Criteria1&#x3e;0&#x3c;/Criteria1&#x3e;
&#x3c;Pref_Lvl10&#x3e;1&#x3c;/Pref_Lvl10&#x3e;
&#x3c;Level&#x3e;0&#x3c;/Level&#x3e;
&#x3c;Criteria6&#x3e;0&#x3c;/Criteria6&#x3e;
&#x3c;Pref_Lvl11&#x3e;1&#x3c;/Pref_Lvl11&#x3e;
&#x3c;Criteria7&#x3e;0&#x3c;/Criteria7&#x3e;
&#x3c;Pref_Lvl12&#x3e;1&#x3c;/Pref_Lvl12&#x3e;
&#x3c;p_level&#x3e;.T.&#x3c;/p_level&#x3e;
&#x3c;DisciplineOption&#x3e;1&#x3c;/DisciplineOption&#x3e;
' startimes='False' startime1=' ' startime2=' '
startime3=' ' startime4=' ' startime5=' '
startime6=' ' startime7=' ' startime8=' '
startime9=' ' startime10=' '/>
</rs:data>
 
See also
newbooking