Template gallery / purchase-order
purchase-order
Letter-size purchase order: vendor and ship-to blocks, SKU line items with extended amounts, freight terms, requested delivery date, and an approval signature line.
chromium default PDF 19 top-level fields 1 unit per page
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 |
|---|---|---|---|
| po_number | string | required | |
| issued_on | string (date) | required | |
| needed_by | string (date) | optional | Requested delivery date. |
| currency | string | optional | |
| accent | string | optional | |
| payment_terms | string | optional | |
| ship_via | string | optional | |
| fob | string | optional | |
| requisitioner | string | optional | Who asked for the order. |
| approver | string | optional | Name printed under the authorization line. |
| freight_cost | number | optional | |
| tax_rate | number | optional | |
| shipping_instructions | string | optional | |
| terms | string | optional | |
| buyer | object { name, address, phone, email, … } | required | The organization placing the order. |
| vendor | object { name, attention, address, email, … } | required | |
| ship_to | object { name, attention, address, phone } | optional | Defaults to the buyer if left out. |
| bill_to | object { name, attention, address, email } | optional | Defaults to the buyer if left out. |
| line_items | array of object { sku, description, detail, quantity, … } | required |
Default render options
Applied unless you override them. Options are part of the cache key.
| page_size | "Letter" |
| margin | "0.5in" |
| 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.
{
"po_number": "PO-24118",
"issued_on": "2026-09-16",
"needed_by": "2026-10-02",
"currency": "USD",
"payment_terms": "Net 30",
"ship_via": "LTL freight, liftgate required",
"fob": "Destination",
"requisitioner": "J. Okafor, Shop",
"approver": "Priya Raman",
"freight_cost": 285,
"tax_rate": 0.07,
"buyer": {
"name": "Halyard Remodeling LLC",
"address": "18 Dock St, Fernandina Beach, FL 32034",
"phone": "(904) 555-0142",
"email": "purchasing@halyardremodel.test"
},
"vendor": {
"name": "Atlantic Building Supply",
"attention": "Contract Sales Desk",
"address": "1440 Industrial Blvd, Jacksonville, FL 32254",
"email": "orders@atlanticsupply.test",
"account_number": "HAL-2214"
},
"ship_to": {
"name": "Reyes residence — job site",
"attention": "Site super, J. Okafor",
"address": "412 Ash Street, Fernandina Beach, FL 32034",
"phone": "(904) 555-0177"
},
"bill_to": {
"name": "Halyard Remodeling LLC",
"attention": "Accounts Payable",
"address": "PO Box 4412, Fernandina Beach, FL 32035",
"email": "ap@halyardremodel.test"
},
"line_items": [
{
"sku": "TIL-3060-MW",
"description": "Matte white wall tile, 3x6",
"detail": "Dye lot must match across all cartons. Includes 10% overage.",
"quantity": 46,
"uom": "CTN",
"unit_price": 38.4
},
{
"sku": "TIL-1212-HEX",
"description": "Hex mosaic floor tile, 12x12 sheet",
"quantity": 62,
"uom": "SHT",
"unit_price": 11.25
},
{
"sku": "SET-MOD-50",
"description": "Modified thin-set mortar, 50 lb",
"quantity": 14,
"uom": "BAG",
"unit_price": 22.8
},
{
"sku": "GRT-URE-9",
"description": "Urethane grout, Delorean Gray, 9 lb",
"quantity": 6,
"uom": "PAL",
"unit_price": 64.5
},
{
"sku": "MEM-UNC-323",
"description": "Uncoupling membrane, 323 sq ft roll",
"quantity": 1,
"uom": "ROL",
"unit_price": 289
},
{
"sku": "VAN-3621-OAK",
"description": "White oak vanity, 36 in., undermount cut",
"detail": "Confirm soft-close hardware before shipping.",
"quantity": 1,
"uom": "EA",
"unit_price": 1145
},
{
"sku": "TOP-QTZ-3722",
"description": "Quartz vanity top, 37x22, eased edge",
"quantity": 1,
"uom": "EA",
"unit_price": 640
}
],
"shipping_instructions": "Deliver to the driveway apron, not the garage. Call the site number 30 minutes out. Tile must be palletized and shrink-wrapped; loose cartons will be refused.",
"terms": "This purchase order number must appear on all invoices, packing slips, and cartons. Substitutions require written approval from the requisitioner. Invoices received more than 90 days after delivery will not be paid."
} Render it
curl -sS https://api.galleyrender.com/v1/render \
-H "Authorization: Bearer $GALLEY_API_KEY" \
-H 'content-type: application/json' \
-d '{
"template": "purchase-order@1",
"format": "pdf",
"data": "… the example payload above …"
}' # 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": "purchase-order",
"format": "pdf",
"data": { … see the example payload above … }
}
}
}'
Pin the version — purchase-order@1 — in anything you ship. Publishing a new
version never changes an old one. Render endpoint reference →
Renders the example payload on the production service. No account, no key.
JSON Schema
schema.json (19 top-level properties)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Purchase order",
"type": "object",
"required": [
"po_number",
"issued_on",
"buyer",
"vendor",
"line_items"
],
"additionalProperties": true,
"properties": {
"po_number": {
"type": "string",
"examples": [
"PO-24118"
]
},
"issued_on": {
"type": "string",
"format": "date",
"examples": [
"2026-09-16"
]
},
"needed_by": {
"type": "string",
"format": "date",
"description": "Requested delivery date.",
"examples": [
"2026-10-02"
]
},
"currency": {
"type": "string",
"default": "USD",
"examples": [
"USD"
]
},
"accent": {
"type": "string",
"examples": [
"#1e3a5f"
]
},
"payment_terms": {
"type": "string",
"default": "Net 30",
"examples": [
"Net 30"
]
},
"ship_via": {
"type": "string",
"default": "Vendor's choice",
"examples": [
"LTL freight, liftgate required"
]
},
"fob": {
"type": "string",
"default": "Destination",
"examples": [
"Destination"
]
},
"requisitioner": {
"type": "string",
"description": "Who asked for the order.",
"examples": [
"J. Okafor, Shop"
]
},
"approver": {
"type": "string",
"description": "Name printed under the authorization line.",
"examples": [
"Priya Raman"
]
},
"freight_cost": {
"type": "number",
"minimum": 0,
"examples": [
285
]
},
"tax_rate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"examples": [
0.07
]
},
"shipping_instructions": {
"type": "string",
"examples": [
"Deliver to the rear dock between 7am and 2pm. Call the site number 30 minutes out. No residential driveway deliveries."
]
},
"terms": {
"type": "string",
"examples": [
"This purchase order number must appear on all invoices, packing slips, and cartons. Substitutions require written approval. Invoices received more than 90 days after delivery will not be paid."
]
},
"buyer": {
"type": "object",
"required": [
"name"
],
"description": "The organization placing the order.",
"properties": {
"name": {
"type": "string",
"examples": [
"Halyard Remodeling LLC"
]
},
"address": {
"type": "string",
"examples": [
"18 Dock St, Fernandina Beach, FL 32034"
]
},
"phone": {
"type": "string",
"examples": [
"(904) 555-0142"
]
},
"email": {
"type": "string",
"format": "email",
"examples": [
"purchasing@halyardremodel.test"
]
},
"logo_url": {
"type": "string",
"format": "uri",
"examples": [
"https://example.com/logo.png"
]
}
}
},
"vendor": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"examples": [
"Atlantic Building Supply"
]
},
"attention": {
"type": "string",
"examples": [
"Contract Sales Desk"
]
},
"address": {
"type": "string",
"examples": [
"1440 Industrial Blvd, Jacksonville, FL 32254"
]
},
"email": {
"type": "string",
"format": "email",
"examples": [
"orders@atlanticsupply.test"
]
},
"account_number": {
"type": "string",
"examples": [
"HAL-2214"
]
}
}
},
"ship_to": {
"type": "object",
"description": "Defaults to the buyer if left out.",
"properties": {
"name": {
"type": "string",
"examples": [
"Reyes residence — job site"
]
},
"attention": {
"type": "string",
"examples": [
"Site super, J. Okafor"
]
},
"address": {
"type": "string",
"examples": [
"412 Ash Street, Fernandina Beach, FL 32034"
]
},
"phone": {
"type": "string",
"examples": [
"(904) 555-0177"
]
}
}
},
"bill_to": {
"type": "object",
"description": "Defaults to the buyer if left out.",
"properties": {
"name": {
"type": "string",
"examples": [
"Halyard Remodeling LLC"
]
},
"attention": {
"type": "string",
"examples": [
"Accounts Payable"
]
},
"address": {
"type": "string",
"examples": [
"PO Box 4412, Fernandina Beach, FL 32035"
]
},
"email": {
"type": "string",
"format": "email",
"examples": [
"ap@halyardremodel.test"
]
}
}
},
"line_items": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"description",
"quantity",
"unit_price"
],
"properties": {
"sku": {
"type": "string",
"examples": [
"TIL-3060-MW"
]
},
"description": {
"type": "string",
"examples": [
"Matte white wall tile, 3x6"
]
},
"detail": {
"type": "string",
"examples": [
"Dye lot must match across all cartons. Include 10% overage."
]
},
"quantity": {
"type": "number",
"minimum": 0,
"examples": [
46
]
},
"uom": {
"type": "string",
"default": "EA",
"description": "Unit of measure.",
"examples": [
"CTN"
]
},
"unit_price": {
"type": "number",
"minimum": 0,
"examples": [
38.4
]
}
}
}
}
}
}