Skip to content

Delete invoices

DELETE
/invoices/
curl --request DELETE \
--url https://app.commitly.com/api/invoices/ \
--header 'Authorization: Bearer <token>'

Warning: A DELETE without id, reference or source_id deletes every invoice these credentials can access (narrowed only by list filters sent in the same request) and still returns 204. Always send a selector.

Deletes the invoices selected by one of these query parameters:

  • reference: exact match on the invoice number. Repeat the parameter to delete several invoices (?reference=AR-007&reference=AR-008).
  • id: internal invoice ID.
  • source_id together with source.

There is no path per reference; /invoices/{id}/ uses the internal ID only.

reference
Array<string>

Invoice number, exact match. Repeat the parameter to select several invoices.

id
integer

Internal invoice ID.

source_id
string

source_id of the invoice. Send together with source.

source
string

source of the invoice. Send together with source_id.

Selected invoices deleted.

The access token is invalid or has expired. Request a new token. The message is localized (see Accept-Language).

Media typeapplication/json
object
detail
required

Error message.

string
code

Present only if the company’s edition does not include the function; value billing_plan_permission_denied.

string
Example
{
"detail": "Invalid token."
}
WWW-Authenticate
string

Authentication scheme, Bearer.

Example
Bearer

No access token was sent, or the credentials are not allowed to call this endpoint. If the company’s COMMITLY edition does not include the requested function, the body additionally contains "code": "billing_plan_permission_denied".

Media typeapplication/json
object
detail
required

Error message.

string
code

Present only if the company’s edition does not include the function; value billing_plan_permission_denied.

string
Example
{
"detail": "User must be authenticated to access this resource."
}