Create purchase entry
Book a supplier invoice as a purchase entry with its lines.
POST https://cotlet.dev/api/v1/exact-online/invoices/{invoice_number}/purchase-entries
write Confirm
Creates a purchase entry for a supplier with its lines, in one call. It returns the entry number and total. Attaching the invoice PDF is not part of this tool. It writes to the ledger. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| division integer | integer | Division (company) code from list_divisions. Default: the account's current division. |
| supplier string required | string | Relation name or account_id from search_relations. |
| invoice_number string required | string | The supplier's invoice number. |
| entry_date date required | date | Invoice date. |
| lines array required | array | Objects with gl_account, description, amount and vat_code. |
Request
curl -X POST https://cotlet.dev/api/v1/exact-online/invoices/invoice%20number/purchase-entries \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"supplier":"supplier","entry_date":"2026-10-01","lines":"lines"}' result = client.call("exact-online", "create_purchase_entry", {"supplier":"supplier","invoice_number":"invoice number","entry_date":"2026-10-01","lines":"lines"}) const result = await cotlet.call('exact-online', 'create_purchase_entry', {"supplier":"supplier","invoice_number":"invoice number","entry_date":"2026-10-01","lines":"lines"}); cotlet call exact-online create_purchase_entry --data '{"supplier":"supplier","invoice_number":"invoice number","entry_date":"2026-10-01","lines":"lines"}' Example response
{
"entry_number": 70000456,
"supplier": "Acme Supplies",
"invoice_number": "2026-118",
"entry_date": "2026-10-14",
"amount_excl_vat": 450,
"currency": "EUR",
"status": "booked"
}