Skip to content
Preview of the Standard purchase order template

210 × 297 mm

Purchase orders

Standard purchase order

An A4 purchase order with buyer, supplier and delivery addresses, a required-by date calculated from the lead time, numbered order lines, subtotal, VAT and total derived from the lines, delivery instructions and an approval block that adds finance sign-off above a threshold.

PDFA4 portraitLocale en-GBHTML + JinjaHeader & footer

Opens Dynamic Document API with this template preloaded in a free workspace.

Template language features

  • Loops
  • Conditionals
  • Macros
  • Filters
  • Currency formatting
  • Date formatting
  • Repeating table headers
  • Header & footer
  • Page numbers

Filters such as format_currency and qrcode are described in the template language reference.

Variables

Derived from the sample data: 9 top-level fields, 44 paths in total. Send the same shape as data.

PathTypeExample
buyerobject
buyer.namestring"Stackyard Brewing Co. Ltd"
buyer.addressstring"The Maltings, 7 Stackyard Lane ⏎ Kendal LA9 4T…"
buyer.vat_idstring"GB 318 2264 50"
buyer.invoice_emailstring"payables@stackyard.example.com"
buyer_contactobject
buyer_contact.namestring"Rhiannon Tuckett"
buyer_contact.rolestring"Procurement Lead"
buyer_contact.emailstring"rhiannon.tuckett@stackyard.example.com"
buyer_contact.phonestring"+44 20 7946 0852"
supplierobject
supplier.namestring"Pellow & Grange Packaging Ltd"
supplier.accountstring"SUP-00412"
supplier.addressstring"Unit 14, Brindley Road Industrial Estate ⏎ War…"
supplier.emailstring"orders@pellowgrange.example.com"
deliver_toobject
deliver_to.namestring"Stackyard Brewing, Goods In"
deliver_to.addressstring"Bay 3, Kentmere Works, Quarry Row ⏎ Kendal LA9…"
deliver_to.hoursstring"Monday to Friday, 07:30–14:30"
deliver_to.contactstring"Warehouse team, +44 20 7946 0853"
orderobject
order.numberstring"PO-SB-2026-0388"
order.datedate"2026-09-15"
order.lead_time_daysnumber21
order.supplier_quotestring"Q-PG-11873"
order.payment_termsstring"30 days from the end of the invoice month"
order.cost_centrestring"OPS-PACK"
order.currencystring"GBP"
order.vat_ratenumber0.2
linesarray<object> · 8
lines[].codestring"PG-CAN-440-MB"
lines[].descriptionstring"Aluminium cans, 440 ml, matt black, unprinted"
lines[].unitstring"pallet of 8,280"
lines[].quantitynumber6
lines[].unit_pricenumber812.4
lines[].amountnumber4874.4
delivery_instructionsarray<string> · 4"Book a delivery slot with the warehouse team a…"
conditionsstring"Quote the PO number on every delivery note and…"
approvalsarray<object> · 3
approvals[].stepstring"Requested by"
approvals[].namestring"Rhiannon Tuckett"
approvals[].rolestring"Procurement Lead"
approvals[].datedate"2026-09-14"
approvals[].required_abovenumber5000

Render it with the API

After adding the template to your workspace, render it by ID and pass your data. Arrays are shortened here.

curl -X POST https://api-eu.dynamicdocumentapi.com/v1/renders \
  -H "Authorization: Bearer $DYNAMIC_DOCUMENT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "type": "template",
    "template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
  },
  "data": {
    "buyer": {
      "name": "Stackyard Brewing Co. Ltd",
      "address": "The Maltings, 7 Stackyard Lane\nKendal LA9 4TR\nUnited Kingdom",
      "vat_id": "GB 318 2264 50",
      "invoice_email": "payables@stackyard.example.com"
    },
    "buyer_contact": {
      "name": "Rhiannon Tuckett",
      "role": "Procurement Lead",
      "email": "rhiannon.tuckett@stackyard.example.com",
      "phone": "+44 20 7946 0852"
    },
    "supplier": {
      "name": "Pellow & Grange Packaging Ltd",
      "account": "SUP-00412",
      "address": "Unit 14, Brindley Road Industrial Estate\nWarrington WA2 8QZ\nUnited Kingdom",
      "email": "orders@pellowgrange.example.com"
    },
    "deliver_to": {
      "name": "Stackyard Brewing, Goods In",
      "address": "Bay 3, Kentmere Works, Quarry Row\nKendal LA9 6QQ\nUnited Kingdom",
      "hours": "Monday to Friday, 07:30–14:30",
      "contact": "Warehouse team, +44 20 7946 0853"
    },
    "order": {
      "number": "PO-SB-2026-0388",
      "date": "2026-09-15",
      "lead_time_days": 21,
      "supplier_quote": "Q-PG-11873",
      "payment_terms": "30 days from the end of the invoice month",
      "cost_centre": "OPS-PACK",
      "currency": "GBP",
      "vat_rate": 0.2
    },
    "lines": [
      {
        "code": "PG-CAN-440-MB",
        "description": "Aluminium cans, 440 ml, matt black, unprinted",
        "unit": "pallet of 8,280",
        "quantity": 6,
        "unit_price": 812.4,
        "amount": 4874.4
      },
      {
        "code": "PG-END-202-SL",
        "description": "Can ends, 202 diameter, silver",
        "unit": "box of 6,000",
        "quantity": 8,
        "unit_price": 96,
        "amount": 768
      }
    ],
    "delivery_instructions": [
      "Book a delivery slot with the warehouse team at least 48 hours in advance.",
      "Deliver on standard 1,200 × 1,000 mm pallets, stretch-wrapped, no higher than 1.8 m."
    ],
    "conditions": "Quote the PO number on every delivery note and invoice. Part deliveries only by prior agreement. All goods are inspected on arrival and may be returned if they do not match this order.",
    "approvals": [
      {
        "step": "Requested by",
        "name": "Rhiannon Tuckett",
        "role": "Procurement Lead",
        "date": "2026-09-14",
        "required_above": null
      },
      {
        "step": "Budget holder",
        "name": "Callum Everingham",
        "role": "Head of Operations",
        "date": "2026-09-15",
        "required_above": null
      }
    ]
  },
  "output": {
    "format": "pdf",
    "filename": "purchase-order-standard.pdf"
  }
}'