Skip to main content
POST
Bulk Delete Workforce Absences by Filters
← Own Workforce API Delete every absence and accident record matching a filter set, without collecting ids. Filters go in the query string — the same ones List Workforce Absences Paginated accepts — and the body carries the filter_hash that list returned.

The filter_hash guard

filter_hash fingerprints the filters that produced a page, including consolidate_group and organization_id[]. Send it back; the server recomputes the fingerprint from the filters on this request. Match, and the delete proceeds over exactly the set you listed. Differ, and it answers 409 Conflict without deleting anything. It guards against that drift, not against a caller who deliberately sends different filters — the tenant boundary is the organization scoping, not the hash. Take the hash verbatim from the list response. At least one real filter is required. consolidate_group and organization_id[] do not count: they change the perimeter rather than select rows, so on their own they answer 422. That blocks a filterless call, not a broad one: a single wide created_at_from satisfies the rule and can still match every row, so read total from the list before you delete.

Request

Headers

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

Query Parameters

array[string]
Filter by source upload file. The nil UUID matches rows with no file.
datetime
Only rows created at or after this instant
datetime
Only rows created on or before this instant, inclusive
Free-text search, up to 255 characters
boolean
default:"false"
Widen the perimeter to the accepted family. Part of the hash; does not satisfy the “at least one filter” rule.
array[string]
Narrow a group-view delete to these organizations. Part of the hash; does not satisfy the “at least one filter” rule.

Body

string
required
The filter_hash from the paginated list response that showed you these rows

Response

Same shape as Bulk Delete Workforce Absences: success_count, success_ids, failed_count, failed_ids and message.

Example

Successful Response

Common Errors

401 Unauthorized

Cause: the key is invalid, or it does not belong to the organization in x-organization-id — the two are looked up as a pair. A request carrying no credentials at all answers AUTH_REQUIRED instead.

403 Forbidden

Cause: the key’s owner is not an enabled member of the organization, or their role cannot write.

409 Conflict

Cause: filter_hash does not match the filters on this request. Nothing was deleted.

422 Unprocessable Entity

Cause: no real filter was supplied — only consolidate_group and/or organization_id[], or nothing at all.

List absences paginated

Where filter_hash comes from

Bulk delete by ids

When you already hold the ids