{
  "id": "tmpl_menu_mailer",
  "name": "Menu mailer",
  "kind": "flat",
  "status": "draft: confirm with the print partner before production",
  "units": "inches, measured from the trim's top-left corner",
  "size": {
    "label": "8.5x14",
    "trim": [
      8.5,
      14
    ],
    "bleed": 0.125,
    "safe_margin": 0.125,
    "page": [
      8.75,
      14.25
    ],
    "orientation": "portrait",
    "aspect_ratio": 1.65
  },
  "usps": {
    "mails_as": "flat",
    "first_class": "Flat (large envelope) price.",
    "marketing_mail": "USPS Marketing Mail flat rate, 200-piece minimum per mailing.",
    "address_rule": "Card-type flat: the whole delivery address sits in the top half, at least 1/8 in from every edge, in 8 pt type or larger (DMM 202.2.2)."
  },
  "paper": "100 lb silk cover, full color on both sides",
  "files": {
    "front": "https://mailr.dev/templates/tmpl_menu_mailer/front.html",
    "back": "https://mailr.dev/templates/tmpl_menu_mailer/back.html",
    "spec": "https://mailr.dev/templates/tmpl_menu_mailer/template.json"
  },
  "sides": {
    "front": "front",
    "back": "back (address side)"
  },
  "merge_fields": [
    {
      "key": "first_name",
      "tag": "{{first_name}}",
      "type": "string",
      "required": true,
      "max_length": 14,
      "example": "Jordan"
    },
    {
      "key": "promo_code",
      "tag": "{{promo_code}}",
      "type": "string",
      "required": true,
      "max_length": 12,
      "example": "SUPPER15"
    }
  ],
  "content": {
    "mailr_prints": [
      "The recipient’s name and address from `to`, in our font, inside the address panel at the top right of the back.",
      "Your return address from `from` (required), at the top of the address panel.",
      "Postage and the USPS Intelligent Mail barcode, inside the address panel."
    ],
    "you_can_add": [
      "Your logo, colors, fonts and images anywhere outside the address panel (PNG or JPG at 300 DPI; fonts as TTF, WOFF, WOFF2 or Google Fonts; all on public https URLs).",
      "Your own business address, phone or website in your own style. On the back keep it outside the address panel; on the front keep it out of the top half, or use light text on a dark background.",
      "A full letter’s worth of copy: the whole front and most of the back are yours.",
      "Personal touches from merge fields: first name, offer codes, product names, links. Any {{tag}} you add is filled from merge.",
      "A QR code at least 1 in wide, inside the safe area and outside the address panel."
    ],
    "dont_add": [
      "Stamps, permit imprints, “postage paid” or “nonprofit org.” marks, or anything that looks like them. Mailr prints the right indicia for the mail class.",
      "Barcodes that look like USPS barcodes.",
      "The recipient’s address anywhere else on the flat.",
      "Sensitive personal data: account numbers, amounts, health or money details. It mails without an envelope, so anyone handling the flat can read it.",
      "Crop marks or printer marks.",
      "Anything inside the address panel. A white box is printed over it."
    ]
  },
  "clear_zones": [
    {
      "side": "back",
      "name": "address_postage_barcode",
      "x": 4.25,
      "y": 0.25,
      "w": 4,
      "h": 2.375,
      "rule": "Leave blank (top right of the back). Mailr prints the return address, recipient address, postage and Intelligent Mail barcode here."
    }
  ],
  "rules": [
    "Backgrounds run to the page edge, through the 0.125 in bleed.",
    "Text, logos and codes stay inside the safe area, 0.125 in inside the trim.",
    "Back: keep the address panel (top right of the back) blank. Mailr prints the return address there from `from`, which is required.",
    "Front: keep promotional addresses out of the top half, or use light text on a dark background, so sorting machines don’t read the wrong side.",
    "It mails without an envelope: keep account numbers, amounts, health or money details off the flat.",
    "Merge tags are replaced as plain text; keep values under max_length.",
    "Fonts must load from a public URL (Google Fonts works)."
  ],
  "fonts": [
    "Inter",
    "Caveat"
  ],
  "trigger": {
    "source": "Your app",
    "event": "menu.published",
    "when": "a new seasonal menu goes live"
  },
  "api": {
    "method": "POST",
    "url": "https://api.mailr.dev/v1/flats",
    "body": {
      "size": "8.5x14",
      "template": "tmpl_menu_mailer",
      "to": "<address object>",
      "from": "<your return address>",
      "merge": {
        "first_name": "Jordan",
        "promo_code": "SUPPER15"
      }
    },
    "custom_design": "send front and back as HTML strings (edited copies of these files) instead of template"
  },
  "usps_rules": [
    "https://pe.usps.com/text/dmm300/201.htm (DMM 201: sizes and thickness for letters, cards and flats)",
    "https://pe.usps.com/text/dmm300/202.htm (DMM 202: address placement and barcode placement)"
  ]
}
