Skip to main content

Listings

Listing details

GET /listings/{id}

Get details object for a given listing.

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost listing ID
pmsqueryQueryParamPMSfalsePMS integration name. If supplied, the API will perform a lookup using the PMS listing ID or the identifier supplied in my_id
x-api-keyheaderstringfalseAPI Authentication Key

Enumerated Values

ParameterValue
pmsapi
pmsapaleo
pmsbeds24
pmsbooking
pmscloudbeds
pmsguesty
pmshostaway
pmshostfully
pmsinforhms
pmsimpala
pmslavanda
pmsmyvr
pmsopera
pmssmartbnb
pmsstayntouch
pmsstreamline
pmstrackhs

Example responses

200 Response

{
"id": "string",
"my_id": "string",
"user_id": "string",
"status": "string",
"name": "string",
"nickname": "string",
"property_type": "string",
"accommodates": 0,
"bedrooms": 0,
"bathrooms": 0,
"beds": 0,
"check_in_time": 0,
"check_out_time": 0,
"location": {
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"time_zone_name": "string",
"building": "string"
},
"created_at": "string",
"updated_at": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKA listing objectListingDetailsResponse
400Bad RequestAn error messageErrorResponse

Code samples

"""
Python Code Snippet
"""
import requests

headers = {
'Accept': 'application/json',
'x-api-key': 'string'
}

r = requests.get('https://data.autohost.ai/v1/listings/{id}', headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';

const headers = {
'Accept':'application/json',
'x-api-key':'string'
};

const response = await fetch('https://data.autohost.ai/v1/listings/{id}', {
method: 'get',

headers,
});
const responseJson = await response.json();
console.log(responseJson);

Listing update

PUT /listings/{id}

Update a given listing in your account.

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost listing ID
callbackqueryQueryParamCallbackfalseWebhook URL to POST the list object.
x-api-keyheaderstringfalseAPI Authentication Key
bodybodyListingCreateRequestfalseJSON object with listing details

Body parameter

{
"my_id": "UNIT100",
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "M5K 2A1",
"geo": {
"lat": 43.6486,
"lon": -79.3826
}
}
}

Example responses

200 Response

{
"id": "string",
"my_id": "string",
"user_id": "string",
"status": "string",
"name": "string",
"nickname": "string",
"property_type": "string",
"accommodates": 0,
"bedrooms": 0,
"bathrooms": 0,
"beds": 0,
"check_in_time": 0,
"check_out_time": 0,
"location": {
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"time_zone_name": "string",
"building": "string"
},
"created_at": "string",
"updated_at": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKA listing objectListingDetailsResponse
400Bad RequestAn error messageErrorResponse

Code samples

"""
Python Code Snippet
"""
import requests

input_body = {
"my_id": "UNIT100",
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "M5K 2A1",
"geo": {
"lat": 43.6486,
"lon": -79.3826
}
}
}

headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}

r = requests.put('https://data.autohost.ai/v1/listings/{id}', json=input_body, headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"my_id": "UNIT100",
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "M5K 2A1",
"geo": {
"lat": 43.6486,
"lon": -79.3826
}
}
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};

const response = await fetch('https://data.autohost.ai/v1/listings/{id}', {
method: 'put',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);

GET /listings

Return paginated list of listings matching the search criteria.

Parameters

NameInTypeRequiredDescription
statusqueryQueryParamListingStatusfalseListing status
searchquerystringfalseString search
buildingquerystringfalseBuilding name
x-api-keyheaderstringfalseAPI Authentication Key

Enumerated Values

ParameterValue
statusACTIVE
statusINACTIVE

Example responses

200 Response

{
"total": 0,
"from": 0,
"size": 0,
"count": 0,
"items": [
{
"id": "string",
"status": "string"
}
]
}

Responses

StatusMeaningDescriptionSchema
200OKA list of listing objectsListingSearchResponse
400Bad RequestAn error messageErrorResponse

Code samples

"""
Python Code Snippet
"""
import requests

headers = {
'Accept': 'application/json',
'x-api-key': 'string'
}

r = requests.get('https://data.autohost.ai/v1/listings', headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';

const headers = {
'Accept':'application/json',
'x-api-key':'string'
};

const response = await fetch('https://data.autohost.ai/v1/listings', {
method: 'get',

headers,
});
const responseJson = await response.json();
console.log(responseJson);

Listing create

POST /listings

Create a new listing in your account.

Parameters

NameInTypeRequiredDescription
callbackqueryQueryParamCallbackfalseWebhook URL to POST the list object.
x-api-keyheaderstringfalseAPI Authentication Key
bodybodyListingCreateRequestfalseJSON object with listing details

Body parameter

{
"my_id": "UNIT100",
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "M5K 2A1",
"geo": {
"lat": 43.6486,
"lon": -79.3826
}
}
}

Example responses

200 Response

{
"id": "string",
"my_id": "string",
"user_id": "string",
"status": "string",
"name": "string",
"nickname": "string",
"property_type": "string",
"accommodates": 0,
"bedrooms": 0,
"bathrooms": 0,
"beds": 0,
"check_in_time": 0,
"check_out_time": 0,
"location": {
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"time_zone_name": "string",
"building": "string"
},
"created_at": "string",
"updated_at": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKA listing objectListingDetailsResponse
400Bad RequestAn error messageErrorResponse

Code samples

"""
Python Code Snippet
"""
import requests

input_body = {
"my_id": "UNIT100",
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "M5K 2A1",
"geo": {
"lat": 43.6486,
"lon": -79.3826
}
}
}

headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}

