Production · Schedule
4 operations in the production.schedule namespace.
production.schedule.generateProductionSchedule
Section titled “production.schedule.generateProductionSchedule”Turn demand into a roast sequence
POST /rpc/v1/production.schedule.generateProductionScheduleMerges demand, sizes it into batches the drum can run, and orders the day: grouped by profile to avoid changeovers, light before dark because a dark roast leaves residue, and decaf last. Produced as a DRAFT — a human releases it.
Requires permission production.schedule.write and the roasting module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | |
scheduledDate |
string | yes | |
locationId |
string | no | |
dueBefore |
string | no | |
maxBatchesPerMachine |
integer | no |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/production.schedule.generateProductionSchedule \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'production.schedule.getProductionSchedule
Section titled “production.schedule.getProductionSchedule”Get a schedule and its batches
POST /rpc/v1/production.schedule.getProductionScheduleAlso available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.
Requires permission production.schedule.read and the roasting 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/production.schedule.getProductionSchedule \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'production.schedule.listDemandAggregate
Section titled “production.schedule.listDemandAggregate”What production still has to cover
POST /rpc/v1/production.schedule.listDemandAggregateAlso available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.
Confirmed order lines, less what is already allocated from stock, merged by what would be roasted together. Twelve customers ordering the house blend is one requirement, not twelve.
Requires permission production.schedule.read and the roasting module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
dueBefore |
string | no |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/production.schedule.listDemandAggregate \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'production.schedule.releaseScheduleToProduction
Section titled “production.schedule.releaseScheduleToProduction”Release a schedule to the roasting floor
POST /rpc/v1/production.schedule.releaseScheduleToProductionA deliberate human step. Generation produces a draft precisely so somebody looks at the feasibility notes before a day’s work is committed to it.
Requires permission production.schedule.approve and the roasting 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/production.schedule.releaseScheduleToProduction \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'