getInventoryDocumentItems
This method allows you to retrieve document items for a specific inventory document in BaseLinker. In case of a large number of items, pagination is possible.
Input parameters
Output data:
A sample request in PHP:
| document_id | int | Inventory document ID |
| page | int | (optional) Results page number (100 items per page, numbered from 1) |
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 document items |
| | - document_id | int | The ID of the document to which this item belongs |
| | - item_id | int | The main identifier of the document item |
| | - position | int | The line item number within the document |
| | - product_id | int | The product ID |
| | - product_name | varchar(200) | The product name as copied at the time of document creation |
| | - product_ean | varchar(32) | The product EAN |
| | - product_sku | varchar(50) | The product SKU |
| | - quantity | int | The quantity of this line item in the document |
| | - price | decimal(10,2) | The unit price |
| | - total_price | decimal(10,2) | The total value of the item |
| | - inventory_id | int | The catalog ID |
| | - location_name | varchar(255) | The location |
| | - expiry_date | varchar(10) | The expiry date. Date format YYYY-MM-DD (ISO 8601) |
| | - batch | varchar(128) | The product batch |
| | - serial_no | varchar(128) | The product serial number |
| | - comments | varchar(255) | Item comments or notes |
| | - target_location_name | varchar(255) | The target location (only for Internal Transfer documents) |
Sample
Input data:Output data:
A sample request in PHP: