Main Web API Documentation Information
|
|
Actual Page/Function Name:
|
getSubInventory |
Human Readable Name or Caption:
|
Get Sub Inventory |
Page/Function Description:
|
This method gets sub inventory for a single item or part number. |
Page/Function Output Type:
|
API - JSON or WDDX |
Categories:
|
parts |
Extra Page/Function Notes:
|
Parameters
|
|||||||
Scope | Name | Type | Default | Description | Required | Alternates | Known Values |
Arguments | CORP_ID | Numeric | 0 | Pass in the corp id number. | Yes | ||
Arguments | PART_ID | Numeric | 0 | Pass in the part id. | Yes | ||
Arguments | STORE_ID | Numeric | 1 | Pass in the store id. If unknown, use a value of 1 for all locations. | Yes | ||
Arguments | SUB_ID | String | Pass in a list of sub ids or a single sub id number. It is also ok to leave this blank and that will get all sub id packages that are associated with the parent part id number. | Yes | |||
Arguments | SUB_DISABLED | String | 0,1 | Pass in a 0 for show and use, a 1 for show but disabled, a 2 for hide. You could also use the string all for all records. This argument could also use a small list of values if needed. | Yes | ||
Arguments | USE_BALANCE_DATE | String | Pass in the inventory look-back date. Ok to leave blank. Only pass in a valid date if you want this method to take the look-back date into consideration. If used, only inventory quantities and packages less than or equal to that date will be included. In a way, this date allows you to look-back into the past. The reason it is called the balance date deals with an internal balance sheet (snapshot in time). For your purposes, pretend that it is just an inventory look-back date. | Yes |
Results
|
||||||||||||||||||||
RET_STATUS | RET_MAIN_MESSAGE | RET_SECOND_MESSAGE | Redirect Link | Description | ||||||||||||||||
ok | success | This indicates a valid response. There are a number of possible sub arrays that will also be passed back. More information is listed below. | ||||||||||||||||||
|
||||||||||||||||||||
dataIn | Unable to get a list of sub inventory items as requested. Missing some data. | Use your back button and try again. | You will get this message if the inbound values do not meet the minimum criteria. | |||||||||||||||||
db | Unable to get sub inventory quantities. | Use your back button and try again. | This message is a global catch for the method. If something happens mid stream in the process, you may get this message. It may not be dealing with the actual quantities, but is more of a global error handler. |
Samples
|
|
Caption | Text |
JSON |
{"API_CALL_FUNCTION_NAME":"getSubInventory","API_USER_PASSWORD":"1234","API_URL_ENCODING":"AUTO","API_INPUT_OUTPUT_TYPE":"JSON","CORP_ID":"53","API_CURRENT_PAYEE_ID":"2","API_USER_NAME":"demo","PART_ID":"225446","SUB_DISABLED":"0,1","USE_BALANCE_DATE":"","API_CORP_KEY_ID":"PLA-0053","SUB_ID":"","STORE_ID":"1"}
|
Sample response with a couple of values |
{"RET_SECOND_MESSAGE":"","QRY_SUB_INVENTORY_ATTRIBUTES_ARRAY":[{"ATTRIBUTE_REQUIRED":0,"ATTRIBUTE_TYPE":"number","COLUMN_NUMBER":1,"DATA_TYPE_TABLE":"custom_numerics","ATTRIBUTE_STATUS":1,"CORP_ID":53,"WEB_SEARCH_BY_ATTRIBUTE":0,"LABEL_POSITION":"","PART_CATEGORY_ID":2741,"ATTRIBUTE_VALUES":"1","ATTRIBUTE_NAME":"Count Per","SUB_INVENTORY_ATTRIBUTE_ID":1,"ATTRIBUTE_COLUMN":"n1","WEB_SHOW_ATTRIBUTE":1,"WEB_SORT_BY_ATTRIBUTE":0,"ATTRIBUTE_SORT":100,"ATTRIBUTE_HIDE":0},{"ATTRIBUTE_REQUIRED":0,"ATTRIBUTE_TYPE":"text","COLUMN_NUMBER":1,"DATA_TYPE_TABLE":"custom_text","ATTRIBUTE_STATUS":1,"CORP_ID":53,"WEB_SEARCH_BY_ATTRIBUTE":0,"LABEL_POSITION":"","PART_CATEGORY_ID":2741,"ATTRIBUTE_VALUES":"","ATTRIBUTE_NAME":"Extras","SUB_INVENTORY_ATTRIBUTE_ID":2,"ATTRIBUTE_COLUMN":"t1","WEB_SHOW_ATTRIBUTE":1,"WEB_SORT_BY_ATTRIBUTE":0,"ATTRIBUTE_SORT":100,"ATTRIBUTE_HIDE":0},{"ATTRIBUTE_REQUIRED":0,"ATTRIBUTE_TYPE":"select","COLUMN_NUMBER":2,"DATA_TYPE_TABLE":"custom_text","ATTRIBUTE_STATUS":1,"CORP_ID":53,"WEB_SEARCH_BY_ATTRIBUTE":0,"LABEL_POSITION":"","PART_CATEGORY_ID":2741,"ATTRIBUTE_VALUES":"Christmas|Halloween|Easter|Thanksgiving|4th of July|Other","ATTRIBUTE_NAME":"Holiday","SUB_INVENTORY_ATTRIBUTE_ID":3,"ATTRIBUTE_COLUMN":"t2","WEB_SHOW_ATTRIBUTE":1,"WEB_SORT_BY_ATTRIBUTE":0,"ATTRIBUTE_SORT":100,"ATTRIBUTE_HIDE":0},{"ATTRIBUTE_REQUIRED":0,"ATTRIBUTE_TYPE":"date","COLUMN_NUMBER":1,"DATA_TYPE_TABLE":"custom_dates","ATTRIBUTE_STATUS":1,"CORP_ID":53,"WEB_SEARCH_BY_ATTRIBUTE":0,"LABEL_POSITION":"","PART_CATEGORY_ID":2741,"ATTRIBUTE_VALUES":"","ATTRIBUTE_NAME":"Best By Date","SUB_INVENTORY_ATTRIBUTE_ID":4,"ATTRIBUTE_COLUMN":"d1","WEB_SHOW_ATTRIBUTE":1,"WEB_SORT_BY_ATTRIBUTE":0,"ATTRIBUTE_SORT":100,"ATTRIBUTE_HIDE":0}],"QRY_SUB_INVENTORY_TEMPLATE_ARRAY":[{"SUB_TEMPLATE_DESCRIPTION":"This category will be used for Candy.","SUB_TEMPLATE_NAME":"Candy","SUB_TEMPLATE_LOCKED":0,"USE_SUB_INVENTORY":1}],"SUB_ATTRIBUTES_ARRAY":[{"SUB_QUANTITY":480.00000,"SUB_COST":0.50000,"SUB_RFID_TAG_NUMBER":"","ACTUAL_STORE_ID":178,"PART_ID":233903,"SPECIAL_DESCRIPTION":"Movie gum drops","SUB_INVENTORY_DATE":"June, 17 2019 00:00:00","PART_NUMBER":"Dots","PO_INVOICE_LINE_ID":953,"PO_NUMBER":42,"SUB_PRICE":0.00000,"SUB_REFERENCE_ID":1,"SUB_DISABLED":0,"TIME_ID":0,"SUB_INVENTORY_ID":1,"STORE_ID":"HQ","SUB_RFID":"","SUB_INVENTORY_STATUS":1,"SUB_BAR_CODE":"b-1","VENDOR_PAYEE_ID":28591},{"SUB_QUANTITY":170.00000,"SUB_COST":0.50000,"SUB_RFID_TAG_NUMBER":"","ACTUAL_STORE_ID":178,"PART_ID":233903,"SPECIAL_DESCRIPTION":"Movie gum drops","SUB_INVENTORY_DATE":"June, 17 2019 00:00:00","PART_NUMBER":"Dots","PO_INVOICE_LINE_ID":954,"PO_NUMBER":42,"SUB_PRICE":0.85000,"SUB_REFERENCE_ID":2,"SUB_DISABLED":0,"TIME_ID":0,"SUB_INVENTORY_ID":2,"STORE_ID":"HQ","SUB_RFID":"","SUB_INVENTORY_STATUS":1,"SUB_BAR_CODE":"b-2","VENDOR_PAYEE_ID":28591},{"SUB_QUANTITY":200.00000,"SUB_COST":0.50000,"SUB_RFID_TAG_NUMBER":"","ACTUAL_STORE_ID":178,"PART_ID":233903,"SPECIAL_DESCRIPTION":"Movie gum drops","SUB_INVENTORY_DATE":"June, 17 2019 00:00:00","PART_NUMBER":"Dots","PO_INVOICE_LINE_ID":954,"PO_NUMBER":42,"SUB_PRICE":0.85000,"SUB_REFERENCE_ID":3,"SUB_DISABLED":1,"TIME_ID":0,"SUB_INVENTORY_ID":3,"STORE_ID":"HQ","SUB_RFID":"","SUB_INVENTORY_STATUS":1,"SUB_BAR_CODE":"b-3","VENDOR_PAYEE_ID":28591},{"SUB_QUANTITY":100.00000,"SUB_COST":0.50000,"SUB_RFID_TAG_NUMBER":"","ACTUAL_STORE_ID":178,"PART_ID":233903,"SPECIAL_DESCRIPTION":"Movie gum drops","SUB_INVENTORY_DATE":"June, 17 2019 00:00:00","PART_NUMBER":"Dots","PO_INVOICE_LINE_ID":954,"PO_NUMBER":42,"SUB_PRICE":0.85000,"SUB_REFERENCE_ID":4,"SUB_DISABLED":1,"TIME_ID":0,"SUB_INVENTORY_ID":4,"STORE_ID":"HQ","SUB_RFID":"","SUB_INVENTORY_STATUS":1,"SUB_BAR_CODE":"b-4","VENDOR_PAYEE_ID":28591}],"RET_STATUS":"ok","RET_MAIN_MESSAGE":"success","RET_TYPE":"success"}
|
Outside Links |
If you want to see this JSON response in a more readable format - we recommend copying the JSON portion into something like https://jsonlint.com/ and then reading it from there. Also, some of the output may look pretty intense due to normal URL encoding. We often have to flatten certain strings to send them over the web (spaces, special characters, etc.). If you need a visual URL decoder page, see the following small adilas tool for URL encoding - https://www.adilas.biz/web/url_encoder.cfm (this tool goes from web URL encoding back to normal English - back and forth).
|