CreditNotes

Soft-delete a credit note

Stamps deleted_at; the row stays in the database, and subsequent GET/PATCH/DELETE all 404.

If the credit note has an already-transmitted SDI electronic counterpart, deletion would orphan the electronic document and is refused with 409 conflict.

Returns the deleted resource (200) for shape consistency and so the client can render an undo banner.

delete/v1/credit-notes/{id}

Request

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

Response

Credit note soft-deleted.

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.