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

Parameters: book_ksef_purchase_invoice
NameTypeDescription
ksef_number string required string KSeF number from list_ksef_purchase_invoices.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/ifirma/ksefs/7010003987-20261012-AB12CD34EF56-7A/purchase-invoice \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("ifirma", "book_ksef_purchase_invoice", {"ksef_number":"7010003987-20261012-AB12CD34EF56-7A"})
Node.js
const result = await cotlet.call('ifirma', 'book_ksef_purchase_invoice', {"ksef_number":"7010003987-20261012-AB12CD34EF56-7A"});
CLI
cotlet call ifirma book_ksef_purchase_invoice --data '{"ksef_number":"7010003987-20261012-AB12CD34EF56-7A"}'

Example response

JSON

{
  "ksef_number": "7010003987-20261012-AB12CD34EF56-7A",
  "booked": true,
  "seller_number": "FV 118/2026",
  "gross": 800
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.