Objects
Namespaced stock rows, availability reads, namespace browse, and per-project rules.
List and filter
/inventory/objectsScope: inventory:read. Filters: namespace, key, prefix (a suffix-*
rollup such as tshirt*), batch, catalogRef. Cursor pagination,
limit ≤ 200.
catalogRef is an opaque string the owning platform can resolve
(opencod:variant:47). The engine never joins on it.
Browse
/inventory/objects/browse/inventory/namespaces/browseHierarchical listing of object keys and namespaces — the replacement for a
warehouse registry. A namespace is just a string bucket (wh-main, a zone, or
a virtual area like @production); there is no separate warehouse CRUD.
Availability
/inventory/availabilityPass keys (≤ 200) or prefix, optionally namespace. Results aggregate
across batches. @-prefixed namespaces are excluded unless
includeVirtual=true.
{ "data": { "tshirt/Red/XL": { "onHand": 140, "reserved": 12, "available": 128 } } }/inventory/availability/batchBody { "queries": [ { "keys": [...], "namespace": "wh-main" }, … ] }.
Cap: 500 keys across the whole body.
Administration
/inventory/objects/batch/inventory/objects/batchnames[] up to 1,000. Update is metadata only (priority, unitCost,
metadata). Delete refuses objects that still have quantity or movement
history.
await client.inventory.objects.updateBatch({
names: [{ namespace: 'wh-main', key: 'tshirt/Red/XL', batch: '' }],
update: { priority: 1 },
})
await client.inventory.objects.deleteBatch({
names: [{ namespace: 'wh-main', key: 'tshirt/Red/XL', batch: '' }],
})Rules
/inventory/rules/inventory/rulesScope: inventory:write for both. First GET upserts documented defaults
(reserveOn: confirmed, fulfillOn: dispatched, allowBackorder: false,
missingKeyPolicy: ignore).