Skip to content

QR code

Prints a QR code with configurable model, module size, error correction, and alignment.

Example

{
  "type": "qrcode",
  "content": "https://example.com",
  "align": "center"
}

Fields

FieldTypeDescription
typerequired"qrcode"

Discriminator for QR code blocks.

contentrequiredstring

Data to encode into the QR code. Must be at most 500 bytes after CP437 encoding.

  • Minimum length: 1
alignoptionalstring

Horizontal alignment of the printed QR code.

  • Allowed: "left", "center", "right"
modeloptionalstring

QR code model. Use model2 for normal QR codes; model1 is legacy, and micro is only suitable for very small payloads.

  • Allowed: "model1", "model2", "micro"
cellSizeoptional1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Size of each QR module in printer dots. Larger values print larger, easier-to-scan codes but require more paper width.

correctionoptionalstring

Error correction level. Higher levels improve damage tolerance but reduce data capacity and can increase the printed symbol size.

  • Allowed: "L", "M", "Q", "H"