Buyer API (Push)
...
Room Level
Availability Room Level
1 min
{ "name" "availability room level ", "method" "post", "url" "https //aggregate bakuun com/api/updateroomavailrq/mpbxx/invupdate", "description" "pushes inventory count (available room quantity) updates from bakuun to the partner system \n\nthis action notifies the partner of changes in available room counts for a property and specific date ranges \nit allows the partner to synchronize room availability in real time with updates coming from hotels connected through b marketplace buyer or b aggregate \n\nbakuun pushes updates immediately when room availability changes \n\nin high volume cases, multiple changes may be batched in a single payload \n\npartners must return an acknowledgment (status \\"success\\") for each push to confirm processing ", "tab" "examples", "examples" { "languages" \[ { "id" "ibkpyjyzsjxvngoiikohv", "language" "json", "code" "{\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"hotelid\\" \\"string\\",\n \\"action\\" \\"invcountupdate\\",\n \\"data\\" \[\n {\n \\"startdateymd\\" \\"yyyy mm dd\\",\n \\"enddateymd\\" \\"yyyy mm dd\\",\n \\"roomcode\\" \\"string\\",\n \\"roomcount\\" \\"string\\"\n }\n ]\n}", "customlabel" "" }, { "id" "ft8yx1vf mro8f02twhq", "language" "curl", "code" "curl location 'https //aggregate bakuun com/api/updateroomavailrq/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 \\"roomcount\\" \\"\\"\n }\n}'", "customlabel" "" }, { "id" "jivrlf 6eum1lmyqbnwof", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //aggregate bakuun com/api/updateroomavailrq/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 \\"roomcount\\" \\"\\"\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" "utum33dofdg3qu3wp v4j", "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 \\"roomcount\\" \\"\\"\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/updateroomavailrq/mpbxx/invupdate\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "bfwxeik1meqdfaqq2 f1s", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //aggregate bakuun com/api/updateroomavailrq/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 \\"roomcount\\" \\"\\"\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" "n7upjprio5fnviclzgwp ", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //aggregate bakuun com/api/updateroomavailrq/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 \\"roomcount\\" \\"\\"\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 \\"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 \\"errors\\" \[\n {\n \\"code\\" 404,\n \\"message\\" \\"invalid start date\\"\n }\n ]\n}", "customlabel" "" }, { "id" "ose 4wq4hzrffbyh8f1d2", "language" "405", "code" "{\n \\"success\\" false,\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" "ose 4wq4hzrffbyh8f1d2" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "username", "kind" "required", "type" "string", "description" "api username provided by the partner to authenticate incoming requests from bakuun ", "" "api username provided by the partner to authenticate incoming requests 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 invcountupdate ", "" "always set to invcountupdate " }, { "name" "data", "kind" "required", "type" "object", "description" "list of inventory updates for one or more rooms and date ranges ", "" "list of inventory updates for one or more rooms and date ranges ", "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 type (as mapped between bakuun and partner) " }, { "name" "roomcount", "kind" "required", "type" "string", "description" "updated number of available rooms for this date range " } ], "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 type (as mapped between bakuun and partner) " }, { "name" "roomcount", "kind" "required", "type" "string", "description" "updated number of available rooms for this date range " } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "query parameter", "value" "queryparameters" }, "hastryitout" false }

