{"openapi":"3.0.0","info":{"title":"Hotelumo API","version":"1.0.0","description":"Public REST API for Hotelumo. Authenticate with an API key created in the Hotelumo dashboard: send the base64-encoded key secret with HTTP Basic auth. Each key carries per-resource scopes like `reservations:read` or `rates:write`."},"servers":[{"url":"https://api.hotelumo.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"basic","description":"HTTP Basic auth carrying only the API key secret: `Authorization: Basic base64(<key secret>)`."},"accessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Operator session token issued by the Hotelumo dashboard: `Authorization: Token <access token>`."}}},"paths":{"/api/hotels/{hotelId}/availability":{"get":{"tags":["Availability"],"summary":"Find public room offers for a stay","description":"Returns sanitized room-type offers for the requested dates and occupancy. Prices and inventory are calculated by the server.\n","security":[{"apiKey":[]},{}],"parameters":[{"in":"path","name":"hotelId","required":true,"schema":{"type":"string"}},{"in":"query","name":"checkInDate","required":true,"schema":{"type":"string","format":"date"}},{"in":"query","name":"checkOutDate","required":true,"schema":{"type":"string","format":"date"}},{"in":"query","name":"adults","schema":{"type":"integer","default":2}},{"in":"query","name":"children","schema":{"type":"integer","default":0}},{"in":"query","name":"infants","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Public room offers"},"400":{"description":"Invalid dates or occupancy"},"404":{"description":"Hotel not found"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/hotels/%7BhotelId%7D/availability',\n  qs: {\n    checkInDate: 'SOME_STRING_VALUE',\n    checkOutDate: 'SOME_STRING_VALUE',\n    adults: 'SOME_INTEGER_VALUE',\n    children: 'SOME_INTEGER_VALUE',\n    infants: 'SOME_INTEGER_VALUE'\n  },\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://api.hotelumo.com/api/hotels/%7BhotelId%7D/availability?checkInDate=SOME_STRING_VALUE&checkOutDate=SOME_STRING_VALUE&adults=SOME_INTEGER_VALUE&children=SOME_INTEGER_VALUE&infants=SOME_INTEGER_VALUE' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET 'https://api.hotelumo.com/api/hotels/%7BhotelId%7D/availability?checkInDate=SOME_STRING_VALUE&checkOutDate=SOME_STRING_VALUE&adults=SOME_INTEGER_VALUE&children=SOME_INTEGER_VALUE&infants=SOME_INTEGER_VALUE' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/hotels/%7BhotelId%7D/availability?checkInDate=SOME_STRING_VALUE&checkOutDate=SOME_STRING_VALUE&adults=SOME_INTEGER_VALUE&children=SOME_INTEGER_VALUE&infants=SOME_INTEGER_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/hotels/%7BhotelId%7D/availability?checkInDate=SOME_STRING_VALUE&checkOutDate=SOME_STRING_VALUE&adults=SOME_INTEGER_VALUE&children=SOME_INTEGER_VALUE&infants=SOME_INTEGER_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/hotels/%7BhotelId%7D/availability');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'checkInDate' => 'SOME_STRING_VALUE',\n  'checkOutDate' => 'SOME_STRING_VALUE',\n  'adults' => 'SOME_INTEGER_VALUE',\n  'children' => 'SOME_INTEGER_VALUE',\n  'infants' => 'SOME_INTEGER_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/hotels/%7BhotelId%7D/availability');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'checkInDate' => 'SOME_STRING_VALUE',\n  'checkOutDate' => 'SOME_STRING_VALUE',\n  'adults' => 'SOME_INTEGER_VALUE',\n  'children' => 'SOME_INTEGER_VALUE',\n  'infants' => 'SOME_INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/hotels/{hotelId}/book-reservation":{"post":{"tags":["Availability"],"summary":"Request a room reservation","description":"Revalidates the selected offer, then creates a REQUESTED reservation with one unassigned PENDING room for hotel staff to approve.\n","security":[{"apiKey":[]},{}],"responses":{"201":{"description":"Reservation request created"},"409":{"description":"The selected offer is no longer available"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/hotels/%7BhotelId%7D/book-reservation',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/hotels/%7BhotelId%7D/book-reservation \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http POST https://api.hotelumo.com/api/hotels/%7BhotelId%7D/book-reservation \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"POST\", \"/api/hotels/%7BhotelId%7D/book-reservation\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/hotels/%7BhotelId%7D/book-reservation\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/hotels/%7BhotelId%7D/book-reservation');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/hotels/%7BhotelId%7D/book-reservation');\n$request->setRequestMethod('POST');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/dailyRates":{"get":{"tags":["Daily rates"],"summary":"List daily rates","description":"Reads per-day prices/inventory for a rate plan over a date window (the ARI surface). Pass `hotelId`, `ratePlanId`, `dateFrom` and `dateTo`. Requires the `rates:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"query","name":"hotelId","required":true,"schema":{"type":"string"}},{"in":"query","name":"ratePlanId","required":true,"schema":{"type":"string"}},{"in":"query","name":"dateFrom","required":true,"schema":{"type":"string","example":"2026-05-01"}},{"in":"query","name":"dateTo","required":true,"schema":{"type":"string","example":"2026-05-31"}}],"responses":{"200":{"description":"Array of daily rates"},"403":{"description":"API key is missing the `rates:read` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/dailyRates',\n  qs: {\n    hotelId: 'SOME_STRING_VALUE',\n    ratePlanId: 'SOME_STRING_VALUE',\n    dateFrom: '2026-05-01',\n    dateTo: '2026-05-31'\n  },\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://api.hotelumo.com/api/dailyRates?hotelId=SOME_STRING_VALUE&ratePlanId=SOME_STRING_VALUE&dateFrom=2026-05-01&dateTo=2026-05-31' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET 'https://api.hotelumo.com/api/dailyRates?hotelId=SOME_STRING_VALUE&ratePlanId=SOME_STRING_VALUE&dateFrom=2026-05-01&dateTo=2026-05-31' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/dailyRates?hotelId=SOME_STRING_VALUE&ratePlanId=SOME_STRING_VALUE&dateFrom=2026-05-01&dateTo=2026-05-31\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/dailyRates?hotelId=SOME_STRING_VALUE&ratePlanId=SOME_STRING_VALUE&dateFrom=2026-05-01&dateTo=2026-05-31\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/dailyRates');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'ratePlanId' => 'SOME_STRING_VALUE',\n  'dateFrom' => '2026-05-01',\n  'dateTo' => '2026-05-31'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/dailyRates');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'ratePlanId' => 'SOME_STRING_VALUE',\n  'dateFrom' => '2026-05-01',\n  'dateTo' => '2026-05-31'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Daily rates"],"summary":"Upsert daily rates","description":"Batch-upserts per-day prices/inventory (max 500 per call). Requires the `rates:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"The upserted daily rates"},"403":{"description":"API key is missing the `rates:write` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/dailyRates',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/dailyRates \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http POST https://api.hotelumo.com/api/dailyRates \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"POST\", \"/api/dailyRates\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/dailyRates\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/dailyRates');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/dailyRates');\n$request->setRequestMethod('POST');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/guests":{"get":{"tags":["Guests"],"summary":"List guests","description":"Lists the guests of your organization, optionally filtered by `hotelId`, `email` or `_ids`. Requires the `guests:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"query","name":"hotelId","schema":{"type":"string"}},{"in":"query","name":"email","schema":{"type":"string"}},{"in":"query","name":"_ids","description":"Comma-separated list of guest ids","schema":{"type":"string"}},{"in":"query","name":"fields","description":"Comma-separated projection of fields to return","schema":{"type":"string"}}],"responses":{"200":{"description":"Array of guests"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"API key is missing the `guests:read` scope"},"429":{"description":"API key rate limit exceeded"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/guests',\n  qs: {\n    hotelId: 'SOME_STRING_VALUE',\n    email: 'SOME_STRING_VALUE',\n    _ids: 'SOME_STRING_VALUE',\n    fields: 'SOME_STRING_VALUE'\n  },\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://api.hotelumo.com/api/guests?hotelId=SOME_STRING_VALUE&email=SOME_STRING_VALUE&_ids=SOME_STRING_VALUE&fields=SOME_STRING_VALUE' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET 'https://api.hotelumo.com/api/guests?hotelId=SOME_STRING_VALUE&email=SOME_STRING_VALUE&_ids=SOME_STRING_VALUE&fields=SOME_STRING_VALUE' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/guests?hotelId=SOME_STRING_VALUE&email=SOME_STRING_VALUE&_ids=SOME_STRING_VALUE&fields=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/guests?hotelId=SOME_STRING_VALUE&email=SOME_STRING_VALUE&_ids=SOME_STRING_VALUE&fields=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/guests');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'email' => 'SOME_STRING_VALUE',\n  '_ids' => 'SOME_STRING_VALUE',\n  'fields' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/guests');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'email' => 'SOME_STRING_VALUE',\n  '_ids' => 'SOME_STRING_VALUE',\n  'fields' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Guests"],"summary":"Create a guest","description":"Requires the `guests:write` scope.","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"The created guest"},"403":{"description":"API key is missing the `guests:write` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/guests',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/guests \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http POST https://api.hotelumo.com/api/guests \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"POST\", \"/api/guests\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/guests\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/guests');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/guests');\n$request->setRequestMethod('POST');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/guests/{guestId}":{"get":{"tags":["Guests"],"summary":"Get a guest","description":"Returns a single guest by id. Guests belonging to another organization respond 404. Requires the `guests:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"guestId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The guest"},"404":{"description":"Not found (or owned by another organization)"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/guests/%7BguestId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://api.hotelumo.com/api/guests/%7BguestId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET https://api.hotelumo.com/api/guests/%7BguestId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/guests/%7BguestId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/guests/%7BguestId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/guests/%7BguestId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/guests/%7BguestId%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"put":{"tags":["Guests"],"summary":"Update a guest","description":"Updates a guest by id. Guests belonging to another organization respond 404. Requires the `guests:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"guestId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated guest"},"404":{"description":"Not found (or owned by another organization)"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.hotelumo.com/api/guests/%7BguestId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://api.hotelumo.com/api/guests/%7BguestId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http PUT https://api.hotelumo.com/api/guests/%7BguestId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"PUT\", \"/api/guests/%7BguestId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/guests/%7BguestId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/guests/%7BguestId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/guests/%7BguestId%7D');\n$request->setRequestMethod('PUT');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"delete":{"tags":["Guests"],"summary":"Delete a guest","description":"Deletes a guest by id. Guests belonging to another organization respond 404. Requires the `guests:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"guestId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The deleted guest"},"404":{"description":"Not found (or owned by another organization)"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://api.hotelumo.com/api/guests/%7BguestId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://api.hotelumo.com/api/guests/%7BguestId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http DELETE https://api.hotelumo.com/api/guests/%7BguestId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"DELETE\", \"/api/guests/%7BguestId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/guests/%7BguestId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/guests/%7BguestId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/guests/%7BguestId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/ratePlans":{"get":{"tags":["Rate plans"],"summary":"List rate plans","description":"Lists the rate plans for a hotel (pass `hotelId`). Rate plans are part of the ARI pricing surface, so this requires the `rates:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"query","name":"hotelId","required":true,"schema":{"type":"string"}},{"in":"query","name":"roomTypeId","schema":{"type":"string"}}],"responses":{"200":{"description":"Array of rate plans"},"403":{"description":"API key is missing the `rates:read` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/ratePlans',\n  qs: {hotelId: 'SOME_STRING_VALUE', roomTypeId: 'SOME_STRING_VALUE'},\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://api.hotelumo.com/api/ratePlans?hotelId=SOME_STRING_VALUE&roomTypeId=SOME_STRING_VALUE' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET 'https://api.hotelumo.com/api/ratePlans?hotelId=SOME_STRING_VALUE&roomTypeId=SOME_STRING_VALUE' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/ratePlans?hotelId=SOME_STRING_VALUE&roomTypeId=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/ratePlans?hotelId=SOME_STRING_VALUE&roomTypeId=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/ratePlans');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'roomTypeId' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/ratePlans');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'roomTypeId' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Rate plans"],"summary":"Create or update a rate plan","description":"Requires the `rates:write` scope.","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"The created rate plan"},"403":{"description":"API key is missing the `rates:write` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/ratePlans',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/ratePlans \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http POST https://api.hotelumo.com/api/ratePlans \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"POST\", \"/api/ratePlans\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/ratePlans\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/ratePlans');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/ratePlans');\n$request->setRequestMethod('POST');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/reservations":{"get":{"tags":["Reservations"],"summary":"List reservations","description":"Lists the reservations of your organization. Optionally filter by `hotelId`, `guestId`, a legacy `startTime`/`endTime` window, or an overlapping stay window with `stayDateFrom`/`stayDateTo`. Requires the `reservations:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"query","name":"hotelId","schema":{"type":"string"}},{"in":"query","name":"guestId","schema":{"type":"string"}},{"in":"query","name":"startTime","schema":{"type":"string"}},{"in":"query","name":"endTime","schema":{"type":"string"}},{"in":"query","name":"stayDateFrom","description":"Include stays checking out after this date","schema":{"type":"string","format":"date"}},{"in":"query","name":"stayDateTo","description":"Include stays checking in on or before this date","schema":{"type":"string","format":"date"}},{"in":"query","name":"limit","schema":{"type":"integer","default":0}},{"in":"query","name":"skip","schema":{"type":"integer","default":0}},{"in":"query","name":"sortField","schema":{"type":"string","example":"startTime"}},{"in":"query","name":"sortDirection","schema":{"type":"string","enum":["ASC","DESC"]}},{"in":"query","name":"fields","description":"Comma-separated projection of fields to return","schema":{"type":"string"}}],"responses":{"200":{"description":"Array of reservations"},"401":{"description":"Missing or invalid credentials"},"403":{"description":"API key is missing the `reservations:read` scope"},"429":{"description":"API key rate limit exceeded"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/reservations',\n  qs: {\n    hotelId: 'SOME_STRING_VALUE',\n    guestId: 'SOME_STRING_VALUE',\n    startTime: 'SOME_STRING_VALUE',\n    endTime: 'SOME_STRING_VALUE',\n    stayDateFrom: 'SOME_STRING_VALUE',\n    stayDateTo: 'SOME_STRING_VALUE',\n    limit: 'SOME_INTEGER_VALUE',\n    skip: 'SOME_INTEGER_VALUE',\n    sortField: 'startTime',\n    sortDirection: 'SOME_STRING_VALUE',\n    fields: 'SOME_STRING_VALUE'\n  },\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://api.hotelumo.com/api/reservations?hotelId=SOME_STRING_VALUE&guestId=SOME_STRING_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE&stayDateFrom=SOME_STRING_VALUE&stayDateTo=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&sortField=startTime&sortDirection=SOME_STRING_VALUE&fields=SOME_STRING_VALUE' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET 'https://api.hotelumo.com/api/reservations?hotelId=SOME_STRING_VALUE&guestId=SOME_STRING_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE&stayDateFrom=SOME_STRING_VALUE&stayDateTo=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&sortField=startTime&sortDirection=SOME_STRING_VALUE&fields=SOME_STRING_VALUE' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/reservations?hotelId=SOME_STRING_VALUE&guestId=SOME_STRING_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE&stayDateFrom=SOME_STRING_VALUE&stayDateTo=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&sortField=startTime&sortDirection=SOME_STRING_VALUE&fields=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/reservations?hotelId=SOME_STRING_VALUE&guestId=SOME_STRING_VALUE&startTime=SOME_STRING_VALUE&endTime=SOME_STRING_VALUE&stayDateFrom=SOME_STRING_VALUE&stayDateTo=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&sortField=startTime&sortDirection=SOME_STRING_VALUE&fields=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/reservations');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'guestId' => 'SOME_STRING_VALUE',\n  'startTime' => 'SOME_STRING_VALUE',\n  'endTime' => 'SOME_STRING_VALUE',\n  'stayDateFrom' => 'SOME_STRING_VALUE',\n  'stayDateTo' => 'SOME_STRING_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'skip' => 'SOME_INTEGER_VALUE',\n  'sortField' => 'startTime',\n  'sortDirection' => 'SOME_STRING_VALUE',\n  'fields' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/reservations');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'guestId' => 'SOME_STRING_VALUE',\n  'startTime' => 'SOME_STRING_VALUE',\n  'endTime' => 'SOME_STRING_VALUE',\n  'stayDateFrom' => 'SOME_STRING_VALUE',\n  'stayDateTo' => 'SOME_STRING_VALUE',\n  'limit' => 'SOME_INTEGER_VALUE',\n  'skip' => 'SOME_INTEGER_VALUE',\n  'sortField' => 'startTime',\n  'sortDirection' => 'SOME_STRING_VALUE',\n  'fields' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Reservations"],"summary":"Create a reservation","description":"Creates a reservation (and its ReservationRooms from the `rooms` array). Requires the `reservations:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"The created reservation"},"403":{"description":"API key is missing the `reservations:write` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/reservations',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/reservations \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http POST https://api.hotelumo.com/api/reservations \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"POST\", \"/api/reservations\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/reservations\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/reservations');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/reservations');\n$request->setRequestMethod('POST');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/reservations/{reservationId}":{"get":{"tags":["Reservations"],"summary":"Get a reservation","description":"Returns a single reservation by id, with its `rooms`. Reservations belonging to another organization respond 404. Requires the `reservations:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"reservationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The reservation"},"404":{"description":"Not found (or owned by another organization)"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/reservations/%7BreservationId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://api.hotelumo.com/api/reservations/%7BreservationId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET https://api.hotelumo.com/api/reservations/%7BreservationId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/reservations/%7BreservationId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/reservations/%7BreservationId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/reservations/%7BreservationId%7D');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/reservations/%7BreservationId%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"put":{"tags":["Reservations"],"summary":"Update a reservation","description":"Updates a reservation by id. Reservations belonging to another organization respond 404. Requires the `reservations:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"reservationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The updated reservation"},"403":{"description":"API key is missing the `reservations:write` scope"},"404":{"description":"Not found (or owned by another organization)"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.hotelumo.com/api/reservations/%7BreservationId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://api.hotelumo.com/api/reservations/%7BreservationId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http PUT https://api.hotelumo.com/api/reservations/%7BreservationId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"PUT\", \"/api/reservations/%7BreservationId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/reservations/%7BreservationId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/reservations/%7BreservationId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/reservations/%7BreservationId%7D');\n$request->setRequestMethod('PUT');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"delete":{"tags":["Reservations"],"summary":"Delete a reservation","description":"Deletes a reservation by id (cascading its rooms, folio and charges). Reservations belonging to another organization respond 404. Requires the `reservations:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"path","name":"reservationId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The deleted reservation"},"404":{"description":"Not found (or owned by another organization)"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://api.hotelumo.com/api/reservations/%7BreservationId%7D',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://api.hotelumo.com/api/reservations/%7BreservationId%7D \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http DELETE https://api.hotelumo.com/api/reservations/%7BreservationId%7D \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"DELETE\", \"/api/reservations/%7BreservationId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/reservations/%7BreservationId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/reservations/%7BreservationId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/reservations/%7BreservationId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/reservations/{reservationId}/approve":{"post":{"tags":["Reservations"],"summary":"Approve a requested reservation","description":"Rechecks inventory, promotes the parent to CONFIRMED and each PENDING room to CONFIRMED, then starts the normal folio/reminder workflow. Requires the `reservations:write` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"Approved reservation"},"409":{"description":"The request cannot be approved or inventory changed"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/reservations/%7BreservationId%7D/approve',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/reservations/%7BreservationId%7D/approve \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http POST https://api.hotelumo.com/api/reservations/%7BreservationId%7D/approve \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"POST\", \"/api/reservations/%7BreservationId%7D/approve\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/reservations/%7BreservationId%7D/approve\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/reservations/%7BreservationId%7D/approve');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/reservations/%7BreservationId%7D/approve');\n$request->setRequestMethod('POST');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/rooms":{"get":{"tags":["Rooms"],"summary":"List rooms","description":"Lists the physical rooms of your organization, optionally filtered by `hotelId` or `roomTypeId`. Requires the `rooms:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"query","name":"hotelId","schema":{"type":"string"}},{"in":"query","name":"roomTypeId","schema":{"type":"string"}}],"responses":{"200":{"description":"Array of rooms"},"403":{"description":"API key is missing the `rooms:read` scope"},"429":{"description":"API key rate limit exceeded"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/rooms',\n  qs: {hotelId: 'SOME_STRING_VALUE', roomTypeId: 'SOME_STRING_VALUE'},\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://api.hotelumo.com/api/rooms?hotelId=SOME_STRING_VALUE&roomTypeId=SOME_STRING_VALUE' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET 'https://api.hotelumo.com/api/rooms?hotelId=SOME_STRING_VALUE&roomTypeId=SOME_STRING_VALUE' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/rooms?hotelId=SOME_STRING_VALUE&roomTypeId=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/rooms?hotelId=SOME_STRING_VALUE&roomTypeId=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/rooms');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'roomTypeId' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/rooms');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'hotelId' => 'SOME_STRING_VALUE',\n  'roomTypeId' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Rooms"],"summary":"Create a room","description":"Requires the `rooms:write` scope.","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"The created room"},"403":{"description":"API key is missing the `rooms:write` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/rooms',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/rooms \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http POST https://api.hotelumo.com/api/rooms \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"POST\", \"/api/rooms\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/rooms\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/rooms');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/rooms');\n$request->setRequestMethod('POST');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/roomTypes":{"get":{"tags":["Room types"],"summary":"List room types","description":"Lists the room types of your organization, optionally filtered by `hotelId`. Room types are part of the physical inventory, so this requires the `rooms:read` scope.\n","security":[{"apiKey":[]},{"accessToken":[]}],"parameters":[{"in":"query","name":"hotelId","schema":{"type":"string"}}],"responses":{"200":{"description":"Array of room types"},"403":{"description":"API key is missing the `rooms:read` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/roomTypes',\n  qs: {hotelId: 'SOME_STRING_VALUE'},\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url 'https://api.hotelumo.com/api/roomTypes?hotelId=SOME_STRING_VALUE' \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http GET 'https://api.hotelumo.com/api/roomTypes?hotelId=SOME_STRING_VALUE' \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"GET\", \"/api/roomTypes?hotelId=SOME_STRING_VALUE\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/roomTypes?hotelId=SOME_STRING_VALUE\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/roomTypes');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData([\n  'hotelId' => 'SOME_STRING_VALUE'\n]);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/roomTypes');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'hotelId' => 'SOME_STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Room types"],"summary":"Create a room type","description":"Requires the `rooms:write` scope.","security":[{"apiKey":[]},{"accessToken":[]}],"responses":{"200":{"description":"The created room type"},"403":{"description":"API key is missing the `rooms:write` scope"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/roomTypes',\n  headers: {Authorization: 'Basic REPLACE_BASIC_AUTH'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/roomTypes \\\n  --header 'Authorization: Basic REPLACE_BASIC_AUTH'"},{"lang":"Shell + Httpie","source":"http POST https://api.hotelumo.com/api/roomTypes \\\n  Authorization:'Basic REPLACE_BASIC_AUTH'"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"Basic REPLACE_BASIC_AUTH\" }\n\nconn.request(\"POST\", \"/api/roomTypes\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/roomTypes\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic REPLACE_BASIC_AUTH\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/roomTypes');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/roomTypes');\n$request->setRequestMethod('POST');\n$request->setHeaders([\n  'Authorization' => 'Basic REPLACE_BASIC_AUTH'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/webhooksubscriptions":{"get":{"tags":["Webhook subscriptions"],"summary":"List webhook subscriptions","description":"Webhook subscriptions deliver `reservation.created`, `reservation.updated`, `reservation.deleted`, `guest.created`, `guest.updated` and `guest.deleted` events to your server as signed POST requests (`X-Hotelumo-Signature: t=<timestamp>,v1=<hex HMAC-SHA256 of \"timestamp.body\">`). An endpoint failing 20 times in a row is disabled automatically. Subscriptions are managed with an operator access token; the `secret` is only returned once, on create.\n","security":[{"accessToken":[]}],"responses":{"200":{"description":"Array of webhook subscriptions (without secrets)"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://api.hotelumo.com/api/webhooksubscriptions',\n  headers: {Authorization: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request GET \\\n  --url https://api.hotelumo.com/api/webhooksubscriptions \\\n  --header 'Authorization: REPLACE_KEY_VALUE'"},{"lang":"Shell + Httpie","source":"http GET https://api.hotelumo.com/api/webhooksubscriptions \\\n  Authorization:REPLACE_KEY_VALUE"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"GET\", \"/api/webhooksubscriptions\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/webhooksubscriptions\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/webhooksubscriptions');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders([\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/webhooksubscriptions');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"post":{"tags":["Webhook subscriptions"],"summary":"Create a webhook subscription","description":"The response includes the signing `secret` exactly once — store it; it cannot be retrieved again.\n","security":[{"accessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["hotelId","url"],"properties":{"hotelId":{"type":"string"},"url":{"type":"string","example":"https://example.com/hotelumo-webhook"},"events":{"type":"array","description":"Empty array subscribes to all events","items":{"type":"string","enum":["reservation.created","reservation.updated","reservation.deleted","guest.created","guest.updated","guest.deleted"]}}}}}}},"responses":{"200":{"description":"The created subscription, including its secret"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.hotelumo.com/api/webhooksubscriptions',\n  headers: {'content-type': 'application/json', Authorization: 'REPLACE_KEY_VALUE'},\n  body: {\n    hotelId: 'string',\n    url: 'https://example.com/hotelumo-webhook',\n    events: ['reservation.created']\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request POST \\\n  --url https://api.hotelumo.com/api/webhooksubscriptions \\\n  --header 'Authorization: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{\"hotelId\":\"string\",\"url\":\"https://example.com/hotelumo-webhook\",\"events\":[\"reservation.created\"]}'"},{"lang":"Shell + Httpie","source":"echo '{\"hotelId\":\"string\",\"url\":\"https://example.com/hotelumo-webhook\",\"events\":[\"reservation.created\"]}' |  \\\n  http POST https://api.hotelumo.com/api/webhooksubscriptions \\\n  Authorization:REPLACE_KEY_VALUE \\\n  content-type:application/json"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\npayload = \"{\\\"hotelId\\\":\\\"string\\\",\\\"url\\\":\\\"https://example.com/hotelumo-webhook\\\",\\\"events\\\":[\\\"reservation.created\\\"]}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"POST\", \"/api/webhooksubscriptions\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/webhooksubscriptions\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"{\\\"hotelId\\\":\\\"string\\\",\\\"url\\\":\\\"https://example.com/hotelumo-webhook\\\",\\\"events\\\":[\\\"reservation.created\\\"]}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: REPLACE_KEY_VALUE\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/webhooksubscriptions');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$request->setBody('{\"hotelId\":\"string\",\"url\":\"https://example.com/hotelumo-webhook\",\"events\":[\"reservation.created\"]}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"hotelId\":\"string\",\"url\":\"https://example.com/hotelumo-webhook\",\"events\":[\"reservation.created\"]}');\n\n$request->setRequestUrl('https://api.hotelumo.com/api/webhooksubscriptions');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}},"/api/webhooksubscriptions/{webhookSubscriptionId}":{"put":{"tags":["Webhook subscriptions"],"summary":"Update a webhook subscription","description":"`url`, `events` and `active` are editable; the secret and hotel are immutable. Re-enabling an auto-disabled endpoint is done by setting `active` back to true.\n","security":[{"accessToken":[]}],"parameters":[{"in":"path","name":"webhookSubscriptionId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The updated subscription (without secret)"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D',\n  headers: {'content-type': 'application/json', Authorization: 'REPLACE_KEY_VALUE'},\n  body: {},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request PUT \\\n  --url https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D \\\n  --header 'Authorization: REPLACE_KEY_VALUE' \\\n  --header 'content-type: application/json' \\\n  --data '{}'"},{"lang":"Shell + Httpie","source":"echo '{}' |  \\\n  http PUT https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D \\\n  Authorization:REPLACE_KEY_VALUE \\\n  content-type:application/json"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\npayload = \"{}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'Authorization': \"REPLACE_KEY_VALUE\"\n    }\n\nconn.request(\"PUT\", \"/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"{}\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: REPLACE_KEY_VALUE\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$request->setBody('{}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{}');\n\n$request->setRequestUrl('https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'content-type' => 'application/json',\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]},"delete":{"tags":["Webhook subscriptions"],"summary":"Delete a webhook subscription","security":[{"accessToken":[]}],"parameters":[{"in":"path","name":"webhookSubscriptionId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"}},"x-codeSamples":[{"lang":"Node + Request","source":"const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D',\n  headers: {Authorization: 'REPLACE_KEY_VALUE'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"},{"lang":"Shell + Curl","source":"curl --request DELETE \\\n  --url https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D \\\n  --header 'Authorization: REPLACE_KEY_VALUE'"},{"lang":"Shell + Httpie","source":"http DELETE https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D \\\n  Authorization:REPLACE_KEY_VALUE"},{"lang":"Python + Python3","source":"import http.client\n\nconn = http.client.HTTPSConnection(\"api.hotelumo.com\")\n\nheaders = { 'Authorization': \"REPLACE_KEY_VALUE\" }\n\nconn.request(\"DELETE\", \"/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"lang":"Php + Curl","source":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: REPLACE_KEY_VALUE\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"lang":"Php + Http1","source":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D');\n$request->setMethod(HTTP_METH_DELETE);\n\n$request->setHeaders([\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"lang":"Php + Http2","source":"<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://api.hotelumo.com/api/webhooksubscriptions/%7BwebhookSubscriptionId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'REPLACE_KEY_VALUE'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"}]}}},"tags":[]}