Hotels

Smart Feedopen in new window provides a list of all hotels accessible for authorized user.


List of Hotels

Returns a list of all hotels accessible for authorized user.

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"
        ]
      }
    },
    "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
  },
  {
    "hotelId": "hotel-id-2",
    "address": "Real st. 14",
    "ibe": "hotel-ibe-2",
    "name": "Real Hotel 2",
    "countryCode": "gb"
  },
  {
    "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
  }
]

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.


Single Hotel

Returns information about a single hotel filtered by hotelId.

Code sample

GET/Pull/Hotel
curl -X GET 'https://hotels.automationcloud.net/Pull/Hotel' \
    -H 'Authorization: Basic QVBJX0tFWTo=' \
    -G \
    -d 'hotelId=hotel-id-333' 

Success Responses

Response Schema

Status 200

{
  "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"
      ]
    }
  },
  "required": [
    "hotelId",
    "name",
    "ibe",
    "address",
    "countryCode",
    "bookingServiceId"
  ],
  "additionalProperties": false
}

Response Example

Status 200

{
  "hotelId": "hotel-id-333",
  "name": "Real Hotel",
  "ibe": "hotel-ibe-123-123",
  "address": "Real st. 14",
  "bookingServiceId": "00000000-0000-0000-0000-000000000000",
  "countryCode": null
}

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.

Status 404

{
  "object": "error",
  "name": "HttpRequestFailed",
  "message": "404 - GET https://hotels.automationcloud.net/Pull/Hotel",
  "details": {}
}

There’s no hotel with the ID you provided or you don’t have access to this hotel.