als_update_block_def.cgi

Top  Previous  Next

Description

The als_update_block_def.cgi interface  updates a block definition. Upon a successful execution of this method the block definition will be returned using the format of als_get_block_defs.cgi.

 

Note:This is a powerful call with little or no error checking so it is up to you to make sure that you understand the ways blocks work in AL-Desk and the data you are inserting makes sense for your application.

 

As is normal for all Put calls a valid webusercode is required along with the following fields:

 

The unique key of block:Integer is required to use this method.

 

Example Usage          

[****]

http://www.alstracker.dnsalias.com/aldesk/als_update_block_def.cgi?block=33&email=sgarland@astatech.com&webusercode=1

 

 

Inputs

Parameter

Description

Required

Example

Data Type

webusercode

Code from WiUsers required for insert access

 

Required

webusercode=5

Integer

block

block code

Required

block=23

Integer

startdate

Start date of the Block

Optional

startdate=2005-11-01

date

enddate

End Date of the block

Optional

enddate=2005-11-30

date

quantity

Number of Seats

Optional

quantity=2

Integer

blocktime

Time of the Block

Optional

blocktime=16:00

Time

product

product code. It would not be normal practise to change the product code.

 

Optional

product=4333

Integer

sun

Active on sunday

Optional

sun=false

 

 

Boolean

mon

Active on Monday

Optional

mon=true

Boolean

tue

Active on Tuesday

Optional

tues=true

Boolean

wed

Active on Wednesday

Optional

wed=true

Boolean

thu

Active on Thursday

Optional

thu=true

Boolean

fri

Active on friday

Optional

fri=true

Boolean

sat

Active on Saturday

Required

sat=false

Integer

active

Block Def is Active

Optional

active=true

Boolean

releasedays

Number of Days until release to calculate block availability

 

Optional

releasedays=1

Integer

releasetime

Release time used to calculate avialability

 

Optional

releasetime=09:000

Time

autofax

Auto Fax Upon Release

Optional

autofax=false

Boolean

faxno

Fax Number to use

Optional

faxno=808-233-2233

String

notes

Free Text Note Field

Optional

notes=lots of options

String

email

email address to be used for notification

Optional

email=name@host.com

String

autoemail

AutoEmail or not

Optional

autoemail=false

Boolean

emailccto

CC for auto email

Optional

emailccto=host@email.com

String

sequenceorder

Sort Order for AL-Desk

Optional

sequenceorder=1

Integer

 

 

Returned Fields

#

Field Name

Description

Data Type

1

block

AL-Desk Associated Code

Integer

 

 

 

 

 

XML Example

Upon a successful update a call to als_get_block_defs.cgi is executed that includes all the fields.

 

 

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

- <root>

- <blockdefs>

<row block="33" vendor="2" product="1565" startdate="12/1/2005" enddate="12/31/2005" sun="True" mon="True" tue="True" wed="True" thu="True" fri="True" sat="True" quantity="2" active="True" releasedays="" releasetime="" autofax="False" faxno="" blocktime="10:00:00 AM" notes="" problock="False" email="" autoemail="False" lastemailsent="" emailccto="" sequenceorder="" lastupdatedon="11/18/2005 8:32:07 AM" />

</blockdefs>

</root>