als_insert_vendor.cgi

Top  Previous  Next

Description

The als_insert_vendor.cgi interface inserts a vendor. Upon a successful execution of this method the all the fields returned from the als_get_vendors.cgi with the extendedinfo=true parameter will be returned along with a code value that is required to be passed to als_update_vendor.cgi as a vendor:integer if you want to change the vendor information.

 

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 way vendor information is stored and managed by AL-Desk.

 

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

 

Required Parameters include

 

Name
Location

 

Note: a check is done for duplicate vendor names when this call is executed and an error will be returned if the vendor name is in use.

 

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

- <error> 

- <row> 

<row error="Vendor Name:[spencer] already exists [code=530]" errorcode="0" /> 

</row> 

</error>

 

Example Usage          

[****]

http://www.alstracker.dnsalias.com/aldesk/als_insert_vendor.cgi?name=spencer&location=3&webusercode=1

 

 

Inputs

Parameter

Description

Required

Example

Data Type

webusercode

Code from WiUsers required for insert access

 

Required

webusercode=5

Integer

location

location code

Required

location=3

Integer

name

Name of the Vendor

Required

name=Carl's Ski Shop

String

address1


Optional


String

address2


Optional


String

city


Optional


String

state


Optional


String

zip


Optional


String

phone


Optional


String

contact


Optional


String

fax


Optional


String

email


Optional


String

notes


Optional


String

taxrate


Optional


Float

webexport


Optional


Boolean

tollnumber


Optional


String

groupcode


Optional


Integer

outputbusiness


Optional


Boolean

phone2


Optional


String

description


Optional


String

imagepath


Optional


String

logopath


Optional


String

contactdate


Optional


Date

contractnote


Optional


String

 

 

Returned Fields

#

Field Name

Description

Data Type

1

 

AL-Desk Associated Code

Integer

 

 

 

 

 

XML Example

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

 

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

- <root>

- <vendors>

<row code="520" name="Germaines Luau" address1="1000 main street" address2="" city="boise" state="id" zip="" phone="333-2121" contact="" fax="" email="ssmith@host.com" notes="my blah blah notes" taxrate="" trantype="1" commrate="" taxcommstat="" newcommrate="" newcommratedate="" ckinminutesprior="" servicechargestate="" location="3" shortname="" insuranceexpirationdate="" allowbookafterexpdate="False" taxrateoverride="False" preferredlevel="" webexport="True" tollnumber="" groupcode="" outofbusiness="False" phone2="" excludefromap="False" description="" imagepath="" logopath="" showgiftdiscount="False" contractdate="" contractnote="" nobookingsafter="" giftingmethod="" />

</vendors>

</root>