Buyer API (Push)
...
Room Level
Sell Threshold
1 min
{ "name" "sell threshold", "method" "post", "url" "https //aggregate bakuun com/api/updateroomthreshold/mpbxx/invupdate", "description" "pushes the sell threshold configuration from bakuun to the partner system \n\nthis action informs the partner about threshold rules for specific rooms and date ranges \nthe sell threshold determines the minimum number of rooms that must remain unsold before the property stops being available for sale \n\napplies to each date within the provided date range threshold value is typically an integer between 0 and the total number of available rooms \na threshold of 0 means no restriction (sell until all rooms are gone) \n\nused mainly to prevent overbookings or control yield \n\n\n\n", "tab" "examples", "examples" { "languages" \[ { "id" "ibkpyjyzsjxvngoiikohv", "language" "json", "code" "{\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"hotelid\\" \\"string\\",\n \\"action\\" \\"sellthresholdupdate\\",\n \\"data\\" \[\n {\n \\"startdateymd\\" \\"yyyy mm dd\\",\n \\"enddateymd\\" \\"yyyy mm dd\\",\n \\"roomcode\\" \\"string\\",\n \\"threshold\\" \\"1\\"\n }\n ]\n}", "customlabel" "" }, { "id" "h7h4pq6dlbwodxc7lh5vx", "language" "curl", "code" "curl location 'https //aggregate bakuun com/api/updateroomthreshold/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 \\"threshold\\" \\"\\"\n }\n}'", "customlabel" "" }, { "id" "gvemeqmj3hpbsaecabnms", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //aggregate bakuun com/api/updateroomthreshold/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 \\"threshold\\" \\"\\"\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" "ckzmdxoueja4qvqiaabgo", "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 \\"threshold\\" \\"\\"\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/updateroomthreshold/mpbxx/invupdate\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "vphvayw368 t0kanksaal", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //aggregate bakuun com/api/updateroomthreshold/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 \\"threshold\\" \\"\\"\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" "kv7t1n f5i3hhfbbrahwp", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //aggregate bakuun com/api/updateroomthreshold/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 \\"threshold\\" \\"\\"\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 \\"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 sellthresholdupdate", "" "always set as sellthresholdupdate" }, { "name" "data", "kind" "required", "type" "object", "description" "", "" "object", "children" \[ { "name" "startdateymd", "kind" "required", "type" "string", "description" "start date of the period affected, in yyyy mm dd format " }, { "name" "enddateymd", "kind" "required", "type" "string", "description" "end date of the period affected, in yyyy mm dd format " }, { "name" "roomcode", "kind" "required", "type" "string", "description" "code identifying the room (as per the room mapping) " }, { "name" "threshold", "kind" "required", "type" "string", "description" "defines the minimum room allotment that must remain unsold when this threshold is reached, sales will automatically stop \nvalid range 0–999 " } ], "schema" \[ { "name" "startdateymd", "kind" "required", "type" "string", "description" "start date of the period affected, in yyyy mm dd format " }, { "name" "enddateymd", "kind" "required", "type" "string", "description" "end date of the period affected, in yyyy mm dd format " }, { "name" "roomcode", "kind" "required", "type" "string", "description" "code identifying the room (as per the room mapping) " }, { "name" "threshold", "kind" "required", "type" "string", "description" "defines the minimum room allotment that must remain unsold when this threshold is reached, sales will automatically stop \nvalid range 0–999 " } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "query parameter", "value" "queryparameters" }, "hastryitout" false }

