DELETE
/api/public/v1/invoices/{invoiceId}

Delete an invoice

Permanently removes an invoice — the one delete in this API that is not soft. Only a VOIDED invoice qualifies: voiding is the reversible step, and deleting is for clearing a mistake that should never have existed. Anything live has to be voided first.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

invoices:write

Path Parameters

NameTypeRequiredDescription
invoiceIdstringRequiredInvoice ID.
DELETEExample request
curl
curl -X DELETE "https://www.pxb.app/api/public/v1/invoices/{invoiceId}" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Invoice deleted.",
  "content": {
    "invoiceId": "9f1c2f4e-6b3a-4f28-9c11-0a2b3c4d5e6f"
  }
}
400Example response
json
{
  "message": "Only a voided invoice can be deleted."
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Finances → Receivables
/finances/receivables
  1. Open the ⋯ menu on a voided invoice → Delete.