als_insert_product.cgi

Top  Previous  Next

Description

The als_insert_product.cgi interface adds a new product to the product list. Upon a successful execution of this method the product definition will be returned along with a unique identifier (code) that can be used to change the product definition via als_update.product.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 any ramification on product pricing, sales tax and reporting

 

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

 

Name
Vendor
Location
ProdCat

 

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

 

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

- <error> 

- <row> 

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

</row> 

</error>

 

Example Usage          

[****]

http://www.alstracker.dnsalias.com/aldesk/als_insert_product.cgi?vendor=1&webusercode=1&name=spencer&prodcat=2&location=3

 

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

vendor

Vendor Code

Required

vendor=32

Integer

prodcat

Category Code

Required

prodcat=3

Integer

name

Name of the product

Required

name=Jet Ski Morning

String

active

Product is Active

Optional

active=true

boolean

description

Description of Product

Optional

description=This describes the product

String

usespickup

Uses a pickup

Optional


Boolean

vouchernotes

Will print on Vouchers

Optional


String

trantype

Transaction Type on voucher

 

Optional


Integer

timevalue

Time

Optional


Time

taxrate

Tax Rate

Optional


Float

webjpglocation

URL for Image

Optional


String

webexport


Optional


Boolean

useswebinterface

Available for use by the Web Portal API

Optional


Boolean

shortname


Optional


String

sequenceorder


Optional


Integer

checkintime


Optional


Time

NoPremium


Optional


Boolean

agentnotes


Optional


String

bookonlyonblock


Optional


Boolean

groupcode

Group Code

Optional


Integer

nopremium


Optional


Integer

 

 

Returned Fields

#

Field Name

Description

Data Type

1

code

AL-Desk Associated Code

Integer

 

 

 

 

 

XML Example

Upon a successful call to als_insert_product.cgi all fields available will be returned.

 

 

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

- <root>

- <products>

<row code="1" vendor="1" name="Hana/Haleakala- A Star" prodcat="7" location="3" description="45 min flight - Haleakala Crater, Seven Pools, Hana, Rainforest, Waterfalls! Wear Dark Colored Shirt and sunglasses. Check in at heliport 30 mins prior to flight." vouchernotes="some note" timevalue="" checkintime="8:00:00 AM" nopremium="False" agentcomm="" groupcode="0" active="True" taxrate="" commrate="" taxcommstat="" newcommrate="" newcommratedate="" ckinminutesprior="" servicechargestate="" shortname="" preferred="False" serviceonly="False" usespickup="False" agentnotes="" sequenceorder="0" bookonlyonblock="False" beachscuba="False" beachsections="" webexport="True" rental="False" turnaroundhours="" renttimeout="" renttimein="" trantype="1" cantour="True" retailrental="False" nobookingsafter="" useswebinterface="True" webjpglocation="http://www.alstracker.dnsalias.com/aldesk/images/test.jpg" giftingmethod="" lastupdatedon="11/22/2005 4:29:28 AM" />

</products>

</root>