Book KSeF purchase invoice
Book a purchase invoice from KSeF as a cost.
POST https://cotlet.dev/api/v1/ifirma/ksefs/{ksef_number}/purchase-invoice
write Confirm
Does what "Zaksięguj" does on a document from list_ksef_purchase_invoices. It works for VAT and corrective invoices; advance and final invoices are booked in an order and are refused. The cost then appears in Wydatki, Lista wydatków. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| ksef_number string required | string | KSeF number from list_ksef_purchase_invoices. |
Request
curl -X POST https://cotlet.dev/api/v1/ifirma/ksefs/7010003987-20261012-AB12CD34EF56-7A/purchase-invoice \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("ifirma", "book_ksef_purchase_invoice", {"ksef_number":"7010003987-20261012-AB12CD34EF56-7A"}) const result = await cotlet.call('ifirma', 'book_ksef_purchase_invoice', {"ksef_number":"7010003987-20261012-AB12CD34EF56-7A"}); cotlet call ifirma book_ksef_purchase_invoice --data '{"ksef_number":"7010003987-20261012-AB12CD34EF56-7A"}' Example response
{
"ksef_number": "7010003987-20261012-AB12CD34EF56-7A",
"booked": true,
"seller_number": "FV 118/2026",
"gross": 800
}