Skip to main content
POST
Bulk Delete by Filters

Bulk Delete by Filters

Delete all invoices that match the given filter criteria. Uses the same filters as the list endpoint plus a filter_hash for optimistic concurrency — ensuring you delete exactly what the user saw.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Query Parameters

At least one filter parameter (beyond facility_id and type) is required.
string
required
UUID of the facility
string
required
Invoice type: electricity, heat, water, recharge
string
Filter invoices on or after this date
string
Filter invoices on or before this date
string[]
Filter by status
string
Filter by CO2e calculation status
string[]
Filter by CUPS identifier
string[]
Filter by supplier UUID

Body Parameters

string
required
Hash from the list endpoint response. Must match the current filter set.

Example

Successful Response

Response

integer
Number of invoices successfully deleted
string[]
UUIDs of successfully deleted invoices
integer
Number of invoices that failed to delete
string[]
UUIDs of invoices that failed to delete
string
Human-readable summary message

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

409 Conflict

Cause: filter_hash doesn’t match — filters changed since the list was loaded

422 Unprocessable Entity

Cause: No narrowing filter provided beyond facility_id and type

Bulk Delete

Delete specific invoices by ID

Bulk Delete Preview

Preview what will be deleted