Skip to content

Quality · Grading

3 operations in the quality.grading namespace.

List gradings

POST /rpc/v1/quality.grading.listGradings

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

Requires permission quality.grading.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.grading.listGradings \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Record a physical grading

POST /rpc/v1/quality.grading.recordGrading

A FAILING grading quarantines the lot, which blocks it from being reserved. The point of grading is to stop coffee reaching production, so a result that is recorded but not enforced is decoration.

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

Field Type Required Description
greenLotId string no
sampleId string no
standard sca | coe | brazil_ny | indonesian | vietnamese | custom no
moisturePct number no
waterActivity number no
screenSizeAvg number no
densityGPerL number no
defectsPrimary integer no
defectsSecondary integer no
screenDistribution object no
defectCounts object no
notes string no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/quality.grading.recordGrading \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Release a quarantined lot

POST /rpc/v1/quality.grading.releaseQuarantine

Requires a reason, recorded on the lot. Releasing coffee that failed grading is a decision someone should have to own, and one an auditor will ask about.

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

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