> For the complete documentation index, see [llms.txt](https://docs.xorosoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xorosoft.com/developers-api/inventory-management/list-inventory-by-item-1.md).

# List Inventory by Item

Retrieve item-level inventory availability with filtering, paging, and optional MRP history. Set `include_mrp_history` to `true` or `1` to include monthly `MRPHistory` entries with sold, purchased, consumed, produced, and forecast quantities. `mrp_history_months` defaults to 12 and supports up to 36 months.

```json
{"openapi":"3.0.3","info":{"title":"Xorosoft ERP Public API","version":"2026.07"},"tags":[{"name":"Inventory Management","description":"Use Inventory Management APIs to read and update stock availability across stores, warehouses, locations, items, products, and inventory qualities. These endpoints are typically used by commerce channels, warehouse tools, 3PL integrations, and replenishment workflows that need current on-hand, allocated, available, and not-available quantities. Write operations should be used carefully because they can affect fulfillment and accounting downstream."}],"servers":[{"url":"https://res.xorosoft.io","description":"Xorosoft ERP API server"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"scheme":"basic","type":"http"}},"schemas":{"XoroApiResponse":{"type":"object","description":"Standard Xorosoft ERP API response envelope used by most endpoints.","properties":{"Result":{"type":"boolean","description":"True when the operation completed successfully."},"Message":{"type":"string","description":"Human-readable success or error message."},"Data":{"description":"Endpoint-specific payload.","type":"object","additionalProperties":true,"nullable":true},"Page":{"type":"integer","description":"Current page number when paging is enabled.","nullable":true},"TotalPages":{"type":"integer","description":"Total page count when paging is enabled.","nullable":true}}}}},"paths":{"/api/xerp/inventory/getinventorybyitemv2":{"get":{"tags":["Inventory Management"],"summary":"List Inventory by Item","description":"Retrieve item-level inventory availability with filtering, paging, and optional MRP history. Set `include_mrp_history` to `true` or `1` to include monthly `MRPHistory` entries with sold, purchased, consumed, produced, and forecast quantities. `mrp_history_months` defaults to 12 and supports up to 36 months.","operationId":"get_inventory_getinventorybyitemv2","responses":{"200":{"description":"Request processed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XoroApiResponse"}}}},"400":{"description":"Invalid request, failed validation, or business rule error.","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Missing or invalid private app credentials."},"403":{"description":"Private app does not have permission for this request."}},"parameters":[{"name":"item_number","in":"query","required":false,"description":"Item or SKU number used to search for the item.","schema":{"type":"string"}},{"name":"base_part_number","in":"query","required":false,"description":"Base part number used to identify a product family or variant group.","schema":{"type":"string"}},{"name":"item_id","in":"query","required":false,"description":"Xorosoft ERP item identifier used to retrieve item-specific records.","schema":{"type":"string"}},{"name":"product_id","in":"query","required":false,"description":"Product identifier.","schema":{"type":"string"}},{"name":"store","in":"query","required":false,"description":"Store or warehouse name.","schema":{"type":"string"}},{"name":"min_on_hand","in":"query","required":false,"description":"Minimum on-hand quantity filter.","schema":{"type":"string"}},{"name":"max_on_hand","in":"query","required":false,"description":"Maximum on-hand quantity filter.","schema":{"type":"string"}},{"name":"tags","in":"query","required":false,"description":"Comma-separated tags used to filter matching records.","schema":{"type":"string"}},{"name":"brand","in":"query","required":false,"description":"Brand name used to filter items or products.","schema":{"type":"string"}},{"name":"item_number_contains","in":"query","required":false,"description":"Filters items whose item number contains this text.","schema":{"type":"string"}},{"name":"item_number_does_not_contain","in":"query","required":false,"description":"Filters items whose item number does not contain this text.","schema":{"type":"string"}},{"name":"include_mrp_history","in":"query","required":false,"description":"Set to true or 1 to include monthly MRP history in each inventory row.","schema":{"type":"string"}},{"name":"mrp_history_months","in":"query","required":false,"description":"Number of months of MRP history to include. Defaults to 12 and cannot exceed 36.","schema":{"type":"string","default":"12"}},{"name":"page_number","in":"query","required":false,"description":"Page number for paginated responses.","schema":{"type":"string"}},{"name":"page_size","in":"query","required":false,"description":"Number of records to return per page.","schema":{"type":"string","default":"100"}},{"name":"page","in":"query","required":false,"description":"Page number for paginated responses.","schema":{"type":"string","default":"1"}},{"name":"account3pl_id","in":"query","required":false,"description":"3PL account identifier.","schema":{"type":"string"}}]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xorosoft.com/developers-api/inventory-management/list-inventory-by-item-1.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
