addInventoryTransferItems
The method allows you to add planning items to an inventory transfer in draft status. Entering the product with the ID updates the previously saved position only if all other parameters match. If any parameter differs (e.g. location), a new item will be added.
Input parameters
| transfer_id | int | Transfer identifier |
| items | array | List of items to add to the transfer |
| | - product_id | int | Product identifier |
| | - quantity | int | Quantity to transfer. Must be a positive integer. |
| | - location_name | varchar(20) | (optional) Source WMS stock unit location. Must match an existing stock unit. |
| | - target_location_name | varchar(20) | (optional) Target storage location name |
| | - expiry_date | varchar(10) | (optional) Expiry date in YYYY-MM-DD format (ISO 8601). Used for WMS unit matching. |
| | - batch | varchar(128) | (optional) Batch number. Used for WMS unit matching. |
| | - serial_no | varchar(128) | (optional) Serial number. Used for WMS unit matching. |
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 transfer items |
| | - item_id | int | Created item identifier |
| | - position | int | Line item number within the transfer |
Sample
Input data:Output data:
A sample request in PHP: