Template gallery / event-ticket

event-ticket

7x3 in. event ticket with a perforated stub: event, date, venue, seat block, holder, price and a Code 39 barcode drawn from a width pattern. Prints edge to edge.

chromium default PDF 15 top-level fields 1 unit per page

Rendered preview of the event-ticket template
Rendered by Galley from the example payload below, at 672px wide , scale 2.

Fields

The full JSON Schema is below. Required fields are marked; anything missing comes back as a 422 naming the path, the expected type and a value that would be accepted.

Field Type Required Description
currency string optional
price number optional Leave out and the ticket prints "Comp".
price_label string optional
order_number string optional
terms string optional
accent string optional
background string optional
background_2 string optional
text_color string optional
muted_color string optional
event object { name, tagline, presenter, date, … } required
ticket object { number, type } required
holder object { name, email } required
seat object { section_label, section, row, number } optional Leave the parts out for general admission and the ticket type prints instead.
barcode object { pattern, module } optional Same width-pattern scheme as the shipping label: no image fetch. Omit `pattern` and the ticket number prints in a boxed monospace field.

Default render options

Applied unless you override them. Options are part of the cache key.

margin "0"
print_background true

Example payload

This exact object renders the preview above. It is also what the API echoes back in a validation error, so an agent can repair a payload without a round trip to the docs.

example.jsonjson
{
  "currency": "USD",
  "price": 85,
  "price_label": "Paid",
  "order_number": "ORD-99182",
  "terms": "Non-refundable. Admits one. No re-entry after 10pm. Photo ID must match the name printed above.",
  "accent": "#2dd4bf",
  "background": "#0b1220",
  "background_2": "#16283d",
  "event": {
    "name": "Agents & Artifacts 2026",
    "tagline": "A one-night showcase of machine-made documents",
    "presenter": "Galley Render presents",
    "date": "2026-11-14",
    "doors": "6:30pm",
    "start": "7:15pm",
    "venue": "The Palace Saloon",
    "city": "Fernandina Beach, FL"
  },
  "ticket": {
    "number": "GR26-4192",
    "type": "Reserved"
  },
  "holder": {
    "name": "Lena Ortiz",
    "email": "lena@acme.test"
  },
  "seat": {
    "section": "B",
    "row": "4",
    "number": "12"
  },
  "barcode": {
    "pattern": "1311313111111113313131111133111133111131113331111113111131311113311131311311113111331131111133111131131131311",
    "module": 0.8
  }
}

Render it

With an API keyshell
curl -sS https://api.galleyrender.com/v1/render \
  -H "Authorization: Bearer $GALLEY_API_KEY" \
  -H 'content-type: application/json' \
  -d '{
  "template": "event-ticket@1",
  "format": "pdf",
  "data": {
    "currency": "USD",
    "price": 85,
    "price_label": "Paid",
    "order_number": "ORD-99182",
    "terms": "Non-refundable. Admits one. No re-entry after 10pm. Photo ID must match the name printed above.",
    "accent": "#2dd4bf",
    "background": "#0b1220",
    "background_2": "#16283d",
    "event": {
      "name": "Agents & Artifacts 2026",
      "tagline": "A one-night showcase of machine-made documents",
      "presenter": "Galley Render presents",
      "date": "2026-11-14",
      "doors": "6:30pm",
      "start": "7:15pm",
      "venue": "The Palace Saloon",
      "city": "Fernandina Beach, FL"
    },
    "ticket": {
      "number": "GR26-4192",
      "type": "Reserved"
    },
    "holder": {
      "name": "Lena Ortiz",
      "email": "lena@acme.test"
    },
    "seat": {
      "section": "B",
      "row": "4",
      "number": "12"
    },
    "barcode": {
      "pattern": "1311313111111113313131111133111133111131113331111113111131311113311131311311113111331131111133111131131131311",
      "module": 0.8
    }
  }
}'
With no API key, over MCPshell
# No API key. The first call mints a 50-render trial.
curl -sS https://mcp.galleyrender.com/mcp \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "render",
      "arguments": {
        "template": "event-ticket",
        "format": "pdf",
        "data": { … see the example payload above … }
      }
    }
  }'

Pin the version — event-ticket@1 — in anything you ship. Publishing a new version never changes an old one. Render endpoint reference →

