Reservations
reservations-detail
GET /reservations/{id}
Reservation details
Get reservation details object.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
pms | query | QueryParamPMS | false | PMS integration name. If supplied, the API will assume the path parameter id is a confirmation code. |
usepmsid | query | string | false | Assume id is the PMS reservation ID. Must be used with pms . (Default: false) |
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",
"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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation object | ReservationDetailsResponse |
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/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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
callback | query | QueryParamCallback | false | Webhook URL to post data back to once Screening AI finished analyzing the reservation. |
sync | query | QueryParamSync | false | Execution 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_gp | query | QueryParamSkipGP | false | Verification 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-key | header | string | false | API Authentication Key |
body | body | ReservationCreateRequest | false | JSON object with reservation details |
Enumerated Values
Parameter | Value |
---|---|
sync | 1 |
sync | true |
skip_gp | 1 |
skip_gp | true |
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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation object | ReservationDetailsResponse |
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/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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
pms | query | QueryParamPMS | false | PMS integration name. If supplied, the API will assume the path parameter id is a confirmation code. |
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
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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation status object | ReservationSummaryResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
pms | query | QueryParamPMS | false | PMS integration name. If supplied, the API will assume the path parameter id is a confirmation code. |
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
{
"status": "verified",
"pms_status": "CONFIRMED",
"supervised": "approve",
"reason": "string",
"guestportal_completed": true,
"business_rules": [
"string"
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation status object | ReservationStatusResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
x-api-key | header | string | false | API Authentication Key |
body | body | ReservationsVerificationChangeRequest | false | JSON 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation status object | ReservationStatusResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
pms | query | QueryParamPMS | false | PMS integration name. If supplied, the API will assume the path parameter id is a confirmation code. |
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
{
"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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Guest Portal screens configuration object | ReservationScreensResponse |
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/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);
reservations-embed-link
GET /reservations/{id}/embed
Reservation embed link
Generate a temporary link to embed reservation details on your web page
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
x-api-key | header | string | false | API Authentication Key |
Example responses
A reservation embed object
{
"url": "https://exmpale.com/embed/34857439857439857349857",
"expires": "2021-09-05T16:18:39.808Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation embed object | ReservationEmbedLinkResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
pms | query | QueryParamPMS | false | PMS integration name. If supplied, the API will assume the path parameter id is a confirmation code. |
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
[
{
"text": "string",
"author_id": "string",
"author_name": "string",
"author_type": "string",
"timestamp": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation object | ReservationNotesResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
x-api-key | header | string | false | API 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation object | ReservationPaymentsResponse |
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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
x-api-key | header | string | true | API 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A list of Stargate messages | ReservationStargateResponse |
404 | Not Found | 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/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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
pms | query | QueryParamPMS | false | PMS integration name. If supplied, the API will assume the path parameter id is a confirmation code. |
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
{
"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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation object | ReservationGuestPortalResponse |
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);
reservations-search
GET /reservations
Reservation search
Return paginated list of reservations matching the search criteria.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
from | query | number | false | Pagination control |
size | query | number | false | Number of items to return |
status | query | QueryParamReservationStatus | false | Reservation OTA status |
search | query | string | false | String search |
listings | query | string | false | Autohost listing ID. Use commas for multiple IDs. |
guestportal_completed | query | string | false | Filter by Guest Portal completion status (true |
active | query | number | false | Filter by active reservations. |
pending_review | query | string | false | Return reservations that require a manual review (true |
emails | query | string | false | Search reservations by guest email. Use commas for multiple addresses. |
source | query | string | false | Filter reservation by booking source name. |
startDate | query | string | false | Filter reservation from the specified start date (YYYY-MM-DD). |
endDate | query | string | false | Filter reservation from the specified end date (YYYY-MM-DD). |
dateField | query | string | false | Check-in date is used by default, but it can be changed (check_in_date |
x-api-key | header | string | false | API Authentication Key |
Enumerated Values
Parameter | Value |
---|---|
status | CONFIRMED |
status | CANCELED |
status | INQUIRY |
status | any |
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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation object | ReservationDetailsResponse |
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/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
Name | In | Type | Required | Description |
---|---|---|---|---|
callback | query | QueryParamCallback | false | Webhook URL to post data back to once Screening AI finished analyzing the reservation. |
sync | query | QueryParamSync | false | Execution 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_gp | query | QueryParamSkipGP | false | Verification 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-key | header | string | false | API Authentication Key |
body | body | ReservationCreateRequest | false | JSON object with reservation details |
Enumerated Values
Parameter | Value |
---|---|
sync | 1 |
sync | true |
skip_gp | 1 |
skip_gp | true |
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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A reservation object | ReservationDetailsResponse |
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/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
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Autohost reservation ID |
x-api-key | header | string | true | API Authentication Key |
body | body | PaymentEventRequest | false | JSON 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
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | A success message object | PaymentEventResponse |
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/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);