Skip to main content

Reservations

reservations-detail

GET /reservations/{id}

Reservation details

Get reservation details object.

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
pmsqueryQueryParamPMSfalsePMS integration name. If supplied, the API will assume the path parameter id is a confirmation code.
usepmsidquerystringfalseAssume id is the PMS reservation ID. Must be used with pms. (Default: false)
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",
"user_id": "string",
"confirmation_code": "string",
"status": "string",
"source": "string",
"listing_id": "string",
"listing_nickname": "string",
"listing_timezone_name": "string",
"number_of_guests": 0,
"nights": 0,
"total_price": 0,
"average_daily_rate": 0,
"check_in_date": "string",
"check_out_date": "string",
"guest_portal_url": "string",
"guest": {
"first_name": "string",
"last_name": "string",
"full_name": "string",
"phone": "string",
"email": "user@example.com",
"location": "string"
},
"identification": {
"first_name": "string",
"last_name": "string",
"middle_name": "string",
"document_number": "string",
"document_type": "string",
"nationality": "string",
"sex": "string",
"address": "string",
"birth_date": "string",
"expiry_date": "string",
"issue_date": "string"
},
"created_at": "string",
"updated_at": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation objectReservationDetailsResponse
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/reservations/{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/reservations/{id}', {
method: 'get',

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

reservations-update

PUT /reservations/{id}

Reservation update

Update reservation object

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
callbackqueryQueryParamCallbackfalseWebhook URL to post data back to once Screening AI finished analyzing the reservation.
syncqueryQueryParamSyncfalseExecution is asynchronous by default and the response, including reservation ID, will be returned via webhook when you supply the callback parameter. You can enable synchronous execution by setting sync=1, but it is discouraged when sending large amounts of requests.
skip_gpqueryQueryParamSkipGPfalseVerification analysis to proceed without dependence on Guest Portal completion. To be included for all reservations where the guest is not expected to complete the portal.
x-api-keyheaderstringfalseAPI Authentication Key
bodybodyReservationCreateRequestfalseJSON object with reservation details

Enumerated Values

ParameterValue
sync1
synctrue
skip_gp1
skip_gptrue

Body parameter

{
"guest": {
"first_name": "John",
"last_name": "Doe"
}
}

Example responses

200 Response

{
"id": "string",
"user_id": "string",
"confirmation_code": "string",
"status": "string",
"source": "string",
"listing_id": "string",
"listing_nickname": "string",
"listing_timezone_name": "string",
"number_of_guests": 0,
"nights": 0,
"total_price": 0,
"average_daily_rate": 0,
"check_in_date": "string",
"check_out_date": "string",
"guest_portal_url": "string",
"guest": {
"first_name": "string",
"last_name": "string",
"full_name": "string",
"phone": "string",
"email": "user@example.com",
"location": "string"
},
"identification": {
"first_name": "string",
"last_name": "string",
"middle_name": "string",
"document_number": "string",
"document_type": "string",
"nationality": "string",
"sex": "string",
"address": "string",
"birth_date": "string",
"expiry_date": "string",
"issue_date": "string"
},
"created_at": "string",
"updated_at": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation objectReservationDetailsResponse
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/reservations/{id}', headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"guest": {
"first_name": "John",
"last_name": "Doe"
}
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};

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

reservations-summary

GET /reservations/{id}/summary

Reservation summary

Get reservation verifications summary and details

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
pmsqueryQueryParamPMSfalsePMS integration name. If supplied, the API will assume the path parameter id is a confirmation code.
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

A reservation status object

{
"guest_portal_status": "COMPLETED",
"guest_portal_last_screen": "IDCheck",
"verification_composite_status": "review",
"verification_status": "review",
"verification_status_reason": "ID Check, Fraud Detection and Business Rules require your attention",
"risk_color": "yellow",
"top_risks": [
"High risk potential for fraud detected. You should only allow the guest to enter if you've spoken to the guest over the phone and have met them in person",
"Some fraud signals detected. Make sure to treat it carefully and manually review other information collected",
"Guest location was detected to be within 50 KM (30 miles) of the listing",
"Guest name does not match the name on the reservation",
"There are 1 reports for this user IP on Autohost Threat Intelligence with the following tags: 'spam' and 'suspicious'"
],
"top_recommendations": [
"Proceed to confirm the accuracy of all reservation details",
"Collect additional information about the guests, and the trip, that may have been unclear or undisclosed",
"Make sure the guests receive and acknowledge the house rules",
"For security purposes, make sure you have the guest's ID for your records"
],
"details": {
"general_risk": {
"status": "PASS",
"value": "YELLOW"
},
"background_check": {
"status": "DISABLED",
"value": ""
},
"credit_check": {
"status": "DISABLED",
"value": ""
},
"blacklist": {
"status": "INCOMPLETE",
"value": ""
},
"payment_verification": {
"status": "INCOMPLETE",
"value": ""
},
"identification_document": {
"status": "REVIEW",
"value": "review",
"help": "Guest name does not match the name on the reservation"
},
"fraud_detection": {
"status": "REVIEW",
"value": "REVIEW",
"findings": [
"Email address appears on breach reports and leaked data dumps online. This could indicate other malicious parties are using this account to impersonate legitimate users.",
"Email address seems to belong to a disposable provider. These providers are often used to create fake accounts and bypass email validation.",
"The phone number does not seem to be registered at all. Check for typos, otherwise this may be a bogus number."
],
"help": "Manual review suggested"
},
"adverse_media": {
"status": "REVIEW",
"value": "REVIEW",
"findings": [
"Fraud or Financial Crime",
"Harassment",
"Discrimination"
],
"help": "Manual review suggested"
},
"social_verification": {
"status": "PASS",
"value": "13 accounts found"
},
"sanctions": {
"status": "INCOMPLETE",
"value": ""
},
"house_rules": {
"status": "INCOMPLETE"
}
},
"supervised_status": null
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation status objectReservationSummaryResponse

Code samples

"""
Python Code Snippet
"""
import requests

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

r = requests.get('https://data.autohost.ai/v1/reservations/{id}/summary', 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/reservations/{id}/summary', {
method: 'get',

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

reservations-status

GET /reservations/{id}/status

Reservation status

Get reservation status and verification details

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
pmsqueryQueryParamPMSfalsePMS integration name. If supplied, the API will assume the path parameter id is a confirmation code.
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

{
"status": "verified",
"pms_status": "CONFIRMED",
"supervised": "approve",
"reason": "string",
"guestportal_completed": true,
"business_rules": [
"string"
]
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation status objectReservationStatusResponse

Code samples

"""
Python Code Snippet
"""
import requests

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

r = requests.get('https://data.autohost.ai/v1/reservations/{id}/status', 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/reservations/{id}/status', {
method: 'get',

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

reservations-status-update

POST /reservations/{id}/status

Reservation status change

Approve or decline a reservation manually

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
x-api-keyheaderstringfalseAPI Authentication Key
bodybodyReservationsVerificationChangeRequestfalseJSON object with verification details

Body parameter

{
"supervised": "decline"
}

Example responses

200 Response

{
"status": "verified",
"pms_status": "CONFIRMED",
"supervised": "approve",
"reason": "string",
"guestportal_completed": true,
"business_rules": [
"string"
]
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation status objectReservationStatusResponse

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/reservations/{id}/status', headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

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

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

reservations-screens

GET /reservations/{id}/screens

Reservation Guest Portal Screens

Guest Portal screens configuration for a specific reservation.

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
pmsqueryQueryParamPMSfalsePMS integration name. If supplied, the API will assume the path parameter id is a confirmation code.
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

{
"AboutYou": "disabled",
"AuthorityReporting": "disabled",
"BuildingScreen": "disabled",
"BackgroundCheck": "disabled",
"CreditCheck": "disabled",
"IDVerification": "disabled",
"IDCollection": "disabled",
"SecurityDeposit": "disabled",
"UsageAgreement": "disabled",
"Coronavirus": "disabled",
"CustomScreen": "disabled",
"FileUpload": "disabled",
"GuestList": "disabled",
"HouseRules": "disabled",
"LongTerm": "disabled",
"PurposeOfStay": "disabled",
"TimeInfoEdit": "disabled",
"SexOffendersAddon": "disabled",
"SocialVerificationAddon": "disabled",
"SanctionsSearchAddon": "disabled",
"FraudDetectionAddon": "disabled",
"AdverseMediaSearchAddon": "disabled"
}

Responses

StatusMeaningDescriptionSchema
200OKGuest Portal screens configuration objectReservationScreensResponse
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/reservations/{id}/screens', 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/reservations/{id}/screens', {
method: 'get',

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

GET /reservations/{id}/embed

Reservation embed link

Generate a temporary link to embed reservation details on your web page

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
x-api-keyheaderstringfalseAPI Authentication Key

Example responses

A reservation embed object

{
"url": "https://exmpale.com/embed/34857439857439857349857",
"expires": "2021-09-05T16:18:39.808Z"
}
StatusMeaningDescriptionSchema
200OKA reservation embed objectReservationEmbedLinkResponse

Code samples

"""
Python Code Snippet
"""
import requests

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

r = requests.get('https://data.autohost.ai/v1/reservations/{id}/embed', 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/reservations/{id}/embed', {
method: 'get',

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

reservations-notes

GET /reservations/{id}/notes

Reservation notes

Get list of notes for a reservation

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
pmsqueryQueryParamPMSfalsePMS integration name. If supplied, the API will assume the path parameter id is a confirmation code.
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

[
{
"text": "string",
"author_id": "string",
"author_name": "string",
"author_type": "string",
"timestamp": "string"
}
]

Responses

StatusMeaningDescriptionSchema
200OKA reservation objectReservationNotesResponse

Code samples

"""
Python Code Snippet
"""
import requests

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

r = requests.get('https://data.autohost.ai/v1/reservations/{id}/notes', 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/reservations/{id}/notes', {
method: 'get',

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

reservations-payments

GET /reservations/{id}/payments

Reservation payments

Payment details for a reservation. Includes Security Deposit, Damage Waiver and Payment Validation.

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
x-api-keyheaderstringfalseAPI Authentication Key

Example responses

200 Response

{
"security_deposit": {
"successful_authorizations": [
{
"currency": "string",
"amount": 0,
"receipt_url": "string",
"card_brand": "string",
"timestamp": "string"
}
],
"charge_failures": [
{
"message": "string",
"timestamp": "string"
}
],
"refunds": [
{
"currency": "string",
"amount": 0,
"receipt_url": "string",
"timestamp": "string"
}
],
"deposit_captures": [
{
"currency": "string",
"amount": 0,
"receipt_url": "string",
"card_brand": "string",
"timestamp": "string"
}
]
},
"payment_validation": {
"receipt_url": "string",
"name_on_card": "string",
"funding_type": "string",
"card_brand": "string",
"card_country": "string",
"status": "string",
"errors": [
{
"title": "string",
"description": "string"
}
]
},
"damage_waiver": {
"amount": 0,
"currency": "string",
"timestamp": "string",
"receipt_url": "string"
},
"extra_services": {
"amount": 0,
"receipt_url": "string",
"products": [
{
"name": "string",
"price": 0
}
]
}
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation objectReservationPaymentsResponse

Code samples

"""
Python Code Snippet
"""
import requests

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

r = requests.get('https://data.autohost.ai/v1/reservations/{id}/payments', 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/reservations/{id}/payments', {
method: 'get',

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

reservations-stargate

GET /reservations/{id}/stargate

Reservation messages

List of queued and sent Stargate messages for a given reservation.

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
x-api-keyheaderstringtrueAPI Authentication Key

Example responses

200 Response

[
{
"email": "user@example.com",
"phone": "string",
"tag": "string",
"method": "string",
"via": "string",
"sendAfter": "2019-08-24T14:15:22Z",
"created": "2019-08-24T14:15:22Z",
"updated": "2019-08-24T14:15:22Z",
"reservation_id": "string",
"listing_id": "string",
"confirmation_code": "string",
"message": {
"subject": "string",
"text": "string",
"html": "string"
}
}
]

Responses

StatusMeaningDescriptionSchema
200OKA list of Stargate messagesReservationStargateResponse
404Not FoundAn 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/reservations/{id}/stargate', 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/reservations/{id}/stargate', {
method: 'get',

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

reservations-guestportal

GET /reservations/{id}/guestportal

Reservation Guest Portal

Guest Portal details for a reservation

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
pmsqueryQueryParamPMSfalsePMS integration name. If supplied, the API will assume the path parameter id is a confirmation code.
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

{
"full_name": "string",
"phone": "string",
"email": "user@example.com",
"name_on_card": "string",
"security_deposit": true,
"last_step": "string",
"completed": true,
"completed_at": "string",
"updated_at": "string",
"guests": [
{
"name": "string",
"email": "user@example.com"
}
]
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation objectReservationGuestPortalResponse

Code samples

"""
Python Code Snippet
"""
import requests

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

r = requests.get('https://data.autohost.ai/v1/reservations/{id}/guestportal', 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/reservations/{id}/guestportal', {
method: 'get',

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

GET /reservations

Reservation search

Return paginated list of reservations matching the search criteria.

Parameters

NameInTypeRequiredDescription
fromquerynumberfalsePagination control
sizequerynumberfalseNumber of items to return
statusqueryQueryParamReservationStatusfalseReservation OTA status
searchquerystringfalseString search
listingsquerystringfalseAutohost listing ID. Use commas for multiple IDs.
guestportal_completedquerystringfalseFilter by Guest Portal completion status (true
activequerynumberfalseFilter by active reservations.
pending_reviewquerystringfalseReturn reservations that require a manual review (true
emailsquerystringfalseSearch reservations by guest email. Use commas for multiple addresses.
sourcequerystringfalseFilter reservation by booking source name.
startDatequerystringfalseFilter reservation from the specified start date (YYYY-MM-DD).
endDatequerystringfalseFilter reservation from the specified end date (YYYY-MM-DD).
dateFieldquerystringfalseCheck-in date is used by default, but it can be changed (check_in_date
x-api-keyheaderstringfalseAPI Authentication Key

Enumerated Values

ParameterValue
statusCONFIRMED
statusCANCELED
statusINQUIRY
statusany

Example responses

200 Response

{
"id": "string",
"user_id": "string",
"confirmation_code": "string",
"status": "string",
"source": "string",
"listing_id": "string",
"listing_nickname": "string",
"listing_timezone_name": "string",
"number_of_guests": 0,
"nights": 0,
"total_price": 0,
"average_daily_rate": 0,
"check_in_date": "string",
"check_out_date": "string",
"guest_portal_url": "string",
"guest": {
"first_name": "string",
"last_name": "string",
"full_name": "string",
"phone": "string",
"email": "user@example.com",
"location": "string"
},
"identification": {
"first_name": "string",
"last_name": "string",
"middle_name": "string",
"document_number": "string",
"document_type": "string",
"nationality": "string",
"sex": "string",
"address": "string",
"birth_date": "string",
"expiry_date": "string",
"issue_date": "string"
},
"created_at": "string",
"updated_at": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation objectReservationDetailsResponse
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/reservations', 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/reservations', {
method: 'get',

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

reservations-create

POST /reservations

Reservation creation

Create new reservation object

Parameters

NameInTypeRequiredDescription
callbackqueryQueryParamCallbackfalseWebhook URL to post data back to once Screening AI finished analyzing the reservation.
syncqueryQueryParamSyncfalseExecution is asynchronous by default and the response, including reservation ID, will be returned via webhook when you supply the callback parameter. You can enable synchronous execution by setting sync=1, but it is discouraged when sending large amounts of requests.
skip_gpqueryQueryParamSkipGPfalseVerification analysis to proceed without dependence on Guest Portal completion. To be included for all reservations where the guest is not expected to complete the portal.
x-api-keyheaderstringfalseAPI Authentication Key
bodybodyReservationCreateRequestfalseJSON object with reservation details

Enumerated Values

ParameterValue
sync1
synctrue
skip_gp1
skip_gptrue

Body parameter

{
"guest": {
"first_name": "John",
"last_name": "Doe"
}
}

Example responses

200 Response

{
"id": "string",
"user_id": "string",
"confirmation_code": "string",
"status": "string",
"source": "string",
"listing_id": "string",
"listing_nickname": "string",
"listing_timezone_name": "string",
"number_of_guests": 0,
"nights": 0,
"total_price": 0,
"average_daily_rate": 0,
"check_in_date": "string",
"check_out_date": "string",
"guest_portal_url": "string",
"guest": {
"first_name": "string",
"last_name": "string",
"full_name": "string",
"phone": "string",
"email": "user@example.com",
"location": "string"
},
"identification": {
"first_name": "string",
"last_name": "string",
"middle_name": "string",
"document_number": "string",
"document_type": "string",
"nationality": "string",
"sex": "string",
"address": "string",
"birth_date": "string",
"expiry_date": "string",
"issue_date": "string"
},
"created_at": "string",
"updated_at": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKA reservation objectReservationDetailsResponse
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/reservations', headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"guest": {
"first_name": "John",
"last_name": "Doe"
}
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};

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

reservations-payment-event

POST /reservations/{id}/payment-event

Reservation payment event

Record a payment event belonging to a reservation for fraud analysis

Parameters

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
x-api-keyheaderstringtrueAPI Authentication Key
bodybodyPaymentEventRequestfalseJSON object with payment event details

Body parameter

{
"event_source": "adyen",
"event_id": "123456789",
"event_type": "charge",
"event_status": "failure",
"customer_id": "123456789",
"processor_status_code": "111",
"processor_message": "Invalid BankCountryCode specified",
"amount": 101.5,
"currency": "usd",
"charge_descriptor": "PRE-AUTH Security Deposit",
"name_on_card": "John Doe",
"payment_method": "card",
"card_type": "credit",
"card_provider": "visa",
"card_iin": "41111",
"card_last4": "1111",
"card_expiry_month": "12",
"card_expiry_year": "2025",
"billing_country_code": "US",
"billing_address": "123 Main St",
"billing_city": "New York",
"billing_state_code": "NY",
"billing_postal_code": "10001",
"billing_phone": "+15555555555",
"billing_email": "user@example.com",
"billing_name": "John Doe",
"ip_address": "8.8.8.8",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
"timestamp": "2022-05-22T18:06:20.352Z"
}

Example responses

200 Response

{
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKA success message objectPaymentEventResponse
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/reservations/{id}/payment-event', headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"event_source": "adyen",
"event_id": "123456789",
"event_type": "charge",
"event_status": "failure",
"customer_id": "123456789",
"processor_status_code": "111",
"processor_message": "Invalid BankCountryCode specified",
"amount": 101.5,
"currency": "usd",
"charge_descriptor": "PRE-AUTH Security Deposit",
"name_on_card": "John Doe",
"payment_method": "card",
"card_type": "credit",
"card_provider": "visa",
"card_iin": "41111",
"card_last4": "1111",
"card_expiry_month": "12",
"card_expiry_year": "2025",
"billing_country_code": "US",
"billing_address": "123 Main St",
"billing_city": "New York",
"billing_state_code": "NY",
"billing_postal_code": "10001",
"billing_phone": "+15555555555",
"billing_email": "user@example.com",
"billing_name": "John Doe",
"ip_address": "8.8.8.8",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36",
"timestamp": "2022-05-22T18:06:20.352Z"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};

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