Inventory · Blend
4 operations in the inventory.blend namespace.
inventory.blend.createBlend
Section titled “inventory.blend.createBlend”Define a blend recipe
POST /rpc/v1/inventory.blend.createBlendThe recipe, not a production run. Target ratios are never mutated to match what was actually produced — that drift is recorded separately, which is what makes ‘we shipped 3% off spec’ a question the data can answer.
Requires permission inventory.blend.write and the inventory module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | |
code |
string | yes | |
blendType |
pre_roast | post_roast |
yes | |
targetWeightLossPct |
string | no | |
roastLevel |
light | medium | dark |
no | |
isDecaf |
boolean | no | |
components |
object[] | yes |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/inventory.blend.createBlend \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'inventory.blend.getBlend
Section titled “inventory.blend.getBlend”Get a blend and its components
POST /rpc/v1/inventory.blend.getBlendAlso available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.
Requires permission inventory.blend.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.blend.getBlend \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'inventory.blend.listBlends
Section titled “inventory.blend.listBlends”List blend recipes
POST /rpc/v1/inventory.blend.listBlendsAlso available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.
Requires permission inventory.blend.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.blend.listBlends \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'inventory.blend.validateBlendAvailability
Section titled “inventory.blend.validateBlendAvailability”Can this blend be produced right now?
POST /rpc/v1/inventory.blend.validateBlendAvailabilityAnswers per component, because ‘you are short’ is not actionable but ‘you are 12.4 kg short of the Ethiopian’ is. Green is grossed up for expected roast loss: sizing against the roasted target under-orders on every run.
Requires permission inventory.blend.read and the inventory module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
blendId |
string | yes | |
requestedKg |
string | yes |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/inventory.blend.validateBlendAvailability \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'