Feeef Cloud
Inventory API

Objects

Namespaced stock rows, availability reads, namespace browse, and per-project rules.

List and filter

GET /inventory/objects

Scope: 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

GET /inventory/objects/browse
GET /inventory/namespaces/browse

Hierarchical 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

GET /inventory/availability

Pass 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 } } }
POST /inventory/availability/batch

Body { "queries": [ { "keys": [...], "namespace": "wh-main" }, … ] }. Cap: 500 keys across the whole body.

Administration

PUT /inventory/objects/batch
DELETE /inventory/objects/batch

names[] 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

GET /inventory/rules
PATCH /inventory/rules

Scope: inventory:write for both. First GET upserts documented defaults (reserveOn: confirmed, fulfillOn: dispatched, allowBackorder: false, missingKeyPolicy: ignore).

On this page