Skip to main content
POST
Bulk Delete Hotel Stays by Filters
← Hotel Stays API Deletes every hotel stay matching the given filters — the same filters GET /v1/hotel-stays accepts — and their associated total_impacts rows, in a single request. Powers “select all matching” in the UI: the client never has to page through the whole result set to collect ids first. The request must echo the filter_hash from the list response that showed those filters, to confirm the delete targets exactly what the caller saw. No filters at all is a valid request: it deletes every hotel stay in scope.

Request

Headers

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

Query Parameters

Same filters as GET /v1/hotel-stays: status[], start_date, end_date, name, file_id[], created_at_from, created_at_to. Pass the exact same query string you listed with.

Body

string
required
The filter_hash from the matching list response. A mismatch (filters changed since the list was loaded) returns 409 Conflict and deletes nothing.Example: d4f9a2b81c3e0f77

Response

integer
Number of hotel stays successfully deleted
array[string]
UUIDs of hotel stays that were successfully deleted
integer
Number of hotel stays that could not be deleted
array[string]
UUIDs that could not be deleted (outside the authorized organization scope)
string
Human-readable summary, e.g. "Successfully deleted 12 hotel stay(s)"

Example

Successful Response

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 the current filters — they changed since the list was loaded

422 Unprocessable Entity

Cause: Missing filter_hash in the body

List Hotel Stays

Browse all hotel stays and get a filter_hash

Bulk Delete by IDs

Delete an explicit list of hotel stay ids