Label templates
Retail bag label layouts, including where the traceability QR code sits.
4 operations in the reporting.label namespace.
reporting.label.deleteLabelTemplate
Section titled “reporting.label.deleteLabelTemplate”Retire a label design
POST /rpc/v1/reporting.label.deleteLabelTemplateArchives 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”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 '{}'reporting.label.getLabelTemplate
Section titled “reporting.label.getLabelTemplate”Get a label design
POST /rpc/v1/reporting.label.getLabelTemplateAlso 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”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 '{}'reporting.label.listLabelTemplates
Section titled “reporting.label.listLabelTemplates”List label designs
POST /rpc/v1/reporting.label.listLabelTemplatesAlso 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
page |
object | no |
Example
Section titled “Example”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 '{}'reporting.label.saveLabelTemplate
Section titled “reporting.label.saveLabelTemplate”Publish a label design
POST /rpc/v1/reporting.label.saveLabelTemplatePublishes 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.
Request
Section titled “Request”| 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 |
Example
Section titled “Example”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 '{}'