Add QR code to postcard
spur_add_postcard_qr_codePut a tracked QR code on the back of one of the user's postcard templates and show the preview. Each mailed postcard gets its own code under the chosen QR code, so scans are tracked per recipient (spur_get_qr_code_activity).
Placement: position="auto" fills the back's QR slot (an element with class qr-box, qr-code-box, qr-placeholder or qr-callout-box, as Spur's gallery designs have) and otherwise goes in the bottom-right of the message area, left of the address block and above the USPS barcode. Corners (top_left, top_right, bottom_left, bottom_right) and x_inches/y_inches place it in the message area; spots in the USPS clear zone are refused. Replaces any QR already on the card. If it lands on the message text, call again with another corner or move the text.
Create a QR code first with spur_create_qr_code if spur_list_qr_codes has none that fits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| position | No | Where to place the code on the back; auto fills the design's qr-box | auto |
| x_inches | No | Left edge, inches from the bleed's left edge (with y_inches; overrides position) | |
| y_inches | No | Top edge, inches from the bleed's top edge (with x_inches) | |
| qr_code_id | Yes | QR code id from spur_list_qr_codes or spur_create_qr_code | |
| size_inches | No | Edge length when placed in the message area (not used for a slot). 0.75in or more scans reliably | |
| template_id | Yes | Postcard template id (UUID from a Spur list/search tool) |