Skip to content

Quality · Cupping

5 operations in the quality.cupping namespace.

Set up a cupping table

POST /rpc/v1/quality.cupping.createCuppingSession

Assigns each coffee a blind code. Codes are shuffled rather than sequential — a cupper who notices the first cup is always the house coffee is no longer blind — and seeded by session id so a disputed session can be re-examined.

Requires permission quality.cupping.write and the quality module on the organization’s plan.

Field Type Required Description
sessionNumber string yes
name string yes
mode open | blind | double_blind no
scheduledAt string no
samples object[] yes
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/quality.cupping.createCuppingSession \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Close a session and publish its results

POST /rpc/v1/quality.cupping.finalizeCuppingSession

Aggregates each coffee’s scores and stores the SPREAD alongside the mean. An 85 with every cupper within half a point is a confident result; the same 85 from scores of 80 and 90 is not, and quoting the mean alone would hide that.

Requires permission quality.cupping.write and the quality module on the organization’s plan.

Field Type Required Description
sessionId string yes
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/quality.cupping.finalizeCuppingSession \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

The table as a cupper sees it

POST /rpc/v1/quality.cupping.getCuppingTable

In a blind session the identity of each coffee is OMITTED from the response, not merely hidden by the interface: a cupper who can read it out of the network traffic is not blind, whatever the screen shows. Identities appear once the session is finalized.

Requires permission quality.cupping.read and the quality module on the organization’s plan.

Field Type Required Description
sessionId string yes
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/quality.cupping.getCuppingTable \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

List cupping sessions

POST /rpc/v1/quality.cupping.listCuppingSessions

Also available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.

Requires permission quality.cupping.read and the quality module on the organization’s plan.

Field Type Required Description
filter object no
page object no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/quality.cupping.listCuppingSessions \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Score one coffee

POST /rpc/v1/quality.cupping.submitCuppingScore

Scores must sit between 6.00 and 10.00 in quarter points. That is not formatting fussiness: a score is a claim a supplier may dispute, and a 7.3 on a quarter-point scale means the sheet was not filled as the standard requires.

Requires permission quality.cupping.write and the quality module on the organization’s plan.

Field Type Required Description
sessionSampleId string yes
cupperName string no
scores object yes
defectsPenalty number no
descriptors string[] no
notes string no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/quality.cupping.submitCuppingScore \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'