Canceling a Booking or Inquiry

Understand the different reservation cancellation flows.

Guesty allows you to cancel reservations via our Reservations API. Webhook notifications are also sent to your application's Notification URL whenever a reservation is canceled, be it Host or guest-initiated.

📘

Booking Channel Reservations

Apart from Vrbo reservations all booking channel reservations should be canceled in the booking channel's extranet. Learn more in our Help Center.

Available Endpoints

MethodEndpoint
PUT/reservations/{id}

Key Parameters

Path ParameterTypeDescriptionRequired
idstringThe reservation ID.✔️
Body ParameterTypeDescriptionRequired
statusstringThe reservation status: canceled/closed/declined✔️

Canceling a Confirmed Reservation

To cancel a confirmed reservation, simply push the canceled status to the reservation.

Request

curl --request PUT 'https://open-api.guesty.com/v1/reservations/64c9213ba097ec00417a9911' \
--data '{
    "status": "canceled"
}'
var raw = "{\n    \"status\": \"canceled\"\n}";

var requestOptions = {
  method: 'PUT',
  body: raw,
  redirect: 'manual'
};

fetch("https://open-api.guesty.com/v1/reservations/64c9213ba097ec00417a9911", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/reservations/64c9213ba097ec00417a9911',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
    "status": "canceled"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = "{\n    \"status\": \"canceled\"\n}"
headers = {}
conn.request("PUT", "/v1/reservations/64c9213ba097ec00417a9911", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "status": "canceled",
    "_id": "64c9213ba097ec00417a9911",
    "confirmationCode": "r2Bk86Yj4"
}

Cancelation Fees

If your rate plan or policy specifies a cancelation fee on confirmed reservations, the original fees will be canceled, and the cancellation fee will be added. For more information, refer to the following Help Center articles:

Canceling an Inquiry

An inquiry is a question or an unconfirmed reservation. If the property manager or host doesn't have the availability, the inquiry should be declined. If the guest initiates the cancelation or doesn't follow up, the status should be updated to closed.

Decline Inquiry Example

curl --request PUT 'https://open-api.guesty.com/v1/reservations/64c91cb2a097ec00417a8575' \
--data '{
    "status": "declined"
}'
var raw = "{\n    \"status\": \"declined\"\n}";

var requestOptions = {
  method: 'PUT',
  body: raw,
  redirect: 'manual'
};

fetch("https://open-api.guesty.com/v1/reservations/64c91cb2a097ec00417a8575", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/reservations/64c91cb2a097ec00417a8575',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
    "status": "declined"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = "{\n    \"status\": \"declined\"\n}"
headers = {}
conn.request("PUT", "/v1/reservations/64c91cb2a097ec00417a8575", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "status": "declined",
    "_id": "64c91cb2a097ec00417a8575",
    "confirmationCode": "jY5RZ8WVP"
}

Closed Inquiry Example

curl --request PUT 'https://open-api.guesty.com/v1/reservations/64cbb4abaf5a8400375e8b52' \
--data '{
    "status": "closed"
}'
var raw = "{\n    \"status\": \"closed\"\n}";

var requestOptions = {
  method: 'PUT',
  body: raw,
  redirect: 'manual'
};

fetch("https://open-api.guesty.com/v1/reservations/64cbb4abaf5a8400375e8b52", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/reservations/64cbb4abaf5a8400375e8b52',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => false,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
    "status": "closed"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = "{\n    \"status\": \"closed\"\n}"
headers = {}
conn.request("PUT", "/v1/reservations/64cbb4abaf5a8400375e8b52", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "_id": "64cbb4abaf5a8400375e8b52",
    "integration": {
        "bookingCom": {
            "invalidCreditCards": [],
            "reports": []
        },
        "_id": "5b9a25fd3bfa6d01b15a0b14",
        "platform": "manual",
        "limitations": {
            "availableStatuses": []
        }
    },
    "isBMApplied": true,
    "guestsCount": 1,
    "numberOfGuests": {
        "numberOfAdults": 1,
        "numberOfChildren": 0,
        "numberOfInfants": 0
    },
    "checkInDateLocalized": "2023-08-09",
    "checkOutDateLocalized": "2023-08-15",
    "status": "closed",
    "source": "manual",
    "listingId": "5b87b8a82940fc01da91241d",
    "guestId": "64c9213aa097ec00417a9910",
    "accountId": "5b852676354b34003f0a55eb",
    "confirmationCode": "GY-yJK5GpXM",
    "guest": {
        "_id": "64c9213aa097ec00417a9910"
    },
    "listing": {
        "prices": {
            "currency": "USD"
        },
        "_id": "5b87b8a82940fc01da91241d"
    },
    "hasChanged": false
}