
8.5 × 11 in
Purchase orders
Blanket purchase order
A US Letter blanket purchase order: an agreed price list with committed quantities, a month-by-item delivery schedule built with nested loops, the total committed value against a not-to-exceed ceiling, release conditions in Markdown and signature lines.
PDFLetter portraitLocale en-USHTML + 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
- Markdown
- 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: 8 top-level fields, 47 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| buyer | object | |
| buyer.name | string | "Wrenhaven Café Group, Inc." |
| buyer.address | string | "300 Alder Mill Road, Suite 410 ⏎ Portland, OR …" |
| buyer.contact | string | "Marisol Achterberg" |
| buyer.contact_title | string | "Purchasing Manager" |
| buyer.email | string | "purchasing@wrenhaven.example.com" |
| buyer.phone | string | "+1 202-555-0118" |
| supplier | object | |
| supplier.name | string | "Kettlebrook Roasting Collective" |
| supplier.address | string | "1880 Sawmill Creek Rd ⏎ Eugene, OR 97402" |
| supplier.vendor_number | string | "V-10233" |
| supplier.contact | string | "Desmond Arkwright" |
| supplier.email | string | "wholesale@kettlebrook.example.net" |
| ship_to | object | |
| ship_to.name | string | "Wrenhaven Central Kitchen" |
| ship_to.address | string | "77 Foundry Loop, Dock 2 ⏎ Portland, OR 97210" |
| ship_to.hours | string | "Tuesdays, 6:00–10:00 AM" |
| agreement | object | |
| agreement.number | string | "BPO-2026-014" |
| agreement.issue_date | date | "2026-09-15" |
| agreement.start_date | date | "2026-10-01" |
| agreement.months | number | 6 |
| agreement.currency | string | "USD" |
| agreement.not_to_exceed | number | 56000 |
| agreement.payment_terms | string | "Net 30 from each delivery" |
| agreement.freight | string | "Delivered, freight included" |
| price_list | array<object> · 6 | |
| price_list[].code | string | "KRC-ESP-5" |
| price_list[].name | string | "House espresso blend, whole bean" |
| price_list[].short_name | string | "Espresso" |
| price_list[].pack | string | "5 lb bag" |
| price_list[].unit_price | number | 52.5 |
| price_list[].committed_quantity | number | 372 |
| price_list[].committed_value | number | 19530 |
| schedule | array<object> · 6 | |
| schedule[].month | date | "2026-10-01" |
| schedule[].release | string | "R01" |
| schedule[].delivery_dates | array<date> · 2 | "2026-10-06" |
| schedule[].deliveries | array<object> · 6 | |
| schedule[].deliveries[].code | string | "KRC-ESP-5" |
| schedule[].deliveries[].quantity | number | 60 |
| schedule[].deliveries[].amount | number | 3150 |
| release_conditions | string | "1. **Releases.** Wrenhaven confirms each month…" |
| signatures | array<object> · 2 | |
| signatures[].label | string | "Authorized for the buyer" |
| signatures[].name | string | "Marisol Achterberg" |
| signatures[].title | string | "Purchasing Manager" |
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": "Wrenhaven Café Group, Inc.",
"address": "300 Alder Mill Road, Suite 410\nPortland, OR 97209",
"contact": "Marisol Achterberg",
"contact_title": "Purchasing Manager",
"email": "purchasing@wrenhaven.example.com",
"phone": "+1 202-555-0118"
},
"supplier": {
"name": "Kettlebrook Roasting Collective",
"address": "1880 Sawmill Creek Rd\nEugene, OR 97402",
"vendor_number": "V-10233",
"contact": "Desmond Arkwright",
"email": "wholesale@kettlebrook.example.net"
},
"ship_to": {
"name": "Wrenhaven Central Kitchen",
"address": "77 Foundry Loop, Dock 2\nPortland, OR 97210",
"hours": "Tuesdays, 6:00–10:00 AM"
},
"agreement": {
"number": "BPO-2026-014",
"issue_date": "2026-09-15",
"start_date": "2026-10-01",
"months": 6,
"currency": "USD",
"not_to_exceed": 56000,
"payment_terms": "Net 30 from each delivery",
"freight": "Delivered, freight included"
},
"price_list": [
{
"code": "KRC-ESP-5",
"name": "House espresso blend, whole bean",
"short_name": "Espresso",
"pack": "5 lb bag",
"unit_price": 52.5,
"committed_quantity": 372,
"committed_value": 19530
},
{
"code": "KRC-DRP-5",
"name": "Daily drip blend, whole bean",
"short_name": "Drip",
"pack": "5 lb bag",
"unit_price": 46.25,
"committed_quantity": 248,
"committed_value": 11470
}
],
"schedule": [
{
"month": "2026-10-01",
"release": "R01",
"delivery_dates": [
"2026-10-06",
"2026-10-20"
],
"deliveries": [
{
"code": "KRC-ESP-5",
"quantity": 60,
"amount": 3150
},
{
"code": "KRC-DRP-5",
"quantity": 40,
"amount": 1850
}
]
},
{
"month": "2026-11-01",
"release": "R02",
"delivery_dates": [
"2026-11-03",
"2026-11-17"
],
"deliveries": [
{
"code": "KRC-ESP-5",
"quantity": 64,
"amount": 3360
},
{
"code": "KRC-DRP-5",
"quantity": 42,
"amount": 1942.5
}
]
}
],
"release_conditions": "1. **Releases.** Wrenhaven confirms each monthly release in writing by the 20th of the previous month. A release fixes the delivery dates and quantities for that month.\n2. **Flexibility.** A release may move up to 15% above or below the scheduled quantity for any item at the agreed unit price. Larger changes need written agreement from both parties.\n3. **Prices.** Unit prices in the price list stay fixed for the whole agreement period.\n4. **Ceiling.** The total of all releases must stay within the not-to-exceed amount. The supplier should not ship quantities that would take the agreement above it.\n5. **Freshness.** Every bag shows its roast date, and coffee arrives no more than 7 days after roasting.\n6. **Invoicing.** Invoice each delivery separately and quote both the agreement number and the release number.",
"signatures": [
{
"label": "Authorized for the buyer",
"name": "Marisol Achterberg",
"title": "Purchasing Manager"
},
{
"label": "Accepted for the supplier",
"name": "Desmond Arkwright",
"title": "Wholesale Director"
}
]
},
"output": {
"format": "pdf",
"filename": "purchase-order-blanket.pdf"
}
}'const response = await fetch("https://api-eu.dynamicdocumentapi.com/v1/renders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DYNAMIC_DOCUMENT_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"buyer": {
"name": "Wrenhaven Café Group, Inc.",
"address": "300 Alder Mill Road, Suite 410\nPortland, OR 97209",
"contact": "Marisol Achterberg",
"contact_title": "Purchasing Manager",
"email": "purchasing@wrenhaven.example.com",
"phone": "+1 202-555-0118"
},
"supplier": {
"name": "Kettlebrook Roasting Collective",
"address": "1880 Sawmill Creek Rd\nEugene, OR 97402",
"vendor_number": "V-10233",
"contact": "Desmond Arkwright",
"email": "wholesale@kettlebrook.example.net"
},
"ship_to": {
"name": "Wrenhaven Central Kitchen",
"address": "77 Foundry Loop, Dock 2\nPortland, OR 97210",
"hours": "Tuesdays, 6:00–10:00 AM"
},
"agreement": {
"number": "BPO-2026-014",
"issue_date": "2026-09-15",
"start_date": "2026-10-01",
"months": 6,
"currency": "USD",
"not_to_exceed": 56000,
"payment_terms": "Net 30 from each delivery",
"freight": "Delivered, freight included"
},
"price_list": [
{
"code": "KRC-ESP-5",
"name": "House espresso blend, whole bean",
"short_name": "Espresso",
"pack": "5 lb bag",
"unit_price": 52.5,
"committed_quantity": 372,
"committed_value": 19530
},
{
"code": "KRC-DRP-5",
"name": "Daily drip blend, whole bean",
"short_name": "Drip",
"pack": "5 lb bag",
"unit_price": 46.25,
"committed_quantity": 248,
"committed_value": 11470
}
],
"schedule": [
{
"month": "2026-10-01",
"release": "R01",
"delivery_dates": [
"2026-10-06",
"2026-10-20"
],
"deliveries": [
{
"code": "KRC-ESP-5",
"quantity": 60,
"amount": 3150
},
{
"code": "KRC-DRP-5",
"quantity": 40,
"amount": 1850
}
]
},
{
"month": "2026-11-01",
"release": "R02",
"delivery_dates": [
"2026-11-03",
"2026-11-17"
],
"deliveries": [
{
"code": "KRC-ESP-5",
"quantity": 64,
"amount": 3360
},
{
"code": "KRC-DRP-5",
"quantity": 42,
"amount": 1942.5
}
]
}
],
"release_conditions": "1. **Releases.** Wrenhaven confirms each monthly release in writing by the 20th of the previous month. A release fixes the delivery dates and quantities for that month.\n2. **Flexibility.** A release may move up to 15% above or below the scheduled quantity for any item at the agreed unit price. Larger changes need written agreement from both parties.\n3. **Prices.** Unit prices in the price list stay fixed for the whole agreement period.\n4. **Ceiling.** The total of all releases must stay within the not-to-exceed amount. The supplier should not ship quantities that would take the agreement above it.\n5. **Freshness.** Every bag shows its roast date, and coffee arrives no more than 7 days after roasting.\n6. **Invoicing.** Invoice each delivery separately and quote both the agreement number and the release number.",
"signatures": [
{
"label": "Authorized for the buyer",
"name": "Marisol Achterberg",
"title": "Purchasing Manager"
},
{
"label": "Accepted for the supplier",
"name": "Desmond Arkwright",
"title": "Wholesale Director"
}
]
},
"output": {
"format": "pdf",
"filename": "purchase-order-blanket.pdf"
}
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const result = await response.json();
console.log(result);import os
import uuid
import requests
response = requests.post(
"https://api-eu.dynamicdocumentapi.com/v1/renders",
headers={
"Authorization": f"Bearer {os.environ['DYNAMIC_DOCUMENT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C",
},
"data": {
"buyer": {
"name": "Wrenhaven Café Group, Inc.",
"address": "300 Alder Mill Road, Suite 410\nPortland, OR 97209",
"contact": "Marisol Achterberg",
"contact_title": "Purchasing Manager",
"email": "purchasing@wrenhaven.example.com",
"phone": "+1 202-555-0118",
},
"supplier": {
"name": "Kettlebrook Roasting Collective",
"address": "1880 Sawmill Creek Rd\nEugene, OR 97402",
"vendor_number": "V-10233",
"contact": "Desmond Arkwright",
"email": "wholesale@kettlebrook.example.net",
},
"ship_to": {
"name": "Wrenhaven Central Kitchen",
"address": "77 Foundry Loop, Dock 2\nPortland, OR 97210",
"hours": "Tuesdays, 6:00–10:00 AM",
},
"agreement": {
"number": "BPO-2026-014",
"issue_date": "2026-09-15",
"start_date": "2026-10-01",
"months": 6,
"currency": "USD",
"not_to_exceed": 56000,
"payment_terms": "Net 30 from each delivery",
"freight": "Delivered, freight included",
},
"price_list": [
{
"code": "KRC-ESP-5",
"name": "House espresso blend, whole bean",
"short_name": "Espresso",
"pack": "5 lb bag",
"unit_price": 52.5,
"committed_quantity": 372,
"committed_value": 19530,
},
{
"code": "KRC-DRP-5",
"name": "Daily drip blend, whole bean",
"short_name": "Drip",
"pack": "5 lb bag",
"unit_price": 46.25,
"committed_quantity": 248,
"committed_value": 11470,
},
],
"schedule": [
{
"month": "2026-10-01",
"release": "R01",
"delivery_dates": ["2026-10-06", "2026-10-20"],
"deliveries": [
{
"code": "KRC-ESP-5",
"quantity": 60,
"amount": 3150,
},
{
"code": "KRC-DRP-5",
"quantity": 40,
"amount": 1850,
},
],
},
{
"month": "2026-11-01",
"release": "R02",
"delivery_dates": ["2026-11-03", "2026-11-17"],
"deliveries": [
{
"code": "KRC-ESP-5",
"quantity": 64,
"amount": 3360,
},
{
"code": "KRC-DRP-5",
"quantity": 42,
"amount": 1942.5,
},
],
},
],
"release_conditions": "1. **Releases.** Wrenhaven confirms each monthly release in writing by the 20th of the previous month. A release fixes the delivery dates and quantities for that month.\n2. **Flexibility.** A release may move up to 15% above or below the scheduled quantity for any item at the agreed unit price. Larger changes need written agreement from both parties.\n3. **Prices.** Unit prices in the price list stay fixed for the whole agreement period.\n4. **Ceiling.** The total of all releases must stay within the not-to-exceed amount. The supplier should not ship quantities that would take the agreement above it.\n5. **Freshness.** Every bag shows its roast date, and coffee arrives no more than 7 days after roasting.\n6. **Invoicing.** Invoice each delivery separately and quote both the agreement number and the release number.",
"signatures": [
{
"label": "Authorized for the buyer",
"name": "Marisol Achterberg",
"title": "Purchasing Manager",
},
{
"label": "Accepted for the supplier",
"name": "Desmond Arkwright",
"title": "Wholesale Director",
},
],
},
"output": {
"format": "pdf",
"filename": "purchase-order-blanket.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())