Main Web API Documentation Information
Actual Page/Function Name:
addQuoteLineItem
Human Readable Name or Caption:
Add Quote Line Item
Page/Function Description:
This method will add a line item to quote.
Page/Function Output Type:
API - JSON or WDDX
Categories:
eComm,quote
Extra Page/Function Notes:


Parameters
Scope Name Type Default Description Required Alternates Known Values
Arguments CITY_TAX Numeric 0 Pass in the city tax for the line item. As a note, there are numerous tax fields. Please check to see what way your corp wants to account for them. There are city, state, county, and five custom fields for taxes. No
Arguments CORP_ID Numeric 0 Pass in the corp id number. This is your corporation ID or your business world number. This is required and will be validated. The default is 0, but will be checked for a real number. Yes
Arguments COUNTY_TAX Numeric 0 Pass in the county tax. No
Arguments DISCOUNT_CAMPAIGN String Pass in the discount campaign name, if any. A discount campaign is used in coordination with the discount rate. This is used to record notes on why a discount was done- a specific marketing campaign, a sale, or a category of discounts. Examples: 4th of July sale, Black Friday, Big Summer Blowout, Veteran, VIP, Friends and Family discount, etc. No
Arguments IN_LINE_DISCOUNT_EXTENDED Numeric 0 Pass in the extended dollar amount of the discount. This is the total dollars to take off. No
Arguments IN_LINE_DISCOUNT_PER_LINE Numeric 0 Pass in the dollar amount of the discount per single item. This does not take the quantity into effect. No
Arguments IN_LINE_DISCOUNT_PERCENTAGE Numeric 0 Pass in the discount percentage as a number. This needs to be somewhere between 0 and 100. Ex: 12.00, 27, 45.99. No
Arguments ITEM_COST Numeric 0 Pass in the item cost. This is what the company paid for the item. As a side note, this value gets included in the P&L (profit and loss), cost of goods sold, and other financials within the system. It is very important for it to be correct. Also as a note, this is per item- it will be cascaded later on when it gets multiplied by a quantity. Yes
Arguments ITEM_PRICE Numeric 0 Pass in the item price. This is the main sales price for a single item. This value will be multiplied by the quantity and then goes to the P&L in the revenue portion. If a discount is used, it actually needs to be reflected in this item price. There is another field called original list price where you can put the original value. Yes
Arguments LINE_DESCRIPTION String Pass in the line description. There is a maximum of 255 characters. Yes
Arguments LINE_QUANTITY Numeric 0 Pass in the quantity. This will be multiplied by the price and entered into the database. Pass in a positive value for a sale and a negative value for a return. However many you sold is usually a positive number. Yes
Arguments LINE_SHOW Numeric 1 Pass in a 1 for show and 0 for hide. If a value is hidden (0), it can't have a price or extended price. It can still have a quantity and a cost. Otherwise it messes up the math. Yes
Arguments ORIGINAL_LIST_PRICE Numeric 0 Pass in the original list price before a discount is applied. This will be the same as the normal price unless discounts are being applied. This is for a single item. Yes
Arguments ORIGINAL_LIST_PRICE_EXTENDED Numeric 0 Pass in the original list price times the quantity before a discount is applied. Yes
Arguments OTHER_TAX_1 Numeric 0 Pass in the other tax 1 amount. These are custom and set per location. No
Arguments OTHER_TAX_2 Numeric 0 Pass in the other tax 2 amount. These are custom and set per location. No
Arguments OTHER_TAX_3 Numeric 0 Pass in the other tax 3 amount. These are custom and set per location. No
Arguments OTHER_TAX_4 Numeric 0 Pass in the other tax 4 amount. These are custom and set per location. No
Arguments OTHER_TAX_5 Numeric 0 Pass in the other tax 5 amount. These are custom and set per location. No
Arguments OUT_OF_AREA_TAX Numeric 0 Pass in the out of area tax. This particular tax is a special one for bigger items like stock units. Some counties have special rules for where you buy it vs. where you register it. No
Arguments PART_ID Numeric 0 Pass in the part id number. This is the system-assigned auto id number for the item or part. This is very important; it's how the whole line item gets tied in and is the purpose for adding the line item. This number ties it to the correct inventory item. Yes
Arguments PART_NUMBER String Pass in the part number. This is the user-assigned or the human readable number for an item. This is how people can look items up. This should match the same case and spelling. Yes
Arguments QUOTE_NUMBER Numeric 0 Pass in the quote number. This is one of the keys that ties things together. Yes
Arguments STATE_TAX Numeric 0 Pass in the state tax. As a note, there are numerous tax fields. Please check to see what way your corp wants to account for them. There are city, state, county, and five custom fields for taxes. As a side note, internally if there is a rounding error, it is shown and passed into this column. No
Arguments STOCK Numeric 0 Pass in a stock number if applicable. Use 0 if not applicable. As a note, a stock unit is a big ticket item like a vehicle, trailer, house, gun, or some other serialized item. No
Arguments STORE_ID Numeric 0 Pass in the store or location id number. This value is corporation specific and can be looked up by going to the getGeneralLookupValues method. You'll be looking for the QRY_LOCATION_INFO_ARRAY data. This is a huge part of how we track quantities per location. If you have multiple locations, this is extremely important. Yes
Arguments SUB Numeric 0 Pass in the sub inventory id number. Use 0 if unknown. A sub id number is basically a batch or a package id from within the system. If left at 0, we will be using parent inventory. If the sub is defined, we will pull the item from that particular sub. Yes
Arguments TAX_CATEGORY_ID Numeric 2 Pass in the tax category id number. Default is 2 (2=taxable). These id numbers can be found by using the getLookUpValues method. Make sure to pass in the table name as tax_categories. As a side note, if you're using With Tax Included, make sure that it gets flipped to a normal taxable value here on the invoice line items. Basically, the With Tax Included setting is only used to figure out the taxes, and then it is set as physical taxable for database storage. The method used to calculate taxes is calculateTaxes. Yes
Arguments USE_IN_LINE_DISCOUNT Numeric 0 Pass in a 1 for yes and a 0 for no. No
Arguments VENDOR_PAYEE_ID Numeric 0 Pass in the vendor id number. This is the vendor id number that's tied to the specific part or item number. This is required for database look ups later on. Vendor information can be found from other part number look ups. Yes


Results
RET_STATUS RET_MAIN_MESSAGE RET_SECOND_MESSAGE Redirect Link Description
ok Successfully added the line item to the quote. Where can we take you? [interactive map] [classic homepage] [start a new cart] [my quotes] [quote homepage] This assumes that everything went well.
dataIn Unable to add the quote line item. Missing some data. Use your back button and try again. This is returned if the corp id, part id, quote number, store id, or vendor payee id arguments are not found.
db Unable to connect to the database. The line item was not added to the quote. Use your back button and try again. This is returned if there was an error in inserting values such as city tax, corp id, county tax, in line discount percentage, item cost, line description, line quantity, other tax 1, part id, state tax, etc.


Samples
Caption Text
JSON
{"API_CALL_FUNCTION_NAME":"addQuoteLineItem","CORP_ID":53,"PART_ID":49573,"STORE_ID":178,"VENDOR_PAYEE_ID":1821,"QUOTE_NUMBER":41,"TAX_CATEGORY_ID":2,"CITY_TAX":0.01,"COUNTY_TAX":0.01,"DISCOUNT_CAMPAIGN":"discount","INLINE_DISCOUNT_EXTENDED":2,"INLINE_DISCOUNT_PER_LINE":1,"INLINE_DISCOUNT_PERCENTAGE":50,"ITEM_COST":1,"ITEM_PRICE":1,"LINE_DESCRIPTION":"Hello","LINE_QUANTITY":3,"LINE_SHOW":1,"ORIGINAL_LIST_PRICE":2,"ORIGINAL_LIST_PRICE_EXTENDED":2.05,"OTHER_TAX_1":0.01,"OTHER_TAX_2":0.01,"OTHER_TAX_3":0.01,"OTHER_TAX_4":0.01,"OTHER_TAX_5":0.01,"OUT_OF_AREA_TAX":0.01,"PART_NUMBER":13,"STATE_TAX":0.01,"STOCK":2,"USE_INLINE_DISCOUNT":1,"API_CORP_KEY_ID":"PLA-0053","API_USER_NAME":"demo","API_USER_PASSWORD":"1234","API_CURRENT_PAYEE_ID":"3","API_INPUT_OUTPUT_TYPE":"JSON","API_URL_ENCODING":"AUTO"}