> ## Documentation Index
> Fetch the complete documentation index at: https://api.buildingswell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inventory stock

> Read-only quantities by item and location.

Base path: `/inventory-stock` (relative to your instance’s `/api/v2`).

The standard list, single-record read, query, count, and group-and-count endpoints are available. Generic write routes are not registered.

## Fields

| Field            | Type      | Notes                                      |
| ---------------- | --------- | ------------------------------------------ |
| `id`             | uuid      | Unique record ID. Read-only.               |
| `organizationId` | uuid      | Organization from your API key. Read-only. |
| `createdAt`      | date-time | Read-only.                                 |
| `updatedAt`      | date-time | Read-only.                                 |
| `itemId`         | uuid      | Read-only.                                 |
| `locationId`     | uuid      | Read-only.                                 |
| `quantityOnHand` | number    | Read-only.                                 |

## Change stock through transactions

This is a derived balance. Generic create, update, upsert, and delete routes are not registered. Use [inventory transactions](/resources/inventory-transaction), [receiving](/resources/delivery), or [production](/resources/production-output).

For housekeeping, `POST /inventory-stock/{id}/remove` removes one empty balance
row. It returns `404` when the row is missing and `400` when it is nonzero.
`POST /inventory-stock/remove-empty` takes `{ "locationId": "<uuid>" }` and
removes empty rows directly at that location. Both return
`{ "value": { "removed": ... } }`, require item update permission, and clear an
item's `defaultLocationId` when the removed row was its default. They never
dispose of nonzero stock.
