Buyer API (Push)
...
Rate Plan Level
Stop Sales Restriction Rate Plan Level
1 min
{ "name" "stop sales restriction rate plan level", "method" "post", "url" "https //aggregate bakuun com/api/updaterates/mpbxx/invupdate", "description" "while masterclosedrq works at room level, mastercondclosed works at condition level, using condcode (for example, a specific rate, restriction set, or condition profile) \n\nthis action tells the partner whether a given condition (condcode) is closed (not sellable) or open (sellable) for a room and date range ", "tab" "examples", "examples" { "languages" \[ { "id" "ibkpyjyzsjxvngoiikohv", "language" "json", "code" "{\n \\"username\\" \\"xxx\\",\n \\"password\\" \\"xxx\\",\n \\"hotelid\\" \\"htlxx\\",\n \\"action\\" \\"mastercondclosed\\",\n \\"data\\" \[\n {\n \\"startdateymd\\" \\"yyyy mm dd\\",\n \\"enddateymd\\" \\"yyyy mm dd\\",\n \\"roomcode\\" \\"rx x\\",\n \\"condcode\\" \\"rx x x\\",\n \\"restriction\\" \\"master\\",\n \\"status\\" \\"1\\"\n },\n {\n \\"startdateymd\\" \\"yyyy mm dd\\",\n \\"enddateymd\\" yyyy mm dd\\",\n \\"roomcode\\" \\"rx x\\",\n \\"condcode\\" \\"rx x x\\",\n \\"restriction\\" \\"master\\",\n \\"status\\" \\"0\\"\n }\n ]\n }", "customlabel" "" }, { "id" "yg qtnjuhp7ew2hpkto27", "language" "curl", "code" "curl location 'https //aggregate bakuun com/api/updaterates/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 \\"condcode\\" \\"\\",\n \\"restriction \\" \\"\\",\n \\"status\\" \\"\\"\n }\n}'", "customlabel" "" }, { "id" "jrwoj7ffh8qg2y c 0vby", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //aggregate bakuun com/api/updaterates/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 \\"condcode\\" \\"\\",\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" "2wpxjh3ouiwi5o79k5nd8", "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 \\"condcode\\" \\"\\",\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/updaterates/mpbxx/invupdate\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "ln4weyhdo2zfhkh5vbsmt", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //aggregate bakuun com/api/updaterates/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 \\"condcode\\" \\"\\",\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" "e4v3bz4st3cmyvqkcdrqm", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //aggregate bakuun com/api/updaterates/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 \\"condcode\\" \\"\\",\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 \\"trackingid\\" \\"xxxxxxxxxxxxx\\",\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 as \\"mastercondclosed\\"", "" "always set as \\"mastercondclosed\\"" }, { "name" "data", "kind" "required", "type" "object", "description" "list of master condition closure/opening records ", "" "list of master condition closure/opening records ", "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 code as per mapping " }, { "name" "condcode", "kind" "required", "type" "string", "description" "code identifying the rate plan code as per mapping " }, { "name" "restriction ", "kind" "required", "type" "string", "description" "restriction type , for this action, always \\"master\\"" }, { "name" "status", "kind" "required", "type" "string", "description" "condition status flag \n\\"1\\" = closed (condition not sellable)\n\\"0\\" = open (condition sellable)" } ], "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 code as per mapping " }, { "name" "condcode", "kind" "required", "type" "string", "description" "code identifying the rate plan code as per mapping " }, { "name" "restriction ", "kind" "required", "type" "string", "description" "restriction type , for this action, always \\"master\\"" }, { "name" "status", "kind" "required", "type" "string", "description" "condition status flag \n\\"1\\" = closed (condition not sellable)\n\\"0\\" = open (condition sellable)" } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "success", "kind" "optional", "type" "boolean", "description" "" } ] }

