Purchase order template
Extract purchase order data from PDFs
Upload a purchase order and get back the PO number, buyer and supplier, ship-to address, dates, terms, totals and each ordered line with its item code, quantity and price.
No account needed for the Playground. The Purchase Order template is already picked for you.
At a glance
- 22 keys, including Line Items
- PDF, PNG and JPEG, including scans and photos
- Output: JSON, Excel (.xlsx), CSV
- Built to return null instead of guessing
- Documents are not stored after a request finishes
- Good for: sales order entry, three-way matching with invoices, supplier portals and erp imports
Keys
What gets extracted
The Purchase Order template, exactly as it is saved in a new workspace. Every key comes back in the response. A value that is not on the document is null.
| Key | Type | Description |
|---|---|---|
| PO NumberrequiredPurchase order number. | string | Purchase order number. |
| Order Daterequired | date | |
| Delivery DateRequested or promised delivery date. | date | Requested or promised delivery date. |
| Buyer Namerequired | string | |
| Buyer Address | string | |
| Supplier Namerequired | string | |
| Supplier Address | string | |
| Ship To Address | string | |
| CurrencyISO 4217 code, for example USD, EUR, or LKR. | string | ISO 4217 code, for example USD, EUR, or LKR. |
| Payment TermsFor example Net 30. | string | For example Net 30. |
| Shipping Method | string | |
| Subtotal | number | |
| Tax Amount | number | |
| Shipping | number | |
| Totalrequired | number | |
| Line ItemsrequiredOne entry per ordered line, in document order. | object[] | One entry per ordered line, in document order. |
| └ Item CodeItem code, part number, or SKU. | string | Item code, part number, or SKU. |
| └ Descriptionrequired | string | |
| └ Quantityrequired | number | |
| └ UnitUnit of measure, for example pcs or boxes. | string | Unit of measure, for example pcs or boxes. |
| └ Unit Pricerequired | number | |
| └ AmountrequiredLine total. | number | Line total. |
Good to know
Purchase order: keys worth knowing
What the trickier keys in the Purchase Order template hold, and how they relate.
PO Number
The buyer's order number. Invoices that quote it return it as Purchase Order Number in the invoice template, so orders and invoices can be joined.
Delivery Date and Ship To Address
Delivery Date is the requested or promised delivery date. Ship To Address is where the goods go, which is often a warehouse rather than Buyer Address.
Line Items[].Item Code
The part number or SKU as printed, with leading zeros and letter case kept. Use it with Quantity and Unit Price to match ordered lines to invoice lines.
Example
From purchase order to JSON
An illustrative purchase order with a made-up company and numbers, and the JSON the Purchase Order template returns for it. Keys that are not on the document come back as null.

{
"PO Number": "PO-7781",
"Order Date": "2026-10-18",
"Delivery Date": "2026-11-01",
"Buyer Name": "Acme Studio (Pvt) Ltd",
"Buyer Address": "45 Flower Road, Colombo 07",
"Supplier Name": "Northwind Supply Ltd",
"Supplier Address": "12 Harbour Road, Colombo 03",
"Ship To Address": "Acme Studio warehouse, 9 Baseline Road, Colombo 09",
"Currency": "USD",
"Payment Terms": "Net 30",
"Shipping Method": "courier",
"Subtotal": 1180,
"Tax Amount": 94.4,
"Shipping": 6.1,
"Total": 1280.5,
"Line Items": [
{
"Item Code": "CBL-50",
"Description": "Cat6 cable, 50 m",
"Quantity": 4,
"Unit": "pcs",
"Unit Price": 120,
"Amount": 480
},
{
"Item Code": "SW-24",
"Description": "Network switch, 24 port",
"Quantity": 2,
"Unit": "pcs",
"Unit Price": 350,
"Amount": 700
}
]
}Common gotchas
Where purchase order extraction trips up
Things that often catch people out with purchase order data, and how to handle them.
Two item codes on one line
Some POs print both the buyer's and the supplier's part number. The template has one Item Code field, so add a second field in the layout editor if you need both.
Units of measure
Quantity and Unit are copied as printed, so 2 boxes comes back as Quantity 2 with Unit boxes. Convert to your own stock unit in your code.
Tax and shipping lines
subtotal, tax_amount, shipping and total are separate keys, each copied as printed. A PO with no tax line returns tax_amount as null.
How it works
Three steps, no setup.
- Step 1
Upload the document
Drop a purchase order into the Playground. PDF, PNG and JPEG all work, including scans and phone photos.
- Step 2
Pick the template
Choose the Purchase Order layout. It is already in every new workspace and guest browser, and you can edit its keys.
- Step 3
Review and export
The model fills exactly the layout's keys, with numbers as numbers and dates as yyyy-mm-dd. Copy the fields or download Excel or CSV.
Playground
Try the Purchase Order template now
Upload a purchase order with the Purchase Order layout already picked. Edit the keys afterward if you need to match your own records.
FAQ
Purchase order extraction, answered.
Do purchase orders from different buyers work?
Yes. There is no per-layout setup. The model reads each document and fills the same keys, so POs from different buyers come back in one shape.
Can I import the order lines into a spreadsheet or ERP?
Yes. Download the result as CSV for one row per ordered line with the PO number, buyer and supplier repeated, or as Excel (.xlsx) with the header and lines on separate sheets. Over the API, add export=csv or export=xlsx.
Do you store my purchase order documents?
No. The file is processed in memory for the request and then dropped. Neither the document nor the extracted JSON is saved. Only a usage record is kept, with things like the time, page count and credits used.
Can I change the keys?
Yes. Every new workspace, and every guest browser, starts with the Purchase Order template as a normal layout. Edit it, rename keys, add keys or delete it. Changes are yours, and a deleted template does not come back.
What happens when a value is not on the document?
It comes back as null. doc2json is built to return null instead of guessing, so you can tell missing data from real data.
Is it free to try?
Yes. The Playground works without an account, using a small guest allowance. A free account adds monthly credits and saved layouts. One credit is one page.
Try it on your own purchase order.
Open the Playground with the Purchase Order template picked and drop in a file. Sign up free when you want saved layouts and exports at volume.