Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Delete an invoice

Deletes a new invoice that has not yet been sent. When an invoice is deleted, all included billable items are returned to potential invoices and can be billed again.

What happens when you delete an invoice:

  1. The invoice is soft-deleted (marked with deletedAt timestamp)
  2. All included billable items are reverted to unbilled status:
    • Tasks: marked as unbilled (billed=false), invoice time cleared
    • Express quotations: marked as unbilled (billed=false)
    • Subscription billing rows: marked as unbilled (billed=false)
    • Projects: marked as unbilled (billed=false) for SingleProject invoices
    • Interim payments: marked as unbilled (isBilled=false)
  3. All items become available again in potential invoices (GET /billing/potential-invoices)

Important restrictions:

  • Only invoices with status “New” can be deleted
  • Invoices that have been sent (status “Sent”, “Paid”, or “Cancelled”) cannot be deleted
  • To cancel a sent invoice, use the cancel invoice endpoint instead

Use cases:

  • Remove an invoice that was created by mistake
  • Return items to potential invoices for re-billing with different settings
  • Correct billing errors before sending the invoice

What is returned:

  • Success response confirming the invoice was deleted
  • All billable items are automatically returned to potential invoices
DELETE/billing/invoices/{id}
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
idstring<uuid>required

Invoice ID (UUID)

Responses
200

Invoice deleted successfully. All billable items have been returned to potential invoices.

successbooleanrequired

Operation success flag

400

Invoice cannot be deleted (only invoices with status "New" can be deleted)

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

404

Invoice not found

Try it
Server
Authorization
Parameters
Request
curl -X DELETE "https://leadtime.app/api/public/billing/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "success": true
}