List and Unlist Properties

How to list on and hide properties from the booking channel marketplaces.

Overview

When you list a property, you make it visible and available for guests to book on its connected booking channels. On the other hand, unlisting a property means it becomes hidden from search results on the booking channel and is no longer visible or available to potential guests.

🚧

Guesty's Management of a Property

The activation/deactivation of a property in Guesty is not affected by listing or unlisting it. Refer to Deactivate and Activate a Property to learn more.


Available Endpoints

MethodEndpoint
PUT/listings/{id}

Key Request Parameters

Query Parameters

Query ParameterTypeDescriptionRequired
idstringThe listing _id.yes
updateSubUnitsbooleanInclude and set as true when wishing to affect a multi-unit and all its subunits.

Body Parameters

Body ParameterTypeDescriptionRequired
isListedbooleanSet it to true to list the property on the booking channels, and unlist to hide it from the channels.yes

Key Response Parameters

ParameterTypeDescription
isListedbooleanIf true the property is listed if false it's unlisted.
accountIdstringYour Guesty account ID.
_idstringThe Guesty ID of the property being affected.

Listing a Property

To list a property on the booking channels it's published or linked with, use the Update a listing endpoint to set "isListed" to true. Here are a couple of examples.

Examples

Single Listing/Unit

Use this request on single properties or individual subunits.

curl --request PUT 'https://open-api.guesty.com/v1/listings/66054019764cbb000f37c450' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
    "isListed": true
}'
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer {token}");

const raw = JSON.stringify({
  "isListed": true
});

const requestOptions = {
  method: "PUT",
  headers: myHeaders,
  body: raw,
  redirect: "manual"
};

fetch("https://open-api.guesty.com/v1/listings/66054019764cbb000f37c450", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'PUT',
  'hostname': 'open-api.guesty.com',
  'path': '/v1/listings/66054019764cbb000f37c450',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': '{token}',
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "isListed": true
});

req.write(postData);

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/listings/66054019764cbb000f37c450',
  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 =>'{
    "isListed": true
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {token}',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = json.dumps({
  "isListed": True
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {token}'
}
conn.request("PUT", "/v1/listings/66054019764cbb000f37c450", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "isListed": true,
    "accountId": "<string>",
    "_id": "66054019764cbb000f37c450"
}

Multi-Unit

To list a multi-unit and all its subunits at the same time, include the query parameter: updateSubUnits=true.

curl --request PUT 'https://open-api.guesty.com/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
    "isListed": true
}'
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer {token}");

const raw = JSON.stringify({
  "isListed": true
});

const requestOptions = {
  method: "PUT",
  headers: myHeaders,
  body: raw,
  redirect: "manual"
};

fetch("https://open-api.guesty.com/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'PUT',
  'hostname': 'open-api.guesty.com',
  'path': '/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer {token}'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "isListed": true
});

req.write(postData);

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true',
  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 =>'{
    "isListed": true
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {token}',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = json.dumps({
  "isListed": True
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {token}'
}
conn.request("PUT", "/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "isListed": true,
    "accountId": "<string>",
    "_id": "66054aa58ea6df0012a20b5e"
}

Unlisting a Property

To unlist a property from the booking channels it's published or linked with, use the Update a listing endpoint to set "isListed" to false. Here are a couple of examples.

Examples

Single Listing/Unit

Use this request on single properties or individual subunits.

curl --request PUT 'https://open-api.guesty.com/v1/listings/66054019764cbb000f37c450' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
    "isListed": false
}'
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer {token}");

const raw = JSON.stringify({
  "isListed": false
});

const requestOptions = {
  method: "PUT",
  headers: myHeaders,
  body: raw,
  redirect: "manual"
};

fetch("https://open-api.guesty.com/v1/listings/66054019764cbb000f37c450", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'PUT',
  'hostname': 'open-api.guesty.com',
  'path': '/v1/listings/66054019764cbb000f37c450',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': '{token}',
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "isListed": false
});

req.write(postData);

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/listings/66054019764cbb000f37c450',
  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 =>'{
    "isListed": false
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {token}',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = json.dumps({
  "isListed": False
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {token}'
}
conn.request("PUT", "/v1/listings/66054019764cbb000f37c450", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "isListed": false,
    "accountId": "<string>",
    "_id": "66054019764cbb000f37c450"
}

Multi-Unit

To unlist a multi-unit and all its subunits at the same time, include the query parameter: updateSubUnits=true.

curl --request PUT 'https://open-api.guesty.com/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
    "isListed": false
}'
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer {token}");

const raw = JSON.stringify({
  "isListed": false
});

const requestOptions = {
  method: "PUT",
  headers: myHeaders,
  body: raw,
  redirect: "manual"
};

fetch("https://open-api.guesty.com/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'PUT',
  'hostname': 'open-api.guesty.com',
  'path': '/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer {token}'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "isListed": false
});

req.write(postData);

req.end();
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://open-api.guesty.com/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true',
  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 =>'{
    "isListed": false
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer {token}',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

import http.client
import json

conn = http.client.HTTPSConnection("open-api.guesty.com")
payload = json.dumps({
  "isListed": False
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {token}'
}
conn.request("PUT", "/v1/listings/66054aa58ea6df0012a20b5e?updateSubUnits=true", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Response

{
    "isListed": false,
    "accountId": "<string>",
    "_id": "66054aa58ea6df0012a20b5e"
}