addInventoryPurchaseOrderItems
The method allows you to add items to an existing purchase order.
Input parameters
Output data:
A sample request in PHP:
| order_id | int | Purchase order identifier |
| items | array | List of items to add. Each item should contain fields listed below |
| | - product_id | int | Product identifier |
| | - quantity | int | Item quantity |
| | - item_cost | decimal(10,2) | Item unit cost |
| | - supplier_code | varchar(50) | (optional) Product code from supplier |
| | - location | varchar(255) | (optional) Storage location |
| | - batch | varchar(128) | (optional) Batch number |
| | - expiry_date | date | (optional) Expiry date |
| | - serial_no | varchar(128) | (optional) Serial number |
| | - comments | varchar255) | (optional) Item comments or notes |
Output data
The method returns the data in JSON format.
| status | varchar(30) | SUCCESS - request executed correctly ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code |
| items | array | List of created order items. Each element contains fields listed below |
| | - item_id | int | Item identifier |
| | - position | int | Item position in order |
Sample
Input data:Output data:
A sample request in PHP: