Buyer API (Push)
...
Rate Plan Level
Closed Departure Restriction Rate Plan Level
1 min
{ "name" "closed departure restriction rate plan level", "method" "post", "url" "https //aggregate bakuun com/api/updaterates/mpbxx/invupdate", "description" "pushes departure restriction updates from bakuun to the partner system, at condition level \n\nthis action notifies the partner when a property or a specific room condition (condcode) is closed or open for departures (check out) on selected date ranges \nit ensures both systems remain synchronized when hotels apply “no checkout” or “checkout allowed” restrictions to specific rate plans or room conditions ", "tab" "examples", "examples" { "languages" \[ { "id" "ibkpyjyzsjxvngoiikohv", "language" "json", "code" "{\n \\"username\\" \\"xxx\\",\n \\"password\\" \\"xxx\\",\n \\"hotelid\\" \\"htlxx\\",\n \\"action\\" \\"departurecondclosed\\",\n \\"data\\" \[\n {\n \\"startdateymd\\" \\"yyyy mm dd\\",\n \\"enddateymd\\" \\"yyyy mm dd\\",\n \\"roomcode\\" \\"rx x\\",\n \\"condcode\\" \\"rx x x\\",\n \\"restriction\\" \\"departure\\",\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\\" \\"departure\\",\n \\"status\\" \\"0\\"\n }\n ]\n }", "customlabel" "" }, { "id" "i76gaodxrf3cfhtsicohs", "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" "vcorklc7jk6e y7qjchb", "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" "1cju17hjojyohs1godx2z", "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" "rw6n6mhtjf35uk6cnyt8v", "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" "tq3rk8pg2ekhnhufeandh", "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 \\"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 \\"errors\\" \[\n {\n \\"code\\" 504,\n \\"message\\" \\"endpoint request timed out\\"\n }\n ]\n}", "customlabel" "" } ], "selectedlanguageid" "rquppnrlzjcpooypilgaq" }, "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 departurecondclosed", "" "always set as departurecondclosed" }, { "name" "data", "kind" "required", "type" "object", "description" "list of departure restriction records for one or more rooms and conditions ", "" "list of departure restriction records for one or more rooms and conditions ", "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 \\"departure\\"" }, { "name" "status", "kind" "required", "type" "string", "description" "restriction flag \n\\"1\\" = closed for departure\n\\"0\\" = open 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 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 \\"departure\\"" }, { "name" "status", "kind" "required", "type" "string", "description" "restriction flag \n\\"1\\" = closed for departure\n\\"0\\" = open for departure" } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "id", "kind" "optional", "type" "string", "description" "id of the cake retrieved" } ] }

