Quality · Grading
3 operations in the quality.grading namespace.
quality.grading.listGradings
Section titled “quality.grading.listGradings”List gradings
POST /rpc/v1/quality.grading.listGradingsAlso 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.
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/quality.grading.listGradings \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'quality.grading.recordGrading
Section titled “quality.grading.recordGrading”Record a physical grading
POST /rpc/v1/quality.grading.recordGradingA 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.
Request
Section titled “Request”| 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 |
Example
Section titled “Example”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 '{}'quality.grading.releaseQuarantine
Section titled “quality.grading.releaseQuarantine”Release a quarantined lot
POST /rpc/v1/quality.grading.releaseQuarantineRequires 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
greenLotId |
string | yes | |
reason |
string | yes |
Example
Section titled “Example”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 '{}'