Sample invoice
Try the homepage invoice yourself.
The homepage, PDF, and authored response share invoice SYN-HOME-2001: two rows, an 80.00 USD subtotal, 6.40 USD tax, and an 86.40 USD total. Use the SDK or the published n8n template to submit those same bytes.
On this page
Download the invoice and example result
This prepared response follows the API schema. It is an example, not a recorded extraction or an accuracy benchmark. The document ID, timestamps, and processing time are sample values. Your run may return different data, checks, or status. The PDF contains no real customer data.
Run with the SDK
Use Node.js 22 or newer in a server environment, an API key, and an active Trial or paid plan. Download the PDF above and save it as synthetic-itemized.pdf in an empty working directory.
npm install @temlavo/sdk@1View on npm (opens in a new tab)
Set INVOICE_API_KEY in your server environment. Save this ESM example as itemized-example.mjs beside the PDF:
import { createHash } from 'node:crypto';
import { readFile, writeFile } from 'node:fs/promises';
import { InvoiceClient } from '@temlavo/sdk';
const apiKey = process.env.INVOICE_API_KEY;
if (!apiKey) throw new Error('Set INVOICE_API_KEY in your server environment.');
const file = await readFile('./synthetic-itemized.pdf');
if (file.byteLength !== 5998 ||
createHash('sha256').update(file).digest('hex') !== '7c443ed6cf071ef0e82325ea091a7b78bd1f904ea52fb2127e8091d4cae1f03f') {
throw new Error('The synthetic invoice bytes do not match this example.');
}
const client = new InvoiceClient({ apiKey });
const result = await client.documents.process({
file,
filename: 'synthetic-itemized.pdf',
contentType: 'application/pdf',
idempotencyKey: 'temlavo-example-itemized-v1',
policy: { lineItems: 'advisory', requiredFields: [] },
});
// Save this synthetic run locally, then inspect the returned status and checks.
await writeFile('./itemized-live-result.json', JSON.stringify(result, null, 2));
if (result.status === 'failed') {
console.error(result.error.code);
} else {
console.log(result.status, result.validation.checks);
}
node itemized-example.mjsThe SDK creates the document, uploads directly, confirms the upload, and polls while respecting Retry-After. Keep the sample bytes, filename, policy, and stable demo key unchanged when retrying. An SDK timeout stops waiting; it does not cancel server work. Use the error's documentId to retrieve the same document.
A new logical submission needs a new key and may trigger duplicate review. Use this sample key only for this synthetic invoice. See errors and recovery before adapting retries.
Run with n8n
You need n8n, an active Trial or paid plan, and a Temlavo API key. Start a trial. After signup, create an API key. Running the sample uses your account's processed-page allowance; downloading it needs no signup.
Use the published n8n template with this PDF as its invoice input. Follow the standalone setup instructions to run it manually, or pass the file from your existing parent workflow. Use synthetic-itemized.pdf, MIME type application/pdf, and saved submission tokens you generate once for this logical invoice. Reuse the same file, metadata, policy, and tokens for retries.
Inspect document.data in the returned item. A fresh submission after an earlier run of this PDF may need review because of duplicate detection; use the returned status and checks. This optional test file uses the same published template as your own invoices.
Compare the result
Expect Example Harbor Supply LLC, PO-EXAMPLE-2048, an issue date of 2026-08-01, and row totals of 50.00 and 30.00 USD. Tax ID is absent and stays null. Monetary values are decimal strings.
The authored result uses advisory line-item policy and has no blocking check. Its expected completed status assumes no earlier matching invoice in the same duplicate scope. A real result's authenticated status and checks decide the next step; the authored response is never a substitute. Completed can include warnings and does not certify extraction correctness or authorize payment.