
210 × 297 mm
Packing slips
E-commerce packing slip
An A4 packing slip for online orders: an order-number barcode, ship-to and order details, items with SKU, variant, quantity and tick boxes, a note for items shipping in another parcel, an optional gift message and returns steps written in Markdown.
PDFA4 portraitLocale en-GBHTML + Jinja
Opens Dynamic Document API with this template preloaded in a free workspace.
Template language features
- Loops
- Conditionals
- Filters
- Date formatting
- Barcode
- Markdown
- Repeating table headers
Filters such as format_currency and qrcode are described in the template language reference.
Variables
Derived from the sample data: 7 top-level fields, 30 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| store | object | |
| store.name | string | "Hollowmere Goods" |
| store.tagline | string | "Homeware for slow mornings" |
| store.website | string | "hollowmere.example.com" |
| store.email | string | "hello@hollowmere.example.com" |
| store.returns_address | string | "Hollowmere Returns ⏎ Unit 9, Larkspur Trading …" |
| order | object | |
| order.number | string | "HM-104729" |
| order.placed_on | date | "2026-09-12" |
| order.packed_on | date | "2026-09-14" |
| order.shipping_method | string | "Tracked 48, no signature" |
| order.parcel_number | number | 1 |
| order.parcel_count | number | 2 |
| order.is_gift | boolean | true |
| customer | object | |
| customer.name | string | "Tomasz Wrenley" |
| customer.email | string | "t.wrenley@example.net" |
| ship_to | object | |
| ship_to.name | string | "Mira Castellane" |
| ship_to.address | string | "Flat 3, 41 Carrow Terrace ⏎ Dundee DD2 1LX ⏎ U…" |
| gift_message | object | |
| gift_message.text | string | "Happy housewarming, Mira! A few things for slo…" |
| gift_message.from | string | "Tomasz" |
| items | array<object> · 8 | |
| items[].sku | string | "HMG-MUG-OAT-35" |
| items[].name | string | "Stoneware mug" |
| items[].variant | string | "Oat glaze · 350 ml" |
| items[].quantity | number | 4 |
| items[].parcel | number | 1 |
| returns_instructions | string | "**Changed your mind?** Unused items can come b…" |
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": {
"store": {
"name": "Hollowmere Goods",
"tagline": "Homeware for slow mornings",
"website": "hollowmere.example.com",
"email": "hello@hollowmere.example.com",
"returns_address": "Hollowmere Returns\nUnit 9, Larkspur Trading Estate\nThetfield TF9 3QA\nUnited Kingdom"
},
"order": {
"number": "HM-104729",
"placed_on": "2026-09-12",
"packed_on": "2026-09-14",
"shipping_method": "Tracked 48, no signature",
"parcel_number": 1,
"parcel_count": 2,
"is_gift": true
},
"customer": {
"name": "Tomasz Wrenley",
"email": "t.wrenley@example.net"
},
"ship_to": {
"name": "Mira Castellane",
"address": "Flat 3, 41 Carrow Terrace\nDundee DD2 1LX\nUnited Kingdom"
},
"gift_message": {
"text": "Happy housewarming, Mira! A few things for slow Sunday breakfasts in the new flat.\nSee you at the end of the month.",
"from": "Tomasz"
},
"items": [
{
"sku": "HMG-MUG-OAT-35",
"name": "Stoneware mug",
"variant": "Oat glaze · 350 ml",
"quantity": 4,
"parcel": 1
},
{
"sku": "HMG-BWL-SAL-18",
"name": "Serving bowl",
"variant": "Salt glaze · 18 cm",
"quantity": 1,
"parcel": 1
}
],
"returns_instructions": "**Changed your mind?** Unused items can come back within 30 days of delivery, in their original packaging.\n\n1. Go to **hollowmere.example.com/returns** and enter your order number and delivery postcode.\n2. Choose a drop-off point or book a collection. We email you a prepaid label.\n3. Pack the items securely, attach the label and keep your proof of postage.\n\nRefunds go back to the original payment method within five working days of the parcel reaching us. Gift recipients receive store credit instead."
},
"output": {
"format": "pdf",
"filename": "packing-slip-ecommerce.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": {
"store": {
"name": "Hollowmere Goods",
"tagline": "Homeware for slow mornings",
"website": "hollowmere.example.com",
"email": "hello@hollowmere.example.com",
"returns_address": "Hollowmere Returns\nUnit 9, Larkspur Trading Estate\nThetfield TF9 3QA\nUnited Kingdom"
},
"order": {
"number": "HM-104729",
"placed_on": "2026-09-12",
"packed_on": "2026-09-14",
"shipping_method": "Tracked 48, no signature",
"parcel_number": 1,
"parcel_count": 2,
"is_gift": true
},
"customer": {
"name": "Tomasz Wrenley",
"email": "t.wrenley@example.net"
},
"ship_to": {
"name": "Mira Castellane",
"address": "Flat 3, 41 Carrow Terrace\nDundee DD2 1LX\nUnited Kingdom"
},
"gift_message": {
"text": "Happy housewarming, Mira! A few things for slow Sunday breakfasts in the new flat.\nSee you at the end of the month.",
"from": "Tomasz"
},
"items": [
{
"sku": "HMG-MUG-OAT-35",
"name": "Stoneware mug",
"variant": "Oat glaze · 350 ml",
"quantity": 4,
"parcel": 1
},
{
"sku": "HMG-BWL-SAL-18",
"name": "Serving bowl",
"variant": "Salt glaze · 18 cm",
"quantity": 1,
"parcel": 1
}
],
"returns_instructions": "**Changed your mind?** Unused items can come back within 30 days of delivery, in their original packaging.\n\n1. Go to **hollowmere.example.com/returns** and enter your order number and delivery postcode.\n2. Choose a drop-off point or book a collection. We email you a prepaid label.\n3. Pack the items securely, attach the label and keep your proof of postage.\n\nRefunds go back to the original payment method within five working days of the parcel reaching us. Gift recipients receive store credit instead."
},
"output": {
"format": "pdf",
"filename": "packing-slip-ecommerce.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": {
"store": {
"name": "Hollowmere Goods",
"tagline": "Homeware for slow mornings",
"website": "hollowmere.example.com",
"email": "hello@hollowmere.example.com",
"returns_address": "Hollowmere Returns\nUnit 9, Larkspur Trading Estate\nThetfield TF9 3QA\nUnited Kingdom",
},
"order": {
"number": "HM-104729",
"placed_on": "2026-09-12",
"packed_on": "2026-09-14",
"shipping_method": "Tracked 48, no signature",
"parcel_number": 1,
"parcel_count": 2,
"is_gift": True,
},
"customer": {
"name": "Tomasz Wrenley",
"email": "t.wrenley@example.net",
},
"ship_to": {
"name": "Mira Castellane",
"address": "Flat 3, 41 Carrow Terrace\nDundee DD2 1LX\nUnited Kingdom",
},
"gift_message": {
"text": "Happy housewarming, Mira! A few things for slow Sunday breakfasts in the new flat.\nSee you at the end of the month.",
"from": "Tomasz",
},
"items": [
{
"sku": "HMG-MUG-OAT-35",
"name": "Stoneware mug",
"variant": "Oat glaze · 350 ml",
"quantity": 4,
"parcel": 1,
},
{
"sku": "HMG-BWL-SAL-18",
"name": "Serving bowl",
"variant": "Salt glaze · 18 cm",
"quantity": 1,
"parcel": 1,
},
],
"returns_instructions": "**Changed your mind?** Unused items can come back within 30 days of delivery, in their original packaging.\n\n1. Go to **hollowmere.example.com/returns** and enter your order number and delivery postcode.\n2. Choose a drop-off point or book a collection. We email you a prepaid label.\n3. Pack the items securely, attach the label and keep your proof of postage.\n\nRefunds go back to the original payment method within five working days of the parcel reaching us. Gift recipients receive store credit instead.",
},
"output": {
"format": "pdf",
"filename": "packing-slip-ecommerce.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())