> For the complete documentation index, see [llms.txt](https://docs.hesh.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hesh.app/manuals/public-api/inventory-materials.md).

# Inventory Materials

## List material inventory

> \
> Returns material-inventory rows across every warehouse on the tenant, cursor-paginated.\
> \
> \### Query\
> \
> \- \`search\` (optional) — case-insensitive substring match on the material name.\
> \- \`warehouse\_id\` (optional) — restrict to a single warehouse.\
> \- \`status\` (optional) — restrict to batches in a given status (\`in\_stock\`, \`reserved\`, \`shipped\`, etc.).\
> \- \`cursor\` (optional) — opaque cursor from the previous response's \`pagination.cursor\`; omit for the first page.\
> \- \`take\` (optional) — page size; defaults to \`25\`, capped at \`100\`.\
> \
> \### Response\
> \
> Each row carries the batch's identity (\`id\`, \`inventory\_key\`), location (\`warehouse\_id\`, \`warehouse\_name\`, \`warehouse\_status\`, \`warehouse\_purpose\`, \`division\_id\`, \`cell\_name\`), material identity (\`material\_name\`, \`material\_external\_id\`, \`category\`, \`subcategory\`, \`actual\_price\_per\_unit\`, \`uom\`), quantity + status (\`quantity\`, \`material\_status\`), and provenance (\`production\_key\`, \`task\_key\`, \`number\_of\_actions\`, \`comment\`).\
> \
> Follow \`pagination.cursor\` for the next page; \`pagination.hasNextPage = false\` signals the end of the stream.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"InventoryMaterials"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"BatchStatus":{"type":"string","enum":["pending","in_stock","shipped"]},"PublicInventoryMaterialStockListPageDto":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/PublicInventoryMaterialStockPaginationDto"}},"required":["pagination"]},"PublicInventoryMaterialStockPaginationDto":{"type":"object","properties":{"hasNextPage":{"type":"boolean","description":"Whether more pages are available after this one."},"cursor":{"type":"string","nullable":true,"description":"Cursor to pass on the next request."}},"required":["hasNextPage","cursor"]}}},"paths":{"/api/v1/public/inventory/materials":{"get":{"description":"\nReturns material-inventory rows across every warehouse on the tenant, cursor-paginated.\n\n### Query\n\n- `search` (optional) — case-insensitive substring match on the material name.\n- `warehouse_id` (optional) — restrict to a single warehouse.\n- `status` (optional) — restrict to batches in a given status (`in_stock`, `reserved`, `shipped`, etc.).\n- `cursor` (optional) — opaque cursor from the previous response's `pagination.cursor`; omit for the first page.\n- `take` (optional) — page size; defaults to `25`, capped at `100`.\n\n### Response\n\nEach row carries the batch's identity (`id`, `inventory_key`), location (`warehouse_id`, `warehouse_name`, `warehouse_status`, `warehouse_purpose`, `division_id`, `cell_name`), material identity (`material_name`, `material_external_id`, `category`, `subcategory`, `actual_price_per_unit`, `uom`), quantity + status (`quantity`, `material_status`), and provenance (`production_key`, `task_key`, `number_of_actions`, `comment`).\n\nFollow `pagination.cursor` for the next page; `pagination.hasNextPage = false` signals the end of the stream.\n","operationId":"PublicInventoryMaterialsController_list_v1","parameters":[{"name":"search","required":false,"in":"query","description":"Case-insensitive substring match on material name.","schema":{"maxLength":255,"type":"string"}},{"name":"warehouse_id","required":false,"in":"query","description":"Filter by warehouse UUID.","schema":{"format":"uuid","type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by batch status.","schema":{"$ref":"#/components/schemas/BatchStatus"}},{"name":"cursor","required":false,"in":"query","description":"Cursor from a previous response for the next page. Omit for the first page.","schema":{"type":"string"}},{"name":"take","required":false,"in":"query","description":"Page size. Defaults to 25.","schema":{"minimum":1,"maximum":100,"default":25,"type":"number"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInventoryMaterialStockListPageDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"List material inventory","tags":["InventoryMaterials"]}}}}
```

## Add material stock

> \
> Creates one receipt document and one batch per line item — a single request adds N rows to the same warehouse. Every batch gets a freshly generated \`inventory\_key\` (server-side; you don't supply it). Decimal quantities are allowed for materials.\
> \
> \### Body\
> \
> \- \`warehouse\_id\` — destination warehouse. Required.\
> \- \`division\_id\` — destination division. Required when the warehouse's \`storage\_type\` is not \`default\`; ignored otherwise. Applied to every item in the request.\
> \- \`comment\` — attached to the receipt document.\
> \- \`materials\[]\` — each item:\
> &#x20; \- \`material\_id\` — material id.\
> &#x20; \- \`quantity\` — positive number, decimals allowed.\
> &#x20; \- \`actual\_purchase\_price\` — optional per-unit purchase price recorded on the receipt.\
> &#x20; \- \`production\_key\` — optional. When present, the batch is linked to that workflow as its source (\`400\` if the key is unknown).\
> \
> \### Response\
> \
> Returns \`{ document\_id, data: \[...] }\` — \`document\_id\` is the receipt document that groups the batches, \`data\` mirrors each request line with the created \`id\` + generated \`inventory\_key\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"InventoryMaterials"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicAddInventoryMaterialsDto":{"type":"object","properties":{"warehouse_id":{"type":"string","format":"uuid","description":"Destination warehouse id."},"division_id":{"type":"string","format":"uuid","description":"Destination division id. Required for warehouses whose storage_type is not \"default\"."},"comment":{"type":"string","maxLength":1000,"description":"Free-form comment attached to the receipt document."},"materials":{"minItems":1,"maxItems":1000,"description":"Materials to add. At least one is required.","type":"array","items":{"$ref":"#/components/schemas/PublicAddInventoryMaterialItemDto"}}},"required":["warehouse_id","materials"]},"PublicAddInventoryMaterialItemDto":{"type":"object","properties":{"material_id":{"type":"string","format":"uuid","description":"Material id."},"quantity":{"type":"number","minimum":1,"description":"Quantity to receive. Positive, decimals allowed."},"actual_purchase_price":{"type":"number","minimum":1,"description":"Per-unit purchase price recorded on the receipt."},"production_key":{"type":"string","minLength":1,"description":"Optional production workflow key. When present, the receipt is linked to that workflow as its source."}},"required":["material_id","quantity"]},"PublicAddInventoryMaterialsResponseDto":{"type":"object","properties":{"document_id":{"type":"string","format":"uuid","description":"Id of the receipt document that groups the created batches."},"data":{"description":"Rows created by this receipt.","type":"array","items":{"$ref":"#/components/schemas/PublicInventoryMaterialStockCreatedItemDto"}}},"required":["document_id","data"]},"PublicInventoryMaterialStockCreatedItemDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"inventory_key":{"type":"string","description":"Batch number applied to the created row."},"material_id":{"type":"string","format":"uuid"},"quantity":{"type":"number"},"status":{"allOf":[{"$ref":"#/components/schemas/BatchStatus"}]},"warehouse_id":{"type":"string","format":"uuid"},"division_id":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","inventory_key","material_id","quantity","status","warehouse_id"]},"BatchStatus":{"type":"string","enum":["pending","in_stock","shipped"]}}},"paths":{"/api/v1/public/inventory/materials":{"post":{"description":"\nCreates one receipt document and one batch per line item — a single request adds N rows to the same warehouse. Every batch gets a freshly generated `inventory_key` (server-side; you don't supply it). Decimal quantities are allowed for materials.\n\n### Body\n\n- `warehouse_id` — destination warehouse. Required.\n- `division_id` — destination division. Required when the warehouse's `storage_type` is not `default`; ignored otherwise. Applied to every item in the request.\n- `comment` — attached to the receipt document.\n- `materials[]` — each item:\n  - `material_id` — material id.\n  - `quantity` — positive number, decimals allowed.\n  - `actual_purchase_price` — optional per-unit purchase price recorded on the receipt.\n  - `production_key` — optional. When present, the batch is linked to that workflow as its source (`400` if the key is unknown).\n\n### Response\n\nReturns `{ document_id, data: [...] }` — `document_id` is the receipt document that groups the batches, `data` mirrors each request line with the created `id` + generated `inventory_key`.\n","operationId":"PublicInventoryMaterialsController_add_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAddInventoryMaterialsDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAddInventoryMaterialsResponseDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Add material stock","tags":["InventoryMaterials"]}}}}
```

## Get material inventory rows by inventory\_key

> \
> Returns every batch row that carries the given \`inventory\_key\` (internal \`batch\_number\`). Multiple rows can share an \`inventory\_key\` after splits — e.g. a partial transfer creates a child row in the destination warehouse but the parent row keeps the same key. The response is a flat array (no pagination), typically 1–3 entries.\
> \
> Each entry surfaces the row's \`id\`, \`inventory\_key\`, \`material\_id\`, \`material\_name\`, \`quantity\`, \`uom\`, \`status\`, \`warehouse\_id\`, and \`division\_id\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"InventoryMaterials"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicInventoryMaterialStockByKeyDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Internal batch id."},"inventory_key":{"type":"string","description":"Batch number — the public \"inventory_key\"."},"material_id":{"type":"string","nullable":true,"format":"uuid"},"material_name":{"type":"string","nullable":true},"quantity":{"type":"number","description":"Current on-hand quantity."},"uom":{"type":"string","nullable":true,"description":"Measurement unit name."},"status":{"allOf":[{"$ref":"#/components/schemas/BatchStatus"}]},"warehouse_id":{"type":"string","nullable":true,"format":"uuid"},"division_id":{"type":"string","nullable":true,"format":"uuid"}},"required":["id","inventory_key","quantity","status"]},"BatchStatus":{"type":"string","enum":["pending","in_stock","shipped"]}}},"paths":{"/api/v1/public/inventory/materials/{key}":{"get":{"description":"\nReturns every batch row that carries the given `inventory_key` (internal `batch_number`). Multiple rows can share an `inventory_key` after splits — e.g. a partial transfer creates a child row in the destination warehouse but the parent row keeps the same key. The response is a flat array (no pagination), typically 1–3 entries.\n\nEach entry surfaces the row's `id`, `inventory_key`, `material_id`, `material_name`, `quantity`, `uom`, `status`, `warehouse_id`, and `division_id`.\n","operationId":"PublicInventoryMaterialsController_getByKey_v1","parameters":[{"name":"key","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicInventoryMaterialStockByKeyDto"}}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Get material inventory rows by inventory_key","tags":["InventoryMaterials"]}}}}
```

## Move material stock between warehouses

> \
> Moves stock from the batch's current location to a destination warehouse (and optionally division). Creates one change-log document per request, capturing source, destination, quantity, and comment. Decimal quantities are allowed.\
> \
> \### Behavior\
> \
> \- Partial moves (\`quantity < batch.current qty\`) split the row: the source batch keeps the remainder, a \*\*new child batch\*\* is created at the destination with the transferred quantity. The child inherits the parent's \`inventory\_key\`.\
> \- Full moves (\`quantity === batch.current qty\`) change the batch's \`warehouse\_id\` in-place — no split.\
> \- Rejected when \`quantity <= 0\` or \`quantity > batch.current qty\`.\
> \
> \
> \### \`inventory\_key\` disambiguation\
> \
> The public \`inventory\_key\` maps to the internal \`batch\_number\`. In rare cases (post-split scenarios) multiple batches can share the same \`inventory\_key\`. This endpoint requires \`inventory\_key\` to resolve to \*\*exactly one\*\* batch with status \`in\_stock\`:\
> \
> \- Zero matches → \`404\`.\
> \- Multiple matches → \`400\` with a message listing candidate batches.\
> \
> \
> \### Body\
> \
> \- \`comment\` — attached to the change-log document.\
> \- \`materials\[]\` — each item: \`inventory\_key\`, \`quantity\`, destination \`warehouse\_id\`, optional \`cell\_id\` (destination division).\
> \
> \### Response\
> \
> \`{ message, document\_id }\`. Follow \`document\_id\` on a future changelog endpoint to inspect the per-batch effects.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"InventoryMaterials"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMoveInventoryMaterialsDto":{"type":"object","properties":{"comment":{"type":"string","maxLength":1000,"description":"Free-form comment attached to the change-log document."},"materials":{"minItems":1,"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/PublicMoveInventoryMaterialItemDto"}}},"required":["materials"]},"PublicMoveInventoryMaterialItemDto":{"type":"object","properties":{"inventory_key":{"type":"string","minLength":1,"description":"Public batch number to move. Must resolve to exactly one IN_STOCK batch."},"quantity":{"type":"number","minimum":1,"description":"Quantity to move. Positive; ≤ the batch's current on-hand. Decimals allowed."},"warehouse_id":{"type":"string","format":"uuid","description":"Destination warehouse id."},"cell_id":{"type":"string","format":"uuid","description":"Destination division id (cell). Required for non-\"default\" storage types."}},"required":["inventory_key","quantity","warehouse_id"]},"PublicInventoryDocumentResultDto":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable confirmation message."},"document_id":{"type":"string","format":"uuid","description":"Id of the change-log document created by this operation."}},"required":["message","document_id"]}}},"paths":{"/api/v1/public/inventory/materials/move":{"post":{"description":"\nMoves stock from the batch's current location to a destination warehouse (and optionally division). Creates one change-log document per request, capturing source, destination, quantity, and comment. Decimal quantities are allowed.\n\n### Behavior\n\n- Partial moves (`quantity < batch.current qty`) split the row: the source batch keeps the remainder, a **new child batch** is created at the destination with the transferred quantity. The child inherits the parent's `inventory_key`.\n- Full moves (`quantity === batch.current qty`) change the batch's `warehouse_id` in-place — no split.\n- Rejected when `quantity <= 0` or `quantity > batch.current qty`.\n\n\n### `inventory_key` disambiguation\n\nThe public `inventory_key` maps to the internal `batch_number`. In rare cases (post-split scenarios) multiple batches can share the same `inventory_key`. This endpoint requires `inventory_key` to resolve to **exactly one** batch with status `in_stock`:\n\n- Zero matches → `404`.\n- Multiple matches → `400` with a message listing candidate batches.\n\n\n### Body\n\n- `comment` — attached to the change-log document.\n- `materials[]` — each item: `inventory_key`, `quantity`, destination `warehouse_id`, optional `cell_id` (destination division).\n\n### Response\n\n`{ message, document_id }`. Follow `document_id` on a future changelog endpoint to inspect the per-batch effects.\n","operationId":"PublicInventoryMaterialsController_move_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMoveInventoryMaterialsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInventoryDocumentResultDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Move material stock between warehouses","tags":["InventoryMaterials"]}}}}
```

## Write off material stock

> \
> Writes stock off from an in-stock batch. Creates one change-log document per request. Decimal quantities are allowed.\
> \
> \### Behavior\
> \
> \- Only batches with status \`in\_stock\` can be written off. Batches already \`shipped\` / \`written\_off\` are rejected with \`400\`.\
> \- Partial write-offs (\`quantity < batch.current qty\`) split the row: the source keeps the remainder, a new child batch is created carrying the written-off quantity and moved into the \`written\_off\` state.\
> \- Full write-offs (\`quantity === batch.current qty\`) flip the batch's status in-place.\
> \- Optional \`production\_key\` / \`task\_key\` attribute the write-off. Rules:\
> &#x20; \- If \`task\_key\` is provided without \`production\_key\`, the workflow is auto-populated from the task.\
> &#x20; \- If both are provided, the task must belong to the resolved production (\`400\` on mismatch).\
> &#x20; \- Unknown \`production\_key\` or \`task\_key\` → \`400\`.\
> \
> \
> \### \`inventory\_key\` disambiguation\
> \
> The public \`inventory\_key\` maps to the internal \`batch\_number\`. In rare cases (post-split scenarios) multiple batches can share the same \`inventory\_key\`. This endpoint requires \`inventory\_key\` to resolve to \*\*exactly one\*\* batch with status \`in\_stock\`:\
> \
> \- Zero matches → \`404\`.\
> \- Multiple matches → \`400\` with a message listing candidate batches.\
> \
> \
> \### Body\
> \
> \- \`comment\` — attached to the change-log document.\
> \- \`materials\[]\` — each item: \`inventory\_key\`, \`quantity\`, optional \`production\_key\`, optional \`task\_key\`.\
> \
> \### Response\
> \
> \`{ message, document\_id }\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"tags":[{"name":"InventoryMaterials"}],"servers":[{"url":"https://api-stage.hesh.tech"}],"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicWriteOffInventoryMaterialsDto":{"type":"object","properties":{"comment":{"type":"string","maxLength":1000,"description":"Free-form comment attached to the change-log document."},"materials":{"minItems":1,"maxItems":1000,"type":"array","items":{"$ref":"#/components/schemas/PublicWriteOffInventoryMaterialItemDto"}}},"required":["materials"]},"PublicWriteOffInventoryMaterialItemDto":{"type":"object","properties":{"inventory_key":{"type":"string","minLength":1,"description":"Public batch number to write off. Must resolve to exactly one IN_STOCK batch."},"quantity":{"type":"number","minimum":1,"description":"Quantity to write off. Positive; ≤ the batch's current on-hand. Decimals allowed."},"production_key":{"type":"string","minLength":1,"description":"Optional production workflow key. Auto-populated from task_key when only task_key is provided."},"task_key":{"type":"string","minLength":1,"description":"Optional task key. When set, the task must belong to the resolved production (if production_key is also set)."}},"required":["inventory_key","quantity"]},"PublicInventoryDocumentResultDto":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable confirmation message."},"document_id":{"type":"string","format":"uuid","description":"Id of the change-log document created by this operation."}},"required":["message","document_id"]}}},"paths":{"/api/v1/public/inventory/materials/write-off":{"post":{"description":"\nWrites stock off from an in-stock batch. Creates one change-log document per request. Decimal quantities are allowed.\n\n### Behavior\n\n- Only batches with status `in_stock` can be written off. Batches already `shipped` / `written_off` are rejected with `400`.\n- Partial write-offs (`quantity < batch.current qty`) split the row: the source keeps the remainder, a new child batch is created carrying the written-off quantity and moved into the `written_off` state.\n- Full write-offs (`quantity === batch.current qty`) flip the batch's status in-place.\n- Optional `production_key` / `task_key` attribute the write-off. Rules:\n  - If `task_key` is provided without `production_key`, the workflow is auto-populated from the task.\n  - If both are provided, the task must belong to the resolved production (`400` on mismatch).\n  - Unknown `production_key` or `task_key` → `400`.\n\n\n### `inventory_key` disambiguation\n\nThe public `inventory_key` maps to the internal `batch_number`. In rare cases (post-split scenarios) multiple batches can share the same `inventory_key`. This endpoint requires `inventory_key` to resolve to **exactly one** batch with status `in_stock`:\n\n- Zero matches → `404`.\n- Multiple matches → `400` with a message listing candidate batches.\n\n\n### Body\n\n- `comment` — attached to the change-log document.\n- `materials[]` — each item: `inventory_key`, `quantity`, optional `production_key`, optional `task_key`.\n\n### Response\n\n`{ message, document_id }`.\n","operationId":"PublicInventoryMaterialsController_writeOff_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicWriteOffInventoryMaterialsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInventoryDocumentResultDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Write off material stock","tags":["InventoryMaterials"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hesh.app/manuals/public-api/inventory-materials.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
