Buyer API (Push)
...
Room Level
Closed Departure Restriction Room Level
1 min
{ "name" "closed departure restriction room level", "method" "post", "url" "https //aggregate bakuun com/api/updateroomdeparture/mpbxx/invupdate", "description" "pushes departure restriction updates from bakuun to the partner system \n\nthis action notifies the partner when a property or specific room type is closed or open for departures (check out) on certain dates \nit ensures that the partner system does not allow guests to depart on dates where the property has configured no checkout restrictions \n", "tab" "examples", "examples" { "languages" \[ { "id" "r 8ym yoajhto8f4bblrm", "language" "json", "code" "{\n \\"username\\" \\"xxxx\\",\n \\"password\\" \\"xxx\\",\n \\"hotelid\\" \\"htlxx\\",\n \\"action\\" \\"departureclosedrq\\",\n \\"data\\" \[\n {\n \\"startdateymd\\" \\"yyyy mm dd\\",\n \\"enddateymd\\" \\"yyyy mm dd\\",\n \\"roomcode\\" \\"rxx\\",\n \\"restriction\\" \\"departure\\",\n \\"status\\" \\"1\\"\n }\n ]\n}", "customlabel" "" }, { "id" "s hi4vfviq2yhy3egylsw", "language" "curl", "code" "curl location 'https //aggregate bakuun com/api/updateroomdeparture/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" "mpi00du1wg5kfrksy1wqp", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //aggregate bakuun com/api/updateroomdeparture/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" "evmdjayukwpfmsxhpp zn", "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/updateroomdeparture/mpbxx/invupdate\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" " zy taptcesip2drre7u1", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //aggregate bakuun com/api/updateroomdeparture/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" "63zjgxhqci4hinis0khmc", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //aggregate bakuun com/api/updateroomdeparture/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" "r 8ym yoajhto8f4bblrm" }, "results" { "languages" \[ { "id" "hifbzgqchsln3h59tz70s", "language" "200", "code" "{\n \\"success\\" true\n}\n", "customlabel" "" }, { "id" "okdaypawwi1931fmxbhlr", "language" "410", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 410,\n \\"message\\" \\"unauthorized user\\"\n }\n ]\n}", "customlabel" "" }, { "id" "8xqvq1waslilsyot7 gb ", "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" "0bv3 8nfjzftp f1b1cip", "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" " cg9gsndssc2wn0wufhof", "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" "63z6z5lcceasjg hx2tbz", "language" "408", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 405,\n \\"message\\" \\"invalid end date\\"\n }\n ]\n}", "customlabel" "" }, { "id" "6dgk 0nhummdentt1dxup", "language" "415", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 405,\n \\"message\\" \\"invalid end date\\"\n }\n ]\n}", "customlabel" "" }, { "id" "mpoqouawworgaw0x2rpnb", "language" "416", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 405,\n \\"message\\" \\"invalid end date\\"\n }\n ]\n}", "customlabel" "" }, { "id" "bvdonsbntbs4b8jgmb17t", "language" "431", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 446,\n \\"message\\" \\"invalid property mapping\\"\n }\n ]\n}", "customlabel" "" }, { "id" "ckv1sopprmj5smtbhbowh", "language" "429", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 451,\n \\"message\\" \\"invalid room mapping\\"\n }\n ]\n}", "customlabel" "" }, { "id" "clgsoki7jbq16qu2szy1p", "language" "451", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 454,\n \\"message\\" \\"invalid endpoint \\"\n }\n ]\n}", "customlabel" "" }, { "id" "d1f ru3h trnrc3zvmwf5", "language" "418", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 471,\n \\"message\\" \\"source id blocked\\"\n }\n ]\n}", "customlabel" "" }, { "id" "jzt asnr7pvszhgs81jb0", "language" "414", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 453,\n \\"message\\" \\"mapping is not active\\"\n }\n ]\n}", "customlabel" "" }, { "id" "jbrvjyhkg4cc x2ed43nt", "language" "424", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 453,\n \\"message\\" \\"mapping is not active\\"\n }\n ]\n}", "customlabel" "" }, { "id" "pohnwqmnqpfrnuobbud2b", "language" "421", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 454,\n \\"message\\" \\"invalid endpoint\\"\n }\n ]\n}", "customlabel" "" }, { "id" "lralooxcgg6wjxijb6cco", "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" "drdn5lv6p 2a09ua1jeoo", "language" "502", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 502,\n \\"message\\" \\"bad gateway\\"\n }\n ]\n}", "customlabel" "" }, { "id" "b4r1k cb7vfyxm9yypfna", "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" "" }, { "id" "4gij8ckkwxser xdhxz6o", "language" "503", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 503,\n \\"message\\" \\"service unavailable\\"\n }\n ]\n}", "customlabel" "" }, { "id" "pisk2exk2i9gdfydourmc", "language" "409", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 442,\n \\"message\\" \\"endpoint is not active\\"\n }\n ]\n}", "customlabel" "" }, { "id" "wk1szh0lspyavcerx9dpa", "language" "428", "code" "{\n \\"success\\" false,\n \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\n \\"errors\\" \[\n {\n \\"code\\" 452,\n \\"message\\" \\"invalid rate plan mapping\\"\n }\n ]\n}", "customlabel" "" } ], "selectedlanguageid" "hifbzgqchsln3h59tz70s" }, "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 departureclosedrq ", "" "always set to departureclosedrq " }, { "name" "data", "kind" "required", "type" "object", "description" "list of departure restriction records (each corresponding to a room/date range) ", "" "list of departure restriction records (each corresponding to 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 \\"departure\\" for this action " }, { "name" "status", "kind" "required", "type" "string", "description" "restriction flag \n\\"0\\" = open for departure\n\\"1\\" = closed for departure" } ], "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 \\"departure\\" for this action " }, { "name" "status", "kind" "required", "type" "string", "description" "restriction flag \n\\"0\\" = open for departure\n\\"1\\" = closed for departure" } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "success", "kind" "optional", "type" "boolean", "description" "" } ] }

