API documentation
Method list
Test your request
Changelog


addInventoryPurchaseOrderItems
The method allows you to add items to an existing purchase order.


Input parameters
order_idintPurchase order identifier
itemsarrayList of items to add. Each item should contain fields listed below
| - product_idintProduct identifier
| - quantityintItem quantity
| - item_costdecimal(10,2)Item unit cost
| - supplier_codevarchar(50)(optional) Product code from supplier
| - locationvarchar(255)(optional) Storage location
| - batchvarchar(128)(optional) Batch number
| - expiry_datedate(optional) Expiry date
| - serial_novarchar(128)(optional) Serial number
| - commentsvarchar255)(optional) Item comments or notes



Output data
The method returns the data in JSON format.
statusvarchar(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
itemsarrayList of created order items. Each element contains fields listed below
| - item_idintItem identifier
| - positionintItem position in order



Sample
Input data:
Output data:
A sample request in PHP: