Purchases

Purchase orders to suppliers, vendor bills (accounts payable) and their payments: lifecycle, conversion and validations.

The purchases module covers the supplier workflow: the purchase order (what you order), the vendor bill (what you are billed and must pay) and vendor payments.

Scopes: purchases:read / purchases:write. Suppliers are managed with contacts:* (see Contacts and products).

Vendor bill or expense?

Vendor bills drive the purchasing workflow (order → bill → payment). To record a received invoice with its VAT breakdown so that it is booked and included in the VAT books, use expenses.

Purchase orders

POST/api/v1/purchase-orders/purchases:write
{
  "supplier": 45,
  "issue_date": "2026-11-01",
  "due_date": "2026-11-15",
  "vendor_reference": "PRV-88231",
  "notes": "Deliver to the Málaga warehouse",
  "lines": [
    { "description": "HP 59A black toner", "quantity": "4", "unit_price": "62.50", "tax_template": 1 },
    { "product": 210, "description": "A4 paper 80 g (box)", "quantity": "10", "unit_price": "21.90", "discount_percent": "5", "tax_template": 1 }
  ]
}
JSON
FieldDescription
supplierSupplier (required).
linesLines (required): description, quantity, unit_price (before taxes), discount_percent and, optionally, product, tax_template, withholding_template and surcharge_template.
issue_date, due_dateOrder date and expected date.
vendor_referenceThe supplier's reference or number.
seriesNumbering series of type PURCHASE_ORDER (see Settings).
currency, exchange_rateCurrency and exchange rate when not in euros.
statusdraft, sent, received, cancelled. Change it with the actions.

Amounts and quantities are decimal strings. The detail (GET /purchase-orders/{id}/) includes lines; the list does not. Until they are numbered, number is null.

OperationEndpoint
List / readGET /purchase-orders/ · GET /purchase-orders/{id}/
Update / deletePATCH /purchase-orders/{id}/ · DELETE /purchase-orders/{id}/
Mark as sentPOST /purchase-orders/{id}/send/
Mark as receivedPOST /purchase-orders/{id}/receive/
Convert into a vendor billPOST /purchase-orders/{id}/to-vendor-bill/ → 201 with the draft bill

Vendor bills

POST/api/v1/vendor-bills/purchases:write

Same body as an order (supplier, lines, dates, vendor_reference…). Statuses: draft → approved → partially_paid / paid (or overdue), and cancelled.

OperationEndpoint
Approve (assigns a number)POST /vendor-bills/{id}/approve/ with optional {"issue_date": "2026-11-03"}
CancelPOST /vendor-bills/{id}/cancel/
Generate the PDF (async)POST /vendor-bills/{id}/pdf/
EmailPOST /vendor-bills/{id}/email/ with {"to": ["purchasing@supplier.com"]}

Vendor payments

POST/api/v1/vendor-payments/purchases:write
{
  "bill": 77,
  "amount": "250.00",
  "date": "2026-11-20",
  "method": "transfer",
  "reference": "TRF-20261120-01"
}
JSON

method: transfer, cash, card, direct_debit. The bill must be approved and the amount must be greater than 0 and not exceed the outstanding balance; otherwise the API returns 400 validation_error. Once the total is covered, the bill becomes paid.

Events

purchase_order.created, .updated, .sent, .received, .cancelled, .deleted and vendor_bill.created, .updated, .approved, .paid, .cancelled, .deleted. See webhooks.