Try a free tool

Renders the example payload on the production service. No account, no key.

JSON Schema

schema.json (15 top-level properties)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Event ticket",
  "description": "7x3 in. ticket with a perforated stub. Render at page size 7in x 3in with zero margin, or as a PNG at 672x288 (96dpi).",
  "type": "object",
  "required": [
    "event",
    "ticket",
    "holder"
  ],
  "additionalProperties": true,
  "properties": {
    "currency": {
      "type": "string",
      "default": "USD",
      "examples": [
        "USD"
      ]
    },
    "price": {
      "type": "number",
      "minimum": 0,
      "description": "Leave out and the ticket prints \"Comp\".",
      "examples": [
        85
      ]
    },
    "price_label": {
      "type": "string",
      "default": "Paid",
      "examples": [
        "Paid"
      ]
    },
    "order_number": {
      "type": "string",
      "examples": [
        "ORD-99182"
      ]
    },
    "terms": {
      "type": "string",
      "default": "Non-refundable. Admits one.",
      "examples": [
        "Non-refundable. Admits one. No re-entry after 10pm."
      ]
    },
    "accent": {
      "type": "string",
      "examples": [
        "#2dd4bf"
      ]
    },
    "background": {
      "type": "string",
      "examples": [
        "#0b1220"
      ]
    },
    "background_2": {
      "type": "string",
      "examples": [
        "#16283d"
      ]
    },
    "text_color": {
      "type": "string",
      "examples": [
        "#ffffff"
      ]
    },
    "muted_color": {
      "type": "string",
      "examples": [
        "#93a4b8"
      ]
    },
    "event": {
      "type": "object",
      "required": [
        "name",
        "date",
        "venue"
      ],
      "properties": {
        "name": {
          "type": "string",
          "examples": [
            "Agents & Artifacts 2026"
          ]
        },
        "tagline": {
          "type": "string",
          "examples": [
            "A one-night showcase of machine-made documents"
          ]
        },
        "presenter": {
          "type": "string",
          "default": "Presented by",
          "examples": [
            "Galley Render presents"
          ]
        },
        "date": {
          "type": "string",
          "format": "date",
          "examples": [
            "2026-11-14"
          ]
        },
        "doors": {
          "type": "string",
          "examples": [
            "6:30pm"
          ]
        },
        "start": {
          "type": "string",
          "examples": [
            "7:15pm"
          ]
        },
        "venue": {
          "type": "string",
          "examples": [
            "The Palace Saloon"
          ]
        },
        "city": {
          "type": "string",
          "examples": [
            "Fernandina Beach, FL"
          ]
        }
      }
    },
    "ticket": {
      "type": "object",
      "required": [
        "number"
      ],
      "properties": {
        "number": {
          "type": "string",
          "description": "Printed under the bars.",
          "examples": [
            "GR26-4192"
          ]
        },
        "type": {
          "type": "string",
          "default": "General admission",
          "examples": [
            "Reserved"
          ]
        }
      }
    },
    "holder": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "examples": [
            "Lena Ortiz"
          ]
        },
        "email": {
          "type": "string",
          "format": "email",
          "examples": [
            "lena@acme.test"
          ]
        }
      }
    },
    "seat": {
      "type": "object",
      "description": "Leave the parts out for general admission and the ticket type prints instead.",
      "properties": {
        "section_label": {
          "type": "string",
          "default": "Section / Row / Seat",
          "examples": [
            "Section / Row / Seat"
          ]
        },
        "section": {
          "type": "string",
          "examples": [
            "B"
          ]
        },
        "row": {
          "type": "string",
          "examples": [
            "4"
          ]
        },
        "number": {
          "type": "string",
          "examples": [
            "12"
          ]
        }
      }
    },
    "barcode": {
      "type": "object",
      "description": "Same width-pattern scheme as the shipping label: no image fetch. Omit `pattern` and the ticket number prints in a boxed monospace field.",
      "properties": {
        "pattern": {
          "type": "string",
          "description": "Element widths in modules, alternating bar, space, bar… starting with a bar.",
          "examples": [
            "131131113111"
          ]
        },
        "module": {
          "type": "number",
          "minimum": 0.25,
          "default": 1,
          "examples": [
            0.8
          ]
        }
      }
    }
  }
}