Skip to main content

Listings

listings-detail

GET /listings/{id}

Listing details

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);

listings-update

PUT /listings/{id}

Listing update

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

{
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"nickname": "DT PH 100",
"property_type": "Condominium",
"accommodates": 2,
"bedrooms": 1,
"bathrooms": 1,
"beds": 1,
"check_in_time": 15,
"check_out_time": 10,
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "xxxxx"
}
}

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 = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}

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

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"nickname": "DT PH 100",
"property_type": "Condominium",
"accommodates": 2,
"bedrooms": 1,
"bathrooms": 1,
"beds": 1,
"check_in_time": 15,
"check_out_time": 10,
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "xxxxx"
}
};
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

Listing search

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);

listings-create

POST /listings

Listing create

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

{
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"nickname": "DT PH 100",
"property_type": "Condominium",
"accommodates": 2,
"bedrooms": 1,
"bathrooms": 1,
"beds": 1,
"check_in_time": 15,
"check_out_time": 10,
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "xxxxx"
}
}

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 = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}

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

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"status": "ACTIVE",
"name": "Beautiful Downtown View for Two",
"nickname": "DT PH 100",
"property_type": "Condominium",
"accommodates": 2,
"bedrooms": 1,
"bathrooms": 1,
"beds": 1,
"check_in_time": 15,
"check_out_time": 10,
"location": {
"street": "100 King West",
"city": "Toronto",
"country": "Canada",
"state": "ON",
"zipcode": "xxxxx"
}
};
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);

listings-propertyTypes

GET /listings/propertyTypes

Listing property types

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",
"Serviced Apartment",
"Boat",
"Camper/RV",
"Chalet",
"Bed&Breakfast",
"Villa",
"Tent",
"Other",
"Cabin",
"Townhouse",
"Bungalow",
"Hut",
"Dorm",
"Plane",
"Treehouse",
"Yurt",
"Tipi",
"Igloo",
"Earth House",
"Island",
"Cave",
"Castle",
"Studio"
]

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);

listings-superhog

POST /listings/{id}/superhog

Listing manage SuperHog connection

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

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

r = requests.post('https://data.autohost.ai/v1/listings/{id}/superhog', 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);