Skip to main content

Delete an invoice

DELETE 

/api/v1/invoices/:id

Delete an invoice by ID.

Authorization is based on the OAuth application's tenant access to the invoice's workspace.

Important: an invoice is deletable only when ALL of the following hold:

  • it is in "draft" lifecycle state;
  • it has never been exchanged over an external network (Peppol AS4 / French PPF), in either direction;
  • it has never entered the invoicing lifecycle (no recorded CDV status - deposit, inbound CDAR echo, ...);
  • for a Scribee-issued invoice, it has not already consumed a final sequential invoice number (imported invoices carrying an externally-issued number are exempt from this last check);
  • it has not already been included in an accounting export (any export run - pending or completed - that has already picked up the invoice's accounting entry; the entry must not silently disappear from that run mid-batch or after delivery);
  • it was not created by converting a quote (the quote's converted state must keep its invoice);
  • it is not matched to a confirmed purchase order or receipt (confirmed matches must be unlinked before deletion; proposed/rejected matches are removed with the invoice).

A non-destroyable invoice returns 422 with a precise error message identifying which of the above conditions failed.

Request​

Responses​

The invoice was deleted. The response body is empty.