getInventoryDocumentItems
This method allows you to retrieve document items for specific or for all inventory documents 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) Page number of the results if there are many items in a document (100 items per page). |
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. Each element in the array has the fields below. |
| - 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, if applicable. |
| - location_name | varchar(255) | The location (location column). |
| - expiry_date | date | The expiry date, if relevant. Date format YYYY-MM-DD (ISO 8601) |
| - batch | varchar(128) | The product batch. |
| - serial_no | varchar(128) | The product serial number. |
Sample
Input data:Output data:
A sample request in PHP: