Inventory · Roast
4 operations in the inventory.roast namespace.
inventory.roast.adjustRoastedLotQuantity
Section titled “inventory.roast.adjustRoastedLotQuantity”Adjust roasted stock
POST /rpc/v1/inventory.roast.adjustRoastedLotQuantityAppend-only, like the green ledger: the balance is never written directly.
Requires permission inventory.roast.write and the inventory module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
deltaKg |
string | yes | |
reason |
adjust | shrinkage | write_off | recount | sample_draw | return |
yes | |
comment |
string | no |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/inventory.roast.adjustRoastedLotQuantity \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'inventory.roast.getRoastedLot
Section titled “inventory.roast.getRoastedLot”Get one roasted lot
POST /rpc/v1/inventory.roast.getRoastedLotAlso available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.
Requires permission inventory.roast.read and the inventory module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/inventory.roast.getRoastedLot \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'inventory.roast.getRoastedLotTraceability
Section titled “inventory.roast.getRoastedLotTraceability”Walk a roasted lot back to the farm
POST /rpc/v1/inventory.roast.getRoastedLotTraceabilityAlso available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.
Follows the lineage edges backwards: roasted lot to roast batch to green lot to producer. This is what a recall investigation and a traceability certificate both need, and why lineage is stored as edges rather than a parent pointer.
Requires permission traceability.read and the core module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/inventory.roast.getRoastedLotTraceability \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'inventory.roast.listRoastedLots
Section titled “inventory.roast.listRoastedLots”List roasted inventory
POST /rpc/v1/inventory.roast.listRoastedLotsAlso available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.
Loose, packaged and blended stock. Roasted coffee has a usable window measured in weeks, so this is usually read freshness-first rather than by arrival order.
Requires permission inventory.roast.read and the inventory module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
filter |
object | no | |
page |
object | no |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/inventory.roast.listRoastedLots \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'