|
Main Web API Documentation Information
|
|
|
Actual Page/Function Name:
|
addPOLineItem |
|
Human Readable Name or Caption:
|
Add PO Line Item |
|
Page/Function Description:
|
This method will add a new line to a PO. |
|
Page/Function Output Type:
|
API - JSON or WDDX |
|
Categories:
|
purchase order |
|
Extra Page/Function Notes:
|
|
|
Parameters
|
|||||||
| Scope | Name | Type | Default | Description | Required | Alternates | Known Values |
| Arguments | ADJUSTED_DATE_TIME | String | Pass in th adjusted date/time stamp. | Yes | |||
| Arguments | CORP_ID | Numeric | 0 | Pass in the corp id number. | Yes | ||
| Arguments | FORMATTED_ITEM_COST | String | Pass in the formatted item cost. | Yes | |||
| Arguments | FORMATTED_LINE_QUANTITY | String | Pass in the formatted line quantity. | Yes | |||
| Arguments | FORMATTED_OLD_ITEM_COST | String | Pass in the formatted old item cost. | Yes | |||
| Arguments | FORMATTED_REQUEST_QUANTITY | String | Pass in the formatted request quantity. | Yes | |||
| Arguments | INVENTORY_TYPE_ID | Numeric | 0 | Pass in the part number inventory id number. | Yes | ||
| Arguments | ITEM_COST | Numeric | 0 | Pass in the item cost. | Yes | ||
| Arguments | LINE_DESCRIPTION | String | Pass in the line description. | Yes | |||
| Arguments | LINE_ITEM_DATE | String | Pass in the line item date. | Yes | |||
| Arguments | LINE_ITEM_SORT | Numeric | 0 | Pass in the line item sort value. | Yes | ||
| Arguments | LINE_QUANTITY | Numeric | 0 | Pass in the line quantity. | Yes | ||
| Arguments | LINE_RF_ID_TAG_NUMBER | String | Pass in the line specific control/RFID tag number. | Yes | |||
| Arguments | LINE_SHOW | Numeric | 0 | Pass in a 1 for show and 0 for hide. | Yes | ||
| Arguments | OLD_ITEM_COST | Numeric | 0 | Pass in the old item cost. | Yes | ||
| Arguments | PART_CATEGORY_ID | Numeric | 0 | Pass in the part category id number. | Yes | ||
| Arguments | PART_ID | Numeric | 1 | Pass in the part id number. | Yes | ||
| Arguments | PART_NUMBER | String | Pass in the correct part number. | Yes | |||
| Arguments | PAYEE_ID | Numeric | 0 | Pass in the payee id number of the person doing the insert. | Yes | ||
| Arguments | PO_NUMBER | Numeric | 0 | Pass in the correct main PO number for the line item. | Yes | ||
| Arguments | PO_RECEIVED | Numeric | 0 | Pass in the PO received value. 1 for yes and 0 for no. | Yes | ||
| Arguments | PO_TYPE_ID | Numeric | 0 | Pass in the PO type id number. | Yes | ||
| Arguments | REQUEST_QUANTITY | Numeric | 0 | Pass in the request quantity. | Yes | ||
| Arguments | ROUNDING_ERROR_VALUE | String | auto | Pass in the plus or minus rounding error value. You may also use the keyword "auto" to have the system figure out the rounding error, if any. | Yes | ||
| Arguments | STORE_ID | Numeric | 0 | Pass in the location id. | Yes | ||
| Arguments | TIME_ID | Numeric | 0 | Pass in the time id. | Yes | ||
| Arguments | TIME_ID_LIST | String | Pass in a comma separated list of time ids. | Yes | |||
| Arguments | UNIT_OF_MEASUREMENT_ID | Numeric | 0 | Pass in the unit of measurement id number. | Yes | ||
| Arguments | VENDOR_PAYEE_ID | Numeric | 0 | Pass in the correct vendor id number. | Yes | ||
|
Results
|
||||
| RET_STATUS | RET_MAIN_MESSAGE | RET_SECOND_MESSAGE | Redirect Link | Description |
| ok | success | This assumes that everything went well. | ||
| dataIn | Unable to add the PO line item. Missing some data. | Use your back button and try again. | This is returned if missing one or more of the arguments CORP_ID, INVENTORY_TYPE_ID, ITEM_COST, LINE_DESCRIPTION, LINE_ITEM_SORT, PART_CATEGORY_ID, PART_ID, PART_NUMBER, PAYEE_ID, PO_NUMBER, PO_TYPE_ID, STORE_ID, UNIT_OF_MEASUREMENT_ID, VENDOR_PAYEE_ID. | |
| dataIn2 | Unable to add the PO line item. Missing the date information. | Use your back button and try again. | This is returned if one or more of the following arguments are not dates: ADJUSTE_DATE_TIME, LINE_ITEM_DATE. | |
| decimalValue | Unable to add the PO line item. One or more values is over the maximum. See note below. | One or more of the values is over +/- 99,000,000 (+/- ninety-nine million). Check the values (including any math) and try again. You may need to break the items into smaller parts or pieces. | This is returned if one or more of the following variables are over +/- 99,000,000: temp_line_quantity, temp_cost, temp_cost_extended. | |
| db | Unable to connect to the database. The PO line item was not added to the database. | Use your back button and try again. | This is a catch for any errors that occur while accessing the database. | |
|
Samples
|
|
| Caption | Text |
| JSON |
{
"API_CALL_FUNCTION_NAME": "addPOLineItem",
"ADJUSTED_DATE_TIME": "2025-08-04 10:08:00",
"CORP_ID": 53,
"FORMATTED_ITEM_COST": "0.30",
"FORMATTED_LINE_QUANTITY": "10",
"FORMATTED_OLD_ITEM_COST": "0.28",
"FORMATTED_REQUEST_QUANTITY": "12",
"INVENTORY_TYPE_ID": 0,
"ITEM_COST": 0.30,
"LINE_DESCRIPTION": "EPS 1.0 LB Density for Door Type A",
"LINE_ITEM_DATE": "2025-08-04",
"LINE_ITEM_SORT": 1,
"LINE_QUANTITY": 10,
"LINE_RF_ID_TAG_NUMBER": "RFID123",
"LINE_SHOW": 1,
"OLD_ITEM_COST": 0.28,
"PART_CATEGORY_ID": 2741,
"PART_ID": 123,
"PART_NUMBER": "EPS001",
"PAYEE_ID": 5130,
"PO_NUMBER": 123,
"PO_RECEIVED": 0,
"PO_TYPE_ID": 1,
"REQUEST_QUANTITY": 12,
"ROUNDING_ERROR_VALUE": "auto",
"STORE_ID": 178,
"TIME_ID": 0,
"TIME_ID_LIST": "1,2,3",
"UNIT_OF_MEASUREMENT_ID": 1,
"VENDOR_PAYEE_ID": 3,
"API_CORP_KEY_ID": "PLA-0053",
"API_USER_NAME": "demo",
"API_USER_PASSWORD": "1234",
"API_INPUT_OUTPUT_TYPE": "JSON",
"API_CURRENT_PAYEE_ID":"3",
"API_URL_ENCODING": "AUTO"
}
|