CreditNotes

Create a credit note from an invoice

A credit note is a derivative document — every credit note is created FROM an existing invoice. The body carries the source invoice_id (required) plus optional title and sezionale_id. All other fields (totals, customer, vehicle, seq number, timestamps) are derived from the source invoice or assigned server-side.

The source invoice MUST belong to the authenticated user's company. Unknown / cross-tenant invoice_ids return 404.

post/v1/credit-notes

Request

  • Base URL: https://api.officina.it
  • URL: https://api.officina.it/v1/credit-notes
  • Auth: HTTP bearer

Request body

invoice_idstring required

Source invoice UUID (must belong to caller's company).

titlestring nullable
sezionale_idstring nullable

Response

Credit note created.

object'credit_note' required
idstring required
invoice_idstring required

Source invoice UUID. Immutable.

seq_numberinteger nullable

Per-company / per-sezionale monotonic number. May be null on freshly created credit notes that have not yet been issued — clients render "Bozza" / draft when absent.

titlestring nullable
sezionale_idstring nullable
sezionale_codestring nullable

Denormalized sezionale code for display. Read-only; mutate via sezionale_id at creation time.

customer_namestring required

Denormalized display string of the source invoice's customer.

vehicle_namestring required

Denormalized display string of the linked vehicle.

vehicle_licensestring required
sdi_statusstring required

Italian SDI e-invoice lifecycle status. Empty string when no e-credit-note exists.

latest_sdi_statusstring required

Most recent terminal SDI status observed for this credit note's electronic counterpart.

total_before_taxnumber double required
total_taxnumber double required
total_after_taxnumber double required
created_atstring date-time required
updated_atstring date-time required
deleted_atstring date-time nullable

Soft-deletion timestamp. Populated on the response from DELETE /v1/credit-notes/{id}. Credit notes with a non-null deleted_at are not returned by list/detail endpoints — this field appears for the delete response only.

Example response

{
  "id": "cnt_4412"
}

Changes

No recorded changes to this operation across all 1 revision of this API.