stock
Manage inventory stock items and locations in InvenTree: list, create, update, transfer, count, add, remove stock, and upload test results. Filter by part or location, search, and paginate results.
Instructions
Stock item & location management in InvenTree.
Operations: Read: list, get, get_by_location, get_by_part, list_locations, get_location, get_tracking, get_test_results Write: create, update, transfer, count, add, remove, create_location, upload_test_result
Args: operation: One of the operations listed above. pk: Stock item or location ID. data: Dict of fields for create/update. part_id: Filter stock by part (for list, get_by_part). location_id: Filter stock by location or transfer destination. quantity: Quantity for transfer/count/add/remove operations. test_name: Name for upload_test_result. test_result: Boolean pass/fail for upload_test_result. search: Text search filter for list/list_locations. limit: Max results (default 25). offset: Pagination offset.
Returns: JSON string with stock/location data or {"error": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| pk | No | ||
| data | No | ||
| part_id | No | ||
| location_id | No | ||
| quantity | No | ||
| test_name | No | ||
| test_result | No | ||
| search | No | ||
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |