PDI_
Physical-Digital Interface

The API
for paper.

Print your app's data onto a sheet. Let people check things off and write new ones in — with a pen. Photograph the page, and PDI returns exactly what changed as structured events. Paper and screen become two views of the same state.

Read the quickstartAPI reference
curl https://buildpdi.com/api/v1/documents
Tasks — Thursday
doc_8F31A2C4
Submit travel voucher
Call insurance
Finish reading
Buy printer ink
 
Scan this sheet with your app to sync changes
field.checkedref: task_482 · "Finish reading"
field.added"Buy printer ink" · confidence 0.98
The loop
1 · Print

POST your records to /documents. PDI lays them out as a sheet with checkboxes, ruled write-in lines, and a QR marker, and hands back a print URL.

2 · Write

The sheet lives in the physical world. Check boxes, cross things out, write new lines in — any pen, any handwriting, over any number of days.

3 · Scan

POST a photo to /captures. The QR identifies the exact printed instance; the parser reads every checkbox and every handwritten line.

4 · Sync

Differential PDI Sync compares what it sees against the sheet's known state and returns only the changes — as events your app applies in one loop.

Integration

Two calls. That's the product.

// 1 — put your data on paper
const pdi = new PDI({ apiKey: process.env.PDI_API_KEY });

const { document, print_url } = await pdi.documents.create({
  template: "task-list",
  title: "Warehouse pick list — Bay 4",
  items: skus.map(s => ({ ref: s.id, text: s.label })),
  blank_lines: 6,
});
// -> open print_url, hit Print
// 2 — later, a photo comes back
const sync = await pdi.captures.process({ file: photo });

for (const ev of sync.events) {
  if (ev.type === "field.checked") markPicked(ev.field.record_ref);
  if (ev.type === "field.added")   createItem(ev.field.label);
}
// scanning the same sheet twice is a no-op

Your app decides what a checked box means — a completed task, a picked SKU, a present student, an inspected valve. PDI only speaks fields, so the same two calls fit to-do lists, pick lists, inspection forms, worksheets, and habit trackers.