als_insert_block_def.cgi

Top  Previous  Next

Description

The als_insert_block_def.cgi interface inserts a new block. Upon a successful execution of this method the block definition will be returned using the format of als_get_block_defs.cgi and will contain the new block:Integer that can be used to update the definition using als_update_block_def.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:

 

product
startdate
enddate
quantity
blocktime

 

The following fields have the default value of Boolean = true if no optional values are passed to the method.

 

active,sun,mon,tue,wed,thu,fri,sat

 

The following fields have the default values of Boolean= False if no optional values are passed to the method

autofax , autoemail

 

Example Usage          

 

http://host/als_insert_block_def.cgi?product=1565&startdate=2005-12-01&enddate=2005-12-31&quantity=2&blocktime=10:00&webusercode=1

 

 

Inputs

Parameter

Description

Required

Example

Data Type

webusercode

Code from WiUsers required for insert access

 

Required

webusercode=5

Integer

product

Product code

Required

product=1565

Integer

startdate

 

Required

startdate=2005-11-01

date

enddate

 

Required

enddate=2005-11-30

date

quantity

 

Required

quantity=2

Integer

blocktime

 

Required

blocktime=16:00

Time

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 insert a call to als_get_block_defs.cgi is executed that includes the newly created block identifier.

 

<?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>