r = requests.post('https://data.autohost.ai/v1/listings', json=input_body, headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"my_id": "UNIT100",
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "M5K 2A1",
"geo": {
"lat": 43.6486,
"lon": -79.3826
}
}
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};

const response = await fetch('https://data.autohost.ai/v1/listings', {
method: 'post',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);

Listing property types

GET /listings/propertyTypes

Return a static list of supported property types. This list is used to populate the property_type field when creating a new listing object.

Parameters

NameInTypeRequiredDescription
x-api-keyheaderstringfalseAPI Authentication Key

Example responses

A list of listing objects

[
"Apartment",
"Cottage",
"Condominium",
"House",
"Hotel",
"Boat",
"Camper/RV",
"Other"
]

Responses

StatusMeaningDescriptionSchema
200OKA list of listing objectsListingPropertyTypesResponse

Code samples

"""
Python Code Snippet
"""
import requests

headers = {
'Accept': 'application/json',
'x-api-key': 'string'
}

r = requests.get('https://data.autohost.ai/v1/listings/propertyTypes', headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';

const headers = {
'Accept':'application/json',
'x-api-key':'string'
};

const response = await fetch('https://data.autohost.ai/v1/listings/propertyTypes', {
method: 'get',

headers,
});
const responseJson = await response.json();
console.log(responseJson);

Listing manage SuperHog connection

POST /listings/{id}/superhog

Connect or disconnect your listings from SuperHog.

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost listing ID
x-api-keyheaderstringfalseAPI Authentication Key
bodybodyListingSuperhogRequestfalseJSON object with listing details

Body parameter

{
"action": "connect"
}

Example responses

Listing SuperHog connect or disconnect response

{
"autohost_id": "xyxyxyxyxyxyx",
"superhog_id": "abcd1234"
}
{
"autohost_id": "xyxyxyxyxyxyx",
"superhog_id": null
}

400 Response

{
"error": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKListing SuperHog connect or disconnect responseListingSuperhogResponse
400Bad RequestAn error messageErrorResponse

Code samples

"""
Python Code Snippet
"""
import requests

input_body = {
"action": "connect"
}

headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}

r = requests.post('https://data.autohost.ai/v1/listings/{id}/superhog', json=input_body, headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"action": "connect"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};

const response = await fetch('https://data.autohost.ai/v1/listings/{id}/superhog', {
method: 'post',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);

Schemas

QueryParamPMS

"api"

Properties

NameTypeRequiredRestrictionsDescription
anonymousstringfalsenonenone

Enumerated Values

PropertyValue
anonymousapi
anonymousapaleo
anonymousbeds24
anonymousbooking
anonymouscloudbeds
anonymousguesty
anonymoushostaway
anonymoushostfully
anonymousinforhms
anonymousimpala
anonymouslavanda
anonymousmyvr
anonymousopera
anonymoussmartbnb
anonymousstayntouch
anonymousstreamline
anonymoustrackhs

ListingDetailsResponse

{
"id": "string",
"my_id": "string",
"user_id": "string",
"status": "string",
"name": "string",
"nickname": "string",
"property_type": "string",
"accommodates": 0,
"bedrooms": 0,
"bathrooms": 0,
"beds": 0,
"check_in_time": 0,
"check_out_time": 0,
"location": {
"street": "string",
"city": "string",
"state": "string",
"country": "string",
"time_zone_name": "string",
"building": "string"
},
"created_at": "string",
"updated_at": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
idstringfalsenonenone
my_idstringfalsenonenone
user_idstringfalsenonenone
statusstringfalsenonenone
namestringfalsenonenone
nicknamestringfalsenonenone
property_typestringfalsenonenone
accommodatesnumberfalsenonenone
bedroomsnumberfalsenonenone
bathroomsnumberfalsenonenone
bedsnumberfalsenonenone
check_in_timenumberfalsenonenone
check_out_timenumberfalsenonenone
locationobjectfalsenonenone
» streetstringfalsenonenone
» citystringfalsenonenone
» statestringfalsenonenone
» countrystringfalsenonenone
» time_zone_namestringfalsenonenone
» buildingstringfalsenonenone
created_atstringfalsenonenone
updated_atstringfalsenonenone

ErrorResponse

{
"error": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
errorstringfalsenonenone

ListingCreateRequest

{
"id": "string",
"my_id": "string",
"status": "ACTIVE",
"name": "string",
"nickname": "string",
"property_type": "Apartment",
"accommodates": 0,
"bedrooms": 0,
"bathrooms": 0,
"beds": 0,
"check_in_time": 0,
"check_out_time": 0,
"location": {
"street": "string",
"city": "string",
"country": "string",
"state": "string",
"zipcode": "string",
"timezone": "string",
"building": "string",
"address": "string",
"floor": "string",
"apartment": "string",
"geo": {
"lat": 0,
"lon": 0
}
},
"pictures": {
"large_url": "string",
"regular_url": "string",
"thumbnail_url": "string"
}
}

Properties

NameTypeRequiredRestrictionsDescription
idstringfalsenoneAutohost listing ID. Used for updating an existing listing.
my_idstringtruenoneYour unique identifier for this listing. Alphanumeric characters only, no spaces or special characters.
statusstringtruenoneListing status. Must be ACTIVE or INACTIVE.
namestringtruenonePublic-facing name for the listing.
nicknamestringfalsenoneInternal nickname for the listing. Defaults to the value of name if not provided.
property_typestringfalsenoneType of property for risk assessment.
accommodatesnumberfalsenoneMaximum number of guests. Defaults to 2.
bedroomsnumberfalsenoneNumber of bedrooms. Defaults to 1.
bathroomsnumberfalsenoneNumber of bathrooms. Defaults to 1.
bedsnumberfalsenoneNumber of beds. Defaults to 1.
check_in_timenumberfalsenoneCheck-in hour (0-24). Defaults to 16.
check_out_timenumberfalsenoneCheck-out hour (0-24). Defaults to 11.
locationobjecttruenoneListing location. Required fields: street, city, country, state, zipcode. Timezone is derived automatically if not provided (from geo coordinates first, then via address geocoding as a deprecated fallback). Providing timezone or geo coordinates directly is recommended.
» streetstringtruenoneStreet address.
» citystringtruenoneCity name.
» countrystringtruenoneCountry name.
» statestringtruenoneState or province code (e.g. ON, CA, NY).
» zipcodestringtruenonePostal or ZIP code.
» timezonestringfalsenoneIANA timezone identifier (e.g. America/Toronto, Europe/London). Optional — if not provided, derived from geo coordinates (preferred) or via address geocoding (deprecated fallback). Recommended to provide explicitly or via geo coordinates.
» buildingstringfalsenoneBuilding identifier for grouping listings. Alphanumeric only, no spaces or special characters.
» addressstringfalsenoneFull formatted address string.
» floorstringfalsenoneFloor number.
» apartmentstringfalsenoneApartment or unit number.
» geoobjectfalsenoneGeographic coordinates.
»» latnumberfalsenoneLatitude.
»» lonnumberfalsenoneLongitude.
picturesobjectfalsenoneListing images. If not provided on creation, default images are used.
» large_urlstringfalsenoneURL for the large listing image.
» regular_urlstringfalsenoneURL for the regular listing image.
» thumbnail_urlstringfalsenoneURL for the thumbnail listing image.

Enumerated Values

PropertyValue
statusACTIVE
statusINACTIVE
property_typeApartment
property_typeHouse
property_typeLoft
property_typeBoat
property_typeCamper/RV
property_typeCondominium
property_typeServiced Apartment
property_typeCottage
property_typeChalet
property_typeBed&Breakfast
property_typeVilla
property_typeTent
property_typeOther
property_typeCabin
property_typeTownhouse
property_typeBungalow
property_typeHut
property_typeDorm
property_typeParking Space
property_typePlane
property_typeTreehouse
property_typeYurt
property_typeTipi
property_typeIgloo
property_typeEarth House
property_typeIsland
property_typeCave
property_typeCastle
property_typeStudio
property_typeHotel

QueryParamCallback

"string"

Properties

NameTypeRequiredRestrictionsDescription
anonymousstringfalsenonenone

QueryParamListingStatus

"ACTIVE"

Properties

NameTypeRequiredRestrictionsDescription
anonymousstringfalsenonenone

Enumerated Values

PropertyValue
anonymousACTIVE
anonymousINACTIVE

ListingSearchResponse

{
"total": 0,
"from": 0,
"size": 0,
"count": 0,
"items": [
{
"id": "string",
"status": "string"
}
]
}

Properties

NameTypeRequiredRestrictionsDescription
totalnumberfalsenonenone
fromnumberfalsenonenone
sizenumberfalsenonenone
countnumberfalsenonenone
items[object]falsenonenone
» idstringfalsenonenone
» statusstringfalsenonenone

ListingPropertyTypesResponse

[
"string"
]

Properties

None

ListingSuperhogRequest

{
"action": "connect"
}

Properties

NameTypeRequiredRestrictionsDescription
actionstringfalsenonenone

Enumerated Values

PropertyValue
actionconnect
actiondisconnect

ListingSuperhogResponse

{
"autohost_id": "string",
"superhog_id": "string"
}

Properties

NameTypeRequiredRestrictionsDescription
autohost_idstringfalsenonenone
superhog_idstringfalsenonenone