addInventoryDocumentItems
The method allows you to add items to an existing inventory document.
Input parameters
Output data:
A sample request in PHP:
document_id | int | Document identifier |
items | array | List of document items. Each element should contain fields listed below |
| - product_id | int | The product ID. |
| - quantity | int | The quantity of this line item in the document. |
| - price | decimal(10,2) | (optional) Item unit price |
| - location_name | varchar(255) | (optional) Storage location |
| - expiry_date | date | (optional) The expiry date, if relevant. Date format YYYY-MM-DD (ISO 8601) |
| - batch | varchar(128) | (optional) Batch number |
| - serial_no | varchar(128) | (optional) The product serial number. |
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 document items. Each element contains fields listed below |
Sample
Input data:Output data:
A sample request in PHP: