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
| document_id | int | Document identifier |
| 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 |
| | - item_id | int | Item identifier |
| | - document_id | int | Document identifier |
| | - product_id | int | Product identifier |
| | - inventory_id | int | Inventory (catalog) identifier |
| | - position | int | Line item number |
| | - product_name | varchar(255) | Product name |
| | - product_sku | varchar(50) | Product SKU |
| | - product_ean | varchar(32) | Product EAN |
| | - expiry_date | varchar(10) | Expiry date in YYYY-MM-DD format |
| | - batch | varchar(128) | Batch number |
| | - serial_no | varchar(128) | Serial number |
| | - quantity | int | Quantity of this line item |
| | - price | decimal(10,2) | Unit price |
| | - total_price | decimal(10,2) | Total value of the item |
| | - location_name | varchar(255) | Storage location |
| | - target_location_name | varchar(255) | Target location (only for Internal Transfer documents) |
| | - comments | varchar(255) | Item comments or notes |
Sample
Input data:Output data:
A sample request in PHP: