Skip to main content
POST
/
v1
/
hotel-stays
/
bulk-delete
Bulk Delete Hotel Stays
const options = {
  method: 'POST',
  headers: {
    Authorization: '<authorization>',
    'x-organization-id': '<x-organization-id>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({hotel_stay_ids: {}})
};

fetch('https://api.dcycle.io/v1/hotel-stays/bulk-delete', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "deleted": {},
  "failed": {}
}

Bulk Delete Hotel Stays

Permanently deletes multiple hotel stay records and their associated total_impacts rows in a single request. Stays that belong to a different organization are reported as failed rather than raising an error.

Request

Headers

Authorization
string
required
Bearer token for authenticationExample: Bearer sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Request Body

hotel_stay_ids
array[string]
required
List of hotel stay UUIDs to deleteExample: ["550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001"]

Response

deleted
array[string]
UUIDs of hotel stays that were successfully deleted
failed
array[string]
UUIDs that could not be deleted (not found or belong to a different organization)

Example

curl -X POST "https://api.dcycle.io/v1/hotel-stays/bulk-delete" \
  -H "Authorization: Bearer ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}" \
  -H "Content-Type: application/json" \
  -d '{
    "hotel_stay_ids": [
      "550e8400-e29b-41d4-a716-446655440000",
      "550e8400-e29b-41d4-a716-446655440001"
    ]
  }'

Successful Response

{
  "deleted": [
    "550e8400-e29b-41d4-a716-446655440000"
  ],
  "failed": [
    "550e8400-e29b-41d4-a716-446655440001"
  ]
}

Delete Hotel Stay

Delete a single hotel stay

List Hotel Stays

Browse all hotel stays