Listings
listings-detail
GET /listings/{id}
Listing details
Get details object for a given listing.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost listing ID |
pms | query | QueryParamPMS | false | PMS integration name. If supplied, the API will perform a lookup using the PMS listing ID or the identifier supplied in my_id |
x-api-key | header | string | false | API Authentication Key |
Enumerated Values
Parameter | Value |
---|---|
pms | api |
pms | apaleo |
pms | beds24 |
pms | booking |
pms | cloudbeds |
pms | guesty |
pms | hostaway |
pms | hostfully |
pms | inforhms |
pms | impala |
pms | lavanda |
pms | myvr |
pms | opera |
pms | smartbnb |
pms | stayntouch |
pms | streamline |
pms | trackhs |
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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A listing object | ListingDetailsResponse |
400 | Bad Request | An error message | ErrorResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost listing ID |
callback | query | QueryParamCallback | false | Webhook URL to POST the list object. |
x-api-key | header | string | false | API Authentication Key |
body | body | ListingCreateRequest | false | JSON 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A listing object | ListingDetailsResponse |
400 | Bad Request | An error message | ErrorResponse |
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);
listings-search
GET /listings
Listing search
Return paginated list of listings matching the search criteria.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
status | query | QueryParamListingStatus | false | Listing status |
search | query | string | false | String search |
building | query | string | false | Building name |
x-api-key | header | string | false | API Authentication Key |
Enumerated Values
Parameter | Value |
---|---|
status | ACTIVE |
status | INACTIVE |
Example responses
200 Response
{
"total": 0,
"from": 0,
"size": 0,
"count": 0,
"items": [
{
"id": "string",
"status": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of listing objects | ListingSearchResponse |
400 | Bad Request | An error message | ErrorResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
callback | query | QueryParamCallback | false | Webhook URL to POST the list object. |
x-api-key | header | string | false | API Authentication Key |
body | body | ListingCreateRequest | false | JSON 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A listing object | ListingDetailsResponse |
400 | Bad Request | An error message | ErrorResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
x-api-key | header | string | false | API 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of listing objects | ListingPropertyTypesResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost listing ID |
x-api-key | header | string | false | API Authentication Key |
body | body | ListingSuperhogRequest | false | JSON 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Listing SuperHog connect or disconnect response | ListingSuperhogResponse |
400 | Bad Request | An error message | ErrorResponse |
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);