Skip to content

Label templates

Retail bag label layouts, including where the traceability QR code sits.

4 operations in the reporting.label namespace.

Retire a label design

POST /rpc/v1/reporting.label.deleteLabelTemplate

Archives rather than deletes, and returns the archived design. Bags already printed against it stay explicable.

Requires permission reporting.write and the core module on the organization’s plan.

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

Get a label design

POST /rpc/v1/reporting.label.getLabelTemplate

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

Requires permission reporting.read and the core module on the organization’s plan.

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

List label designs

POST /rpc/v1/reporting.label.listLabelTemplates

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

The current version of each design. Superseded versions are not listed.

Requires permission reporting.read and the core module on the organization’s plan.

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

Publish a label design

POST /rpc/v1/reporting.label.saveLabelTemplate

Publishes a NEW VERSION rather than mutating the existing one. A bag printed in March must stay reproducible after somebody redesigns the label in June, or a recall cannot say which bags carried which claim.

Requires permission reporting.write and the core module on the organization’s plan.

Field Type Required Description
name string yes
widthMm number yes
heightMm number yes
marginMm number yes
qrSizeMm number yes
qrPosition none | top-right | bottom-right | bottom-left yes
blocks object[] yes
id string no
isDefault boolean no
Terminal window
curl -X POST https://api-staging.roastery.run/rpc/v1/reporting.label.saveLabelTemplate \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'