Main Web API Documentation Information
Actual Page/Function Name:
checkPartsAndStock
Human Readable Name or Caption:
Check Parts And Stock
Page/Function Description:
This method will check a part or stock number to make sure it is ok to add to an invoice.
Page/Function Output Type:
API - JSON or WDDX
Categories:
eComm,parts,stock/unit
Extra Page/Function Notes:
This method is often used to look up additional part number and stock unit details prior to adding them to the cart. Basically, we have minimal info we pass in and it gives us everything else that we don't have.


Parameters
Scope Name Type Default Description Required Alternates Known Values
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 INVOICE_TYPE_ID Numeric 2 Pass in the invoice type id. The default is 2 or a customer invoice. If skipped, the system will pretend that the method is trying to populate a normal customer invoice. This really gets important with invoice type of 6 (transfers). 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 PART_ID Numeric 0 Pass in the part id number, if known. If not known, use 0 as the default. If passed in, this will override the part number (user defined alpha numeric value). Yes
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. Yes
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 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 success
Name Type Description Notes
QRY_CHECK_ITEM_ARRAY Array This is an array that gets the main stock info. This contains information such as the description, engine, miles, status, year, tax category identification, payee information, etc.
QRY_UNIT_PART_ID_ARRAY Array This gets the unit part identification. This grabs information like the part category id, the part id, the tag number, the tax category id, and the unit of measurement relative to the unit part.
QRY_SHIPPING_PART_ID_ARRAY Array This array is populated with the shipping part identification. This contains id such as part category id, part id, tag number, tax category id, and unit of measurement id relative to shipping information.
QRY_D_AND_H_PART_ARRAY Array This array contains the dealing and handling part information. This contains information such as part category id, part id, tag number, tax category id, and unit of measurement relative to the dealer handling fee.
dataIn Unable to add the line item to the cart. Missing some data. Use your back button and try again. This is returned if the corp id, store id, or vendor payee id arguments are not found.
unitPart Unable to find the [number] id number for the unit. Use your back button and try again. This is returned if the part category id, part id, rfid tag number, tax category id, and unit of measurement id fields are empty for the "Unit" part number.
shippingPart Unable to find the [number] id number for the shipping on the unit. Use your back button and try again. This is returned if the part category id, part id, rfid tag number, tax category id, and unit of measurement id fields are empty for the "Shipping" part number.
dAndHPart Unable to find the [number] id number for the dealer handling fee for the unit. Use your back button and try again. This is returned if the part category id, part id, rfid tag number, tax category id, and unit of measurement id fields are empty for the "Dealer Handling Fee" part number.
prepCheck Unable to find the [number] requested. Use your back button and try again. This is returned if the inventory type id, part category id, part id, part status, rfid tag number, unit of measurement id, payee business name, and vendor name fields are empty for the requested main inventory type.
prepCheckStatus The [number] you requested is currently marked with an inactive status. Unable to proceed. The [number] in question is: [number]. We highly recommend that you check the history to see when and who marked this [number] inactive. [view history] This is returned if records are found but the part status is marked as inactive.
db Unable to connect to the database. Unable to add line item to the cart. Use your back button and try again. This is returned if there was an error in inserting or querying values such as default part number, default part name, description, engine, miles, status, stock, transmission, vin, inventory type id, business name, etc.
zero Unable to find a match in the database. The line item was not added to the cart. See note below. The [number] was found in the database but it was unable to find any activity (quantities in/out) for the current [name]. Even though a [number] shows up for your [type] (it is already in the database), it still must be assigned to your [name]. This is done by either a PO to a specific [name] or transferred in through an internal transfer invoice from a [name] that has the item(s) to the current [name]. This is how we track quantities in and out. Use your back button and try again. [po homepage] [homepage] [view cart] [clear cart] In Question: [part number] In Question: [name]. If this error continues, it may be easier to clear the current cart and start over. Here are a couple of other tips to help you out. Go to the actual [number] detail page and view the usage. You may have to change the [name] filter to "All" on that report to see the activity. Another thing you can do is when you search for a [number] and the search results appear, look for a numeric value in the Qty. column. If there is no activity for your [name] there will be a "..." instead of an actual number. Hopefully those little tips will help you out. :) This is returned if the record count for the query is zero.
vin Check the VIN number for the unit. Unable to add the unit to the cart. The VIN number does not match the required length criteria. [view unit details] This is returned if the VIN number doesn't pass length validation.


Samples
Caption Text
JSON
{"API_CALL_FUNCTION_NAME":"checkPartsAndStock","CORP_ID":53,"STORE_ID":178,"VENDOR_PAYEE_ID":1821,"PART_ID":0,"PART_NUMBER":"Labor","STOCK":12,"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"}