Code sample
GET/Pull/Hotels
curl -X GET 'https://hotels.automationcloud.net/Pull/Hotels' \
-H 'Authorization: Basic QVBJX0tFWTo=' \
-G \
-d 'limit=333' \
-d 'offset=222'
Success Responses
Response Schema
Status 200
{
"type": "array",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"hotelId": {
"type": "string",
"maxLength": 200
},
"name": {
"type": "string",
"maxLength": 200
},
"ibe": {
"type": "string",
"maxLength": 200
},
"address": {
"type": "string",
"maxLength": 500
},
"bookingServiceId": {
"type": [
"string",
"null"
],
"format": "uuid"
},
"countryCode": {
"type": [
"string",
"null"
],
"title": "ISO 3166-1 alpha-2 Country Code",
"description": "ISO 3166-1 alpha-2 code representing the country. United Kingdom is officially assigned the alpha-2 code gb rather than uk. Lowercase.",
"example": "us",
"minLength": 2,
"maxLength": 2,
"enum": [
"ad",
"ae",
"af",
"ag",
"ai",
"al",
"am",
"ao",
"aq",
"ar",
"as",
"at",
"au",
"aw",
"ax",
"az",
"ba",
"bb",
"bd",
"be",
"bf",
"bg",
"bh",
"bi",
"bj",
"bl",
"bm",
"bn",
"bo",
"bq",
"br",
"bs",
"bt",
"bv",
"bw",
"by",
"bz",
"ca",
"cc",
"cd",
"cf",
"cg",
"ch",
"ci",
"ck",
"cl",
"cm",
"cn",
"co",
"cr",
"cu",
"cv",
"cw",
"cx",
"cy",
"cz",
"de",
"dj",
"dk",
"dm",
"do",
"dz",
"ec",
"ee",
"eg",
"eh",
"er",
"es",
"et",
"fi",
"fj",
"fk",
"fm",
"fo",
"fr",
"ga",
"gb",
"gd",
"ge",
"gf",
"gg",
"gh",
"gi",
"gl",
"gm",
"gn",
"gp",
"gq",
"gr",
"gs",
"gt",
"gu",
"gw",
"gy",
"hk",
"hm",
"hn",
"hr",
"ht",
"hu",
"id",
"ie",
"il",
"im",
"in",
"io",
"iq",
"ir",
"is",
"it",
"je",
"jm",
"jo",
"jp",
"ke",
"kg",
"kh",
"ki",
"km",
"kn",
"kp",
"kr",
"kw",
"ky",
"kz",
"la",
"lb",
"lc",
"li",
"lk",
"lr",
"ls",
"lt",
"lu",
"lv",
"ly",
"ma",
"mc",
"md",
"me",
"mf",
"mg",
"mh",
"mk",
"ml",
"mm",
"mn",
"mo",
"mp",
"mq",
"mr",
"ms",
"mt",
"mu",
"mv",
"mw",
"mx",
"my",
"mz",
"na",
"nc",
"ne",
"nf",
"ng",
"ni",
"nl",
"no",
"np",
"nr",
"nu",
"nz",
"om",
"pa",
"pe",
"pf",
"pg",
"ph",
"pk",
"pl",
"pm",
"pn",
"pr",
"ps",
"pt",
"pw",
"py",
"qa",
"re",
"ro",
"rs",
"ru",
"rw",
"sa",
"sb",
"sc",
"sd",
"se",
"sg",
"sh",
"si",
"sj",
"sk",
"sl",
"sm",
"sn",
"so",
"sr",
"ss",
"st",
"sv",
"sx",
"sy",
"sz",
"tc",
"td",
"tf",
"tg",
"th",
"tj",
"tk",
"tl",
"tm",
"tn",
"to",
"tr",
"tt",
"tv",
"tw",
"tz",
"ua",
"ug",
"um",
"us",
"uy",
"uz",
"va",
"vc",
"ve",
"vg",
"vi",
"vn",
"vu",
"wf",
"ws",
"xk",
"ye",
"yt",
"za",
"zm",
"zw"
]
},
"guests": {
"type": "array",
"minItems": 1,
"items": {
"type": "number"
}
}
},
"required": [
"hotelId",
"name",
"ibe",
"address",
"countryCode",
"bookingServiceId"
],
"additionalProperties": false
}
}
Response Examples
Status 200
[
{
"hotelId": "hotel-id-1",
"address": "Real st. 14",
"ibe": "hotel-ibe-1",
"name": "Real Hotel 1",
"bookingServiceId": null,
"countryCode": null,
"guests": [
2
]
},
{
"hotelId": "hotel-id-2",
"address": "Real st. 14",
"ibe": "hotel-ibe-2",
"name": "Real Hotel 2",
"countryCode": "gb",
"guests": [
2
]
},
{
"hotelId": "hotel-id-3",
"address": "Real st. 14",
"ibe": "hotel-ibe-3",
"name": "Hotel With Booking Configured",
"bookingServiceId": "00000000-0000-0000-0000-000000000000",
"countryCode": null,
"guests": [
1,
2
]
}
]
Hotels configured for authenticated user.
[]
No hotels found for authenticated user.
Error Responses
Status 401
{
"object": "error",
"name": "EndpointAccessAuthorizationError",
"message": "Access to the endpoint is not authorised",
"details": {}
}
Authenticated user doesn't have access to this endpoint.