Send invoice to KSeF
Send one issued invoice to the Polish KSeF e-invoicing system.
POST https://cotlet.dev/api/v1/ifirma/invoices/{invoice_id}/to-ksef
Does what "Wyślij do KSeF" does and returns the first status, "Przekazana do wysyłki"; the KSeF number appears once the Ministry of Finance accepts it, so read it with get_invoice. KSeF must already be connected in the account. After sending, iFirma does not allow editing or deleting the invoice, and the issue date cannot be later than the sending date. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_invoices. |
Request
curl -X POST https://cotlet.dev/api/v1/ifirma/invoices/1/to-ksef \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("ifirma", "send_invoice_to_ksef", {"invoice_id":1}) const result = await cotlet.call('ifirma', 'send_invoice_to_ksef', {"invoice_id":1}); cotlet call ifirma send_invoice_to_ksef --data '{"invoice_id":1}' Example response
{
"invoice_id": 7020118,
"ksef_status": "queued",
"ksef_number": null
}