Listings
Listing details
GET /listings/{id}
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);
Listing update
PUT /listings/{id}
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
{
"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
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A listing object | ListingDetailsResponse |
| 400 | Bad Request | An error message | ErrorResponse |
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);
Listing search
GET /listings
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);
Listing create
POST /listings
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
{
"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
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | A listing object | ListingDetailsResponse |
| 400 | Bad Request | An error message | ErrorResponse |
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
| 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",
"Hotel",
"Boat",
"Camper/RV",
"Other"
]
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);
Listing manage SuperHog connection
POST /listings/{id}/superhog
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
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
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | api |
| anonymous | apaleo |
| anonymous | beds24 |
| anonymous | booking |
| anonymous | cloudbeds |
| anonymous | guesty |
| anonymous | hostaway |
| anonymous | hostfully |
| anonymous | inforhms |
| anonymous | impala |
| anonymous | lavanda |
| anonymous | myvr |
| anonymous | opera |
| anonymous | smartbnb |
| anonymous | stayntouch |
| anonymous | streamline |
| anonymous | trackhs |
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
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | false | none | none |
| my_id | string | false | none | none |
| user_id | string | false | none | none |
| status | string | false | none | none |
| name | string | false | none | none |
| nickname | string | false | none | none |
| property_type | string | false | none | none |
| accommodates | number | false | none | none |
| bedrooms | number | false | none | none |
| bathrooms | number | false | none | none |
| beds | number | false | none | none |
| check_in_time | number | false | none | none |
| check_out_time | number | false | none | none |
| location | object | false | none | none |
| » street | string | false | none | none |
| » city | string | false | none | none |
| » state | string | false | none | none |
| » country | string | false | none | none |
| » time_zone_name | string | false | none | none |
| » building | string | false | none | none |
| created_at | string | false | none | none |
| updated_at | string | false | none | none |
ErrorResponse
{
"error": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| error | string | false | none | none |
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
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| id | string | false | none | Autohost listing ID. Used for updating an existing listing. |
| my_id | string | true | none | Your unique identifier for this listing. Alphanumeric characters only, no spaces or special characters. |
| status | string | true | none | Listing status. Must be ACTIVE or INACTIVE. |
| name | string | true | none | Public-facing name for the listing. |
| nickname | string | false | none | Internal nickname for the listing. Defaults to the value of name if not provided. |
| property_type | string | false | none | Type of property for risk assessment. |
| accommodates | number | false | none | Maximum number of guests. Defaults to 2. |
| bedrooms | number | false | none | Number of bedrooms. Defaults to 1. |
| bathrooms | number | false | none | Number of bathrooms. Defaults to 1. |
| beds | number | false | none | Number of beds. Defaults to 1. |
| check_in_time | number | false | none | Check-in hour (0-24). Defaults to 16. |
| check_out_time | number | false | none | Check-out hour (0-24). Defaults to 11. |
| location | object | true | none | Listing 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. |
| » street | string | true | none | Street address. |
| » city | string | true | none | City name. |
| » country | string | true | none | Country name. |
| » state | string | true | none | State or province code (e.g. ON, CA, NY). |
| » zipcode | string | true | none | Postal or ZIP code. |
| » timezone | string | false | none | IANA 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. |
| » building | string | false | none | Building identifier for grouping listings. Alphanumeric only, no spaces or special characters. |
| » address | string | false | none | Full formatted address string. |
| » floor | string | false | none | Floor number. |
| » apartment | string | false | none | Apartment or unit number. |
| » geo | object | false | none | Geographic coordinates. |
| »» lat | number | false | none | Latitude. |
| »» lon | number | false | none | Longitude. |
| pictures | object | false | none | Listing images. If not provided on creation, default images are used. |
| » large_url | string | false | none | URL for the large listing image. |
| » regular_url | string | false | none | URL for the regular listing image. |
| » thumbnail_url | string | false | none | URL for the thumbnail listing image. |
Enumerated Values
| Property | Value |
|---|---|
| status | ACTIVE |
| status | INACTIVE |
| property_type | Apartment |
| property_type | House |
| property_type | Loft |
| property_type | Boat |
| property_type | Camper/RV |
| property_type | Condominium |
| property_type | Serviced Apartment |
| property_type | Cottage |
| property_type | Chalet |
| property_type | Bed&Breakfast |
| property_type | Villa |
| property_type | Tent |
| property_type | Other |
| property_type | Cabin |
| property_type | Townhouse |
| property_type | Bungalow |
| property_type | Hut |
| property_type | Dorm |
| property_type | Parking Space |
| property_type | Plane |
| property_type | Treehouse |
| property_type | Yurt |
| property_type | Tipi |
| property_type | Igloo |
| property_type | Earth House |
| property_type | Island |
| property_type | Cave |
| property_type | Castle |
| property_type | Studio |
| property_type | Hotel |
QueryParamCallback
"string"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
QueryParamListingStatus
"ACTIVE"
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| anonymous | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| anonymous | ACTIVE |
| anonymous | INACTIVE |
ListingSearchResponse
{
"total": 0,
"from": 0,
"size": 0,
"count": 0,
"items": [
{
"id": "string",
"status": "string"
}
]
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| total | number | false | none | none |
| from | number | false | none | none |
| size | number | false | none | none |
| count | number | false | none | none |
| items | [object] | false | none | none |
| » id | string | false | none | none |
| » status | string | false | none | none |
ListingPropertyTypesResponse
[
"string"
]
Properties
None
ListingSuperhogRequest
{
"action": "connect"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| action | string | false | none | none |
Enumerated Values
| Property | Value |
|---|---|
| action | connect |
| action | disconnect |
ListingSuperhogResponse
{
"autohost_id": "string",
"superhog_id": "string"
}
Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| autohost_id | string | false | none | none |
| superhog_id | string | false | none | none |