Document Types¶
InvoicePDFs is a document API. An invoice is just one of seven document
types — they are all created, rendered, and managed through the same
/api/v1/documents endpoint, selected with the
document_type field. The create payload, PDF rendering, and delivery flow are
identical across types; what differs is the lifecycle, the number prefix,
a couple of type-specific fields, and (for delivery notes) the line-item
shape.
List them at runtime with the public endpoint
GET /api/v1/reference/document-types.
Each entry carries the metadata a client needs to build a type-aware form —
number_prefix, payable, requires_source_document, supports_reason,
line_item_type (standard vs shipped), and the lifecycle actions — so the
comparison table below can be driven straight from the API.
At a glance¶
document_type |
Name | Number prefix | Lifecycle | Line items |
|---|---|---|---|---|
invoice |
Invoice | INV- |
Full (payable) | Priced |
proforma |
Proforma Invoice | PF- |
Full (payable) | Priced |
credit_note |
Credit Note | CN- |
Simple | Priced |
quote |
Quote | QUO- |
Simple | Priced |
receipt |
Receipt | RCP- |
Simple | Priced |
purchase_order |
Purchase Order | PO- |
Simple | Priced |
delivery_note |
Delivery Note | DN- |
Simple | Shipped (no prices) |
Lifecycle (see the Invoice Lifecycle guide for the full state machine):
- Full (payable) —
draft → finalized → sent → paid, plusvoid(fromfinalized/sent),mark-unpaid(paid → sent),archive, andrestore. Only invoices and pro-formas are payable. - Simple —
draft → finalized, plusvoid(fromfinalized),archive, andrestore. There is nosentorpaid— these documents aren't collected on.
Creating any type¶
Every type is created the same way — POST /api/v1/documents with a
document_type. Everything else (the number, parties, line_items, taxes,
discounts, branding, etc.) is the shared document payload documented in the
Documents API.
{
"document_type": "quote",
"number": "QUO-2026-014",
"issue_date": "2026-08-01",
"currency": "USD",
"business_profile_id": "biz_01ABC",
"customer_id": "cus_01XYZ",
"line_items": [
{ "name": "Website redesign", "quantity": "1", "unit_price": "8000.00" }
]
}
The types¶
Invoice (invoice)¶
The default type — a request for payment. Full payable lifecycle: finalize, send,
then mark paid (or mark-unpaid to reverse). This is what the rest of the guides
use as their running example.
Pro-forma invoice (proforma)¶
A preliminary bill sent before the final invoice (common for deposits,
customs, or quotes-turned-orders). It shares the invoice's full payable lifecycle,
so it can be finalized, sent, and marked paid — but its number prefix (PF-) and
type make clear it isn't the final tax invoice.
Credit note (credit_note)¶
Issued to refund or adjust a previously finalized invoice. Two fields matter:
| Field | Description |
|---|---|
source_document_id |
The original invoice this credit note is issued against |
reason |
Why the credit was issued (e.g. "Partial refund for overpayment") |
Simple lifecycle (draft → finalized, then void/archive) — credit notes are
issued, not collected on.
{
"document_type": "credit_note",
"number": "CN-2026-004",
"issue_date": "2026-08-05",
"currency": "USD",
"business_profile_id": "biz_01ABC",
"customer_id": "cus_01XYZ",
"source_document_id": "inv_01ABC",
"reason": "Partial refund for overpayment",
"line_items": [
{ "name": "Refund: Consulting", "quantity": "1", "unit_price": "150.00" }
]
}
Quote (quote)¶
A price estimate offered to a customer before any work is agreed. Simple lifecycle — a quote is finalized and sent for approval, not paid. When accepted, create a separate invoice (or pro-forma) for the same line items.
Receipt (receipt)¶
Proof that a payment was received. Simple lifecycle. Often generated after an invoice is marked paid, as a standalone confirmation for the customer's records.
Purchase order (purchase_order)¶
An order you place with a supplier (the buyer-side counterpart of an invoice). Simple lifecycle — finalized and sent to the vendor.
Delivery note (delivery_note)¶
A packing slip / shipment manifest that travels with goods. It uses a different,
price-less line-item shape — each line carries name, description,
quantity, unit, and sku, but no unit_price, taxes, or discounts (a
delivery note lists what shipped, not what it costs). Totals are therefore
zero. Simple lifecycle.
{
"document_type": "delivery_note",
"number": "DN-2026-021",
"issue_date": "2026-08-01",
"currency": "USD",
"business_profile_id": "biz_01ABC",
"customer_id": "cus_01XYZ",
"line_items": [
{ "name": "Widget A", "sku": "WID-A-001", "quantity": "40", "unit": "boxes" }
]
}
See also¶
- Documents API — the full create/read/update/ transition/render/deliver reference shared by all types.
- Invoice Lifecycle — the status state machine (full vs. simple) in detail.
- Calculation Logic — how totals are computed for priced types.