Buyer API (Push)
...
Room Level
Closed Arrival Restriction Room Level
1 min
{ "name" "closed arrival restriction room level", "method" "post", "url" "https //aggregate bakuun com/api/updateroomarrival/mpbxx/invupdate", "description" "pushes arrival restriction updates from bakuun to the partner system \n\nthis action notifies the partner when a property or room is closed or open for check in (arrival) on specific dates \nit ensures the partner system correctly prevents new arrivals on dates where the property does not accept check ins ", "tab" "examples", "examples" { "languages" \[ { "id" "ibkpyjyzsjxvngoiikohv", "language" "json", "code" "{\n \\"username\\" \\"xxx\\",\n \\"password\\" \\"xxx\\",\n \\"hotelid\\" \\"htlxx\\",\n \\"action\\" \\"arrivalclosedrq\\",\n \\"data\\" \[\n {\n \\"startdateymd\\" \\"yyyy mm dd\\",\n \\"enddateymd\\" yyyy mm dd\\",\n \\"roomcode\\" \\"rx x\\",\n \\"restriction\\" \\"arrival\\",\n \\"status\\" \\"0\\"\n },\n {\n \\"startdateymd\\" \\"yyyy mm dd\\",\n \\"enddateymd\\" yyyy mm dd\\",\n \\"roomcode\\" \\"rx x\\",\n \\"restriction\\" \\"arrival\\",\n \\"status\\" \\"1\\"\n }\n ]\n }", "customlabel" "" }, { "id" "9tb 0n nhpyshnbw0uq5s", "language" "curl", "code" "curl location 'https //aggregate bakuun com/api/updateroomarrival/mpbxx/invupdate' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"hotelid\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"data\\" {\n \\"startdateymd\\" \\"\\",\n \\"enddateymd\\" \\"\\",\n \\"roomcode\\" \\"\\",\n \\"restriction\\" \\"\\",\n \\"status\\" \\"\\"\n }\n}'", "customlabel" "" }, { "id" "bsamf1ike10b7ez02 efl", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //aggregate bakuun com/api/updateroomarrival/mpbxx/invupdate',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"hotelid\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"data\\" {\n \\"startdateymd\\" \\"\\",\n \\"enddateymd\\" \\"\\",\n \\"roomcode\\" \\"\\",\n \\"restriction\\" \\"\\",\n \\"status\\" \\"\\"\n }\n })\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "cxfbdcrmbsss gvbqcpuo", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"hotelid\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"data\\" {\n \\"startdateymd\\" \\"\\",\n \\"enddateymd\\" \\"\\",\n \\"roomcode\\" \\"\\",\n \\"restriction\\" \\"\\",\n \\"status\\" \\"\\"\n }\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //aggregate bakuun com/api/updateroomarrival/mpbxx/invupdate\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "uevcmjnifdqa7dgndcenx", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //aggregate bakuun com/api/updateroomarrival/mpbxx/invupdate\\"\n\npayload = json dumps({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"hotelid\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"data\\" {\n \\"startdateymd\\" \\"\\",\n \\"enddateymd\\" \\"\\",\n \\"roomcode\\" \\"\\",\n \\"restriction\\" \\"\\",\n \\"status\\" \\"\\"\n }\n})\nheaders = {\n 'accept' 'application/json',\n 'content type' 'application/json'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "sdeaei8mcjgjbksqffdqk", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //aggregate bakuun com/api/updateroomarrival/mpbxx/invupdate\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"content type\\"] = \\"application/json\\"\nrequest body = json dump({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"hotelid\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"data\\" {\n \\"startdateymd\\" \\"\\",\n \\"enddateymd\\" \\"\\",\n \\"roomcode\\" \\"\\",\n \\"restriction\\" \\"\\",\n \\"status\\" \\"\\"\n }\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "ibkpyjyzsjxvngoiikohv" }, "results" { "languages" \[ { "id" "rquppnrlzjcpooypilgaq", "language" "200", "code" "{\n \\"success\\" true\n}\n", "customlabel" "" }, { "id" "drzs8jb4xnurhjmhitksr", "language" "410", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 410,\n \\"message\\" \\"unauthorized user\\"\n }\n ]\n}", "customlabel" "" }, { "id" "vepox h3btt rmgipiqgw", "language" "403", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 403,\n \\"message\\" \\"invalid restriction status\\"\n }\n ]\n}", "customlabel" "" }, { "id" "x3 3wqtytzcocx65q grj", "language" "404", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 404,\n \\"message\\" \\"invalid start date\\"\n }\n ]\n}", "customlabel" "" }, { "id" "ose 4wq4hzrffbyh8f1d2", "language" "405", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 405,\n \\"message\\" \\"invalid end date\\"\n }\n ]\n}", "customlabel" "" }, { "id" "lj 1hf7vo8tct2xkdtxmk", "language" "408", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 408,\n \\"message\\" \\"processing error\\"\n }\n ]\n}", "customlabel" "" }, { "id" "blg8aemu5aijmdjogykhg", "language" "415", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 415,\n \\"message\\" \\"invalid authentication key\\"\n }\n ]\n}", "customlabel" "" }, { "id" "v7dtyc8tt ef1edpjcyli", "language" "416", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 416,\n \\"message\\" \\"overlapping data range\\"\n }\n ]\n}", "customlabel" "" }, { "id" "nld3wtwbllsnehwjwy z9", "language" "431", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 431,\n \\"message\\" \\"invalid source id\\"\n }\n ]\n}", "customlabel" "" }, { "id" "lj8bmzcuigva8my2l4p03", "language" "417", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 442,\n \\"message\\" \\"endpoint is not active\\"\n }\n ]\n}", "customlabel" "" }, { "id" "ad3lhz1rmc5690fps3n0r", "language" "411", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 411,\n \\"message\\" \\"invalid property mapping\\"\n }\n ]\n}", "customlabel" "" }, { "id" " wvtkzqncncuki popb i", "language" "451", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 451,\n \\"message\\" \\"invalid room mapping\\"\n }\n ]\n}", "customlabel" "" }, { "id" "oemnowktajjpwack8apap", "language" "429", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 453,\n \\"message\\" \\"mapping is not active\\"\n }\n ]\n}", "customlabel" "" }, { "id" "51xs9wjhz7bq23vdih4xn", "language" "423", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 453,\n \\"message\\" \\"invalid endpoint\\"\n }\n ]\n}", "customlabel" "" }, { "id" "qvhdfbqsvgrw131z22ysn", "language" "500", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 500,\n \\"message\\" \\"internal server error\\"\n }\n ]\n}", "customlabel" "" }, { "id" "j4mxuvj4ao7nrb9yyvjhb", "language" "502", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 502,\n \\"message\\" \\"bad gateway\\"\n }\n ]\n}", "customlabel" "" }, { "id" "cdhgq4maexo1tlvzppoa ", "language" "503", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 503,\n \\"message\\" \\"service unavailable\\"\n }\n ]\n}", "customlabel" "" }, { "id" "men6sxhzchlyhkhpqdlem", "language" "504", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 504,\n \\"message\\" \\"endpoint request timed out\\"\n }\n ]\n}", "customlabel" "" } ], "selectedlanguageid" "drzs8jb4xnurhjmhitksr" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "username", "kind" "required", "type" "string", "description" "api username provided by the partner to authenticate incoming pushes from bakuun ", "" "api username provided by the partner to authenticate incoming pushes from bakuun " }, { "name" "password", "kind" "required", "type" "string", "description" "api password provided by the partner to authenticate incoming requests from bakuun ", "" "api password provided by the partner to authenticate incoming requests from bakuun " }, { "name" "hotelid", "kind" "required", "type" "string", "description" "unique property identifier (shared mapping between bakuun and the partner) ", "" "unique property identifier (shared mapping between bakuun and the partner) " }, { "name" "action", "kind" "required", "type" "string", "description" "always set to arrivalclosedrq ", "" "always set to arrivalclosedrq " }, { "name" "data", "kind" "required", "type" "object", "description" "list of arrival restriction records (each for a room/date range) ", "" "list of arrival restriction records (each for a room/date range) ", "children" \[ { "name" "startdateymd", "kind" "required", "type" "string", "description" "start date of the update range, formatted as yyyy mm dd " }, { "name" "enddateymd", "kind" "required", "type" "string", "description" "end date of the update range, formatted as yyyy mm dd " }, { "name" "roomcode", "kind" "required", "type" "string", "description" "code identifying the room (as per the room mapping) " }, { "name" "restriction", "kind" "required", "type" "string", "description" "restriction type always \\"arrival\\" for this action " }, { "name" "status", "kind" "required", "type" "string", "description" "restriction value \n\\"0\\" = open for arrival\n\\"1\\" = closed for arrival" } ], "schema" \[ { "name" "startdateymd", "kind" "required", "type" "string", "description" "start date of the update range, formatted as yyyy mm dd " }, { "name" "enddateymd", "kind" "required", "type" "string", "description" "end date of the update range, formatted as yyyy mm dd " }, { "name" "roomcode", "kind" "required", "type" "string", "description" "code identifying the room (as per the room mapping) " }, { "name" "restriction", "kind" "required", "type" "string", "description" "restriction type always \\"arrival\\" for this action " }, { "name" "status", "kind" "required", "type" "string", "description" "restriction value \n\\"0\\" = open for arrival\n\\"1\\" = closed for arrival" } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "success", "kind" "optional", "type" "boolean", "description" "" } ] }

