Skip to content

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.generateProductionSchedule

Merges 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.

Field Type Required Description
name string yes
scheduledDate string yes
locationId string no
dueBefore string no
maxBatchesPerMachine integer no
Terminal window
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 '{}'

Get a schedule and its batches

POST /rpc/v1/production.schedule.getProductionSchedule

Also 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.

Field Type Required Description
id string yes
Terminal window
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 '{}'

What production still has to cover

POST /rpc/v1/production.schedule.listDemandAggregate

Also 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.

Field Type Required Description
dueBefore string no
Terminal window
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.releaseScheduleToProduction

A 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.

Field Type Required Description
id string yes
Terminal window
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 '{}'