Skip to main content

Idcheck

ID verification upload​

POST /idcheck/upload/{id}/{step}/{type}

Upload base64-encoded photo for analysis and verification

Parameters​

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
steppathstringtrueDocument side (front, back, selfie)
typepathstringtrueDocument type (drivers, passport, id)
pmsqueryQueryParamPMSfalsePMS integration name. If supplied, the API will assume the path parameter id is a confirmation code.
x-api-keyheaderstringfalseAPI Authentication Key
bodybodyIDCheckUploadRequestfalseJSON object with DataURL or base64-encoded image

Enumerated Values​

ParameterValue
pmsapi
pmsapaleo
pmsbeds24
pmsbooking
pmscloudbeds
pmsguesty
pmshostaway
pmshostfully
pmsinforhms
pmsimpala
pmslavanda
pmsmyvr
pmsopera
pmssmartbnb
pmsstayntouch
pmsstreamline
pmstrackhs

Body parameter​

{
"imageBase64": "data:image/jpeg;base64,<base64-encoded image>"
}

Example responses​

200 Response

{
"code": "string",
"error": "string",
"card": {
"first_name": "string",
"last_name": "string",
"full_name": "string",
"birth_date": "string",
"expiry_date": "string"
}
}

Responses​

StatusMeaningDescriptionSchema
200OKA analysis objectIDCheckUploadResponse
500Internal Server ErrorAn error messageErrorResponse

Code samples​

"""
Python Code Snippet
"""
import requests

input_body = {
"imageBase64": "data:image/jpeg;base64,<base64-encoded image>"
}

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

r = requests.post('https://data.autohost.ai/v1/idcheck/upload/{id}/{step}/{type}', json=input_body, headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"imageBase64": "data:image/jpeg;base64,<base64-encoded image>"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};

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

ID verification status​

GET /idcheck/status/{id}

Get verification results for photos that you uploaded

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 verification status object

{
"status": "passed"
}
{
"status": "review",
"errors": [
"Name on document does not match reservation details"
]
}

500 Response

{
"error": "string"
}

Responses​

StatusMeaningDescriptionSchema
200OKA verification status objectIDCheckStatusResponse
500Internal Server ErrorAn 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/idcheck/status/{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/idcheck/status/{id}', {
method: 'get',

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

ID verification image​

GET /idcheck/image/{id}/{step}

Get uploaded image for identification document on a reservation

Parameters​

NameInTypeRequiredDescription
idpathstringtrueAutohost reservation ID
steppathstringtrueDocument side (front, back, selfie)
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​

Identification document image encoded using Base64

{
"base64Image": "data:image/jpeg;base64,<base64-encoded image>"
}

500 Response

{
"error": "string"
}

Responses​

StatusMeaningDescriptionSchema
200OKIdentification document image encoded using Base64IDCheckImageResponse
500Internal Server ErrorAn 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/idcheck/image/{id}/{step}', 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/idcheck/image/{id}/{step}', {
method: 'get',

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

Schemas​

IDCheckUploadRequest​

{
"imageBase64": "string"
}

Properties​

NameTypeRequiredRestrictionsDescription
imageBase64stringfalsenonenone

QueryParamPMS​

"api"

Properties​

NameTypeRequiredRestrictionsDescription
anonymousstringfalsenonenone

Enumerated Values​

PropertyValue
anonymousapi
anonymousapaleo
anonymousbeds24
anonymousbooking
anonymouscloudbeds
anonymousguesty
anonymoushostaway
anonymoushostfully
anonymousinforhms
anonymousimpala
anonymouslavanda
anonymousmyvr
anonymousopera
anonymoussmartbnb
anonymousstayntouch
anonymousstreamline
anonymoustrackhs

IDCheckUploadResponse​

{
"code": "string",
"error": "string",
"card": {
"first_name": "string",
"last_name": "string",
"full_name": "string",
"birth_date": "string",
"expiry_date": "string"
}
}

Properties​

NameTypeRequiredRestrictionsDescription
codestringfalsenonenone
errorstringfalsenonenone
cardobjectfalsenonenone
» first_namestringfalsenonenone
» last_namestringfalsenonenone
» full_namestringfalsenonenone
» birth_datestringfalsenonenone
» expiry_datestringfalsenonenone

ErrorResponse​

{
"error": "string"
}

Properties​

NameTypeRequiredRestrictionsDescription
errorstringfalsenonenone

IDCheckStatusResponse​

{
"status": "passed",
"errors": [
"string"
]
}

Properties​

NameTypeRequiredRestrictionsDescription
statusstringfalsenonenone
errors[string]falsenonenone

Enumerated Values​

PropertyValue
statuspassed
statusreview
statusfailed

IDCheckImageResponse​

{
"imageBase64": "string"
}

Properties​

NameTypeRequiredRestrictionsDescription
imageBase64stringfalsenonenone