Skip to content

Delete invoices of a company (group level)

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

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

Group level, requires Enterprise Edition. Deletes the selected invoices of the given company. Same selectors as DELETE /invoices/:

  • 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.
company_id
required
integer

ID of a company in the group.

Example
117
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."
}

The resource does not exist or is not accessible with these credentials.

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
Examplegenerated
{
"detail": "example",
"code": "example"
}