Invoices

Deletes a draft invoice.

Requires ManageInvoices and an Idempotency-Key header; no body. The API twin of the draft invoice page's "Delete Draft" button. Only a Draft can be deleted — a finalized invoice is voided instead (POST /api/v1/invoices/{id}/void). A consolidated draft, or a draft carrying a payment other than the job's transferred down payment, is refused. Money goes back where it came from: the job's down payment returns to the job (the next invoice re-applies it), applied store credit returns to the customer, and the job's or sales order's payment status is recalculated. A job moved from Completed to Invoiced by generating this draft goes back to Completed when no other non-voided invoice remains (counter-sales organizations keep Invoiced); its stock movements stay, and the job can simply be invoiced again (POST /api/v1/invoices/from-job). Deletion is permanent — there is no restore, and the invoice, its lines, payments and notes disappear from every synced device. Fires invoice.deleted. Repeating the request with the same Idempotency-Key replays the 204; a new key for an already-deleted id gets 404. The deletion is recorded on the job's history, attributed to the user who created the key. Example: DELETE /api/v1/invoices/57.

delete/api/v1/invoices/{id}

Request

  • Base URL: https://app.flexonthejob.com
  • URL: https://app.flexonthejob.com/api/v1/invoices/{id}
  • Auth: HTTP bearer

Path parameters

idinteger required

Numeric invoice id, e.g. 57.

Response

The draft invoice was deleted; no body.

Changes

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