Update a credit note

View as Markdown

Partial update. The type field is intentionally NOT updatable. Updating an issued credit note is allowed but rare — the document has already been accounted for as a VAT correction.

Authentication

AuthorizationBearer

JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.

OR
AuthorizationBearer
Lucanto API key. Two prefixes: - `lct_pat_<random><checksum>` — personal access token (owner: User) - `lct_live_<random><checksum>` — workspace token, live data Issue keys at `/settings/api_keys` (personal) or `/:workspace_id/settings/api_keys` (workspace). Plaintext token is shown once and never again.

Path parameters

workspace_idlongRequired>=1
Workspace ID. The numeric ID shown in your URLs.
idlongRequired>=1
Credit note ID

Request

This endpoint expects an object.
numberstringOptional
number_series_idlongOptional
statusstringOptional
issue_datedateOptional
delivery_datedateOptional
currencystringOptional
exchange_ratestringOptional

Decimal rate as document-currency per 1 base-currency. Optional — when creating a foreign-currency document without it, the ECB reference rate for the issue date is filled automatically (supported currencies only; otherwise it stays unset, i.e. 1.0).

order_numberstringOptional
customer_idlongOptional

Contact ID of the customer (from the contacts endpoints). Resolved to the contact’s legal entity, workspace-scoped. Required.

bank_account_idlongOptional
invoice_idlongOptional

Optional. Source invoice ID. When provided, a corrects link is established from the new credit note back to this invoice — queryable later as credit_note.invoice.

included_in_turnoverenumOptional
reverse_chargebooleanOptional
reverse_charge_textstringOptional
discount_descriptionstringOptional
discount_percentagestringOptional
discount_amountstringOptional
opening_textstringOptional
closing_textstringOptional
footer_notestringOptional
recipient_notestringOptional
internal_notestringOptional
pdf_languagestringOptional
pdf_localestringOptional
hide_pricesbooleanOptional
line_itemslist of objectsOptional

Response

OK
idlong
typeenum
statusenum

Credit note lifecycle state. The full payment-derived state set can appear here even though credit notes are not themselves a payment obligation. Practically: consumers should treat draft and exposed as the meaningful credit-note lifecycle states; the paid-family states reflect how the credit note has been applied against the source invoice.

currencystring

ISO-4217 currency code.

created_atdatetime
updated_atdatetime
numberstring or nullOptional

Credit note number (formatted via number_series, e.g. ‘DOB2026-0001’). Null for drafts.

issue_datedate or nullOptional
delivery_datedate or nullOptional
exchange_ratestring or nullOptionalformat: "decimal"
included_in_turnoverboolean or nullOptional
reverse_chargeboolean or nullOptional
reverse_charge_textstring or nullOptional
tax_schemestringOptional

Tax scheme (UNCL 5153), e.g. “VAT”.

due_datedate or nullOptional
due_daysinteger or nullOptional
order_numberstring or nullOptional
discount_descriptionstring or nullOptional
discount_percentagestring or nullOptionalformat: "decimal"
discount_amountstring or nullOptionalformat: "decimal"
opening_textstring or nullOptional
closing_textstring or nullOptional
footer_notestring or nullOptional
internal_notestring or nullOptional
pdf_languagestring or nullOptional
pdf_localestring or nullOptional
delivery_methodstring or nullOptional

Delivery/carrier mode

email_sent_atdatetime or nullOptional
amount_paidstring or nullOptionalformat: "decimal"

Amount settled so far (payments + advance deductions).

amount_duestring or nullOptionalformat: "decimal"

Outstanding amount (tax_inclusive − amount_paid).

paymentobjectOptional
import_sourceenum or nullOptional

Origin of the document. null when it was created in Lucanto, in which case totals are Lucanto’s EN 16931 calculation. A non-null value means the document was imported from that system and initially carries the source system’s own figures, preserved verbatim; those may differ by cents from Lucanto’s calculation because systems round VAT at different levels (line vs. category). insight means AI extraction from an uploaded file, not an import from another vendor. This records provenance only, not which calculation is currently in effect — editing line items or document discounts recomputes totals in Lucanto while leaving import_source set. In practice a document only ever carries kros_developer, isdoc, superfaktura or null. kros appears only on rows imported before the writer was renamed, and insight is written by the expense path only. The enum is kept as the union across resources rather than narrowed, so a legacy row cannot fail validation.

totalsobjectOptional
settingsobjectOptional
line_itemslist of objectsOptional
customerobject or nullOptional
supplierobject or nullOptional

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error