Connectivity Partner
...
Restrictions Rate Plan Level
Cancellation and Deposit
1 min
{ "name" "cancellation and deposit ", "method" "post", "url" "https //wsb bakuun com/v2/push ari/cpb46/881826", "description" "returns the cancellation and deposit policy for a specific hotel / room / rate plan and date range \n\nthis action is used by the partner to retrieve \n\ncancellation rules (deadlines, penalty type & amount, level 1 / level 2, etc )\n\ndeposit rules (if a deposit is required, how much, when it’s charged)", "tab" "examples", "examples" { "languages" \[ { "id" "f6dfmy8yp37hbzlk13k1v", "language" "json", "code" "{\n \\"sharepost\\" \\"string\\",\n \\"sourceid\\" \\"string\\",\n \\"propertyid\\" \\"string\\",\n \\"roomid\\" \\"string\\",\n \\"rateid\\" \\"string\\",\n \\"startdate\\" \\"yyyy mm dd\\",\n \\"enddate\\" \\"yyyy mm dd\\",\n \\"refundable\\" \\"string\\",\n \\"action\\" \\"getcancellation\\",\n \\"policydetails\\" {\n \\"cancellation\\" \[\n {\n \\"policyid\\" xx,\n \\"dayspriorcheckin\\" xx,\n \\"penaltytype\\" xx,\n \\"penaltyamount\\" xx,\n \\"penaltyapplied\\" xx,\n \\"level\\" x\n }\n ],\n \\"deposit\\" {\n \\"depositpolicy\\" \\"string\\",\n \\"deposittype\\" x,\n \\"depositamount\\" xx,\n \\"depositapplied\\" x,\n \\"depositintervalunits\\" x,\n \\"deposittimeinterval\\" x\n }\n }\n}", "customlabel" "" }, { "id" "m5kpyfujk8kiyyhyoace9", "language" "curl", "code" "curl location 'https //wsb bakuun com/v2/push ari/cpb46/881826' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n \\"sharepost\\" \\"string\\",\n \\"sourceid\\" \\"string\\",\n \\"propertyid\\" \\"string\\",\n \\"roomid\\" \\"string\\",\n \\"rateid\\" \\"string\\",\n \\"startdate\\" \\"string\\",\n \\"enddate\\" \\"string\\",\n \\"refundable\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"policydetails\\" {\n \\"cancellation\\" {\n \\"policyid\\" \\"\\",\n \\"dayspriorcheckin\\" \\"\\",\n \\"penaltytype\\" \\"\\",\n \\"penaltyamount\\" \\"\\",\n \\"penaltyapplied\\" \\"\\",\n \\"level\\" \\"\\"\n },\n \\"deposit\\" {\n \\"depositpolicy\\" \\"\\",\n \\"deposittype\\" \\"\\",\n \\"depositamount\\" \\"\\",\n \\"depositapplied\\" \\"\\",\n \\"depositintervalunits\\" \\"\\",\n \\"deposittimeinterval\\" \\"\\"\n }\n }\n}'", "customlabel" "" }, { "id" "9flhgzqlcgdo ujq7cfyl", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //wsb bakuun com/v2/push ari/cpb46/881826',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"sharepost\\" \\"string\\",\n \\"sourceid\\" \\"string\\",\n \\"propertyid\\" \\"string\\",\n \\"roomid\\" \\"string\\",\n \\"rateid\\" \\"string\\",\n \\"startdate\\" \\"string\\",\n \\"enddate\\" \\"string\\",\n \\"refundable\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"policydetails\\" {\n \\"cancellation\\" {\n \\"policyid\\" \\"\\",\n \\"dayspriorcheckin\\" \\"\\",\n \\"penaltytype\\" \\"\\",\n \\"penaltyamount\\" \\"\\",\n \\"penaltyapplied\\" \\"\\",\n \\"level\\" \\"\\"\n },\n \\"deposit\\" {\n \\"depositpolicy\\" \\"\\",\n \\"deposittype\\" \\"\\",\n \\"depositamount\\" \\"\\",\n \\"depositapplied\\" \\"\\",\n \\"depositintervalunits\\" \\"\\",\n \\"deposittimeinterval\\" \\"\\"\n }\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" "4m8a3gmdlqu9j39y0qjcf", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"content type\\", \\"application/json\\");\n\nvar raw = json stringify({\n \\"sharepost\\" \\"string\\",\n \\"sourceid\\" \\"string\\",\n \\"propertyid\\" \\"string\\",\n \\"roomid\\" \\"string\\",\n \\"rateid\\" \\"string\\",\n \\"startdate\\" \\"string\\",\n \\"enddate\\" \\"string\\",\n \\"refundable\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"policydetails\\" {\n \\"cancellation\\" {\n \\"policyid\\" \\"\\",\n \\"dayspriorcheckin\\" \\"\\",\n \\"penaltytype\\" \\"\\",\n \\"penaltyamount\\" \\"\\",\n \\"penaltyapplied\\" \\"\\",\n \\"level\\" \\"\\"\n },\n \\"deposit\\" {\n \\"depositpolicy\\" \\"\\",\n \\"deposittype\\" \\"\\",\n \\"depositamount\\" \\"\\",\n \\"depositapplied\\" \\"\\",\n \\"depositintervalunits\\" \\"\\",\n \\"deposittimeinterval\\" \\"\\"\n }\n }\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //wsb bakuun com/v2/push ari/cpb46/881826\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "pn czbmzq nj6nibbumb", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //wsb bakuun com/v2/push ari/cpb46/881826\\"\n\npayload = json dumps({\n \\"sharepost\\" \\"string\\",\n \\"sourceid\\" \\"string\\",\n \\"propertyid\\" \\"string\\",\n \\"roomid\\" \\"string\\",\n \\"rateid\\" \\"string\\",\n \\"startdate\\" \\"string\\",\n \\"enddate\\" \\"string\\",\n \\"refundable\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"policydetails\\" {\n \\"cancellation\\" {\n \\"policyid\\" \\"\\",\n \\"dayspriorcheckin\\" \\"\\",\n \\"penaltytype\\" \\"\\",\n \\"penaltyamount\\" \\"\\",\n \\"penaltyapplied\\" \\"\\",\n \\"level\\" \\"\\"\n },\n \\"deposit\\" {\n \\"depositpolicy\\" \\"\\",\n \\"deposittype\\" \\"\\",\n \\"depositamount\\" \\"\\",\n \\"depositapplied\\" \\"\\",\n \\"depositintervalunits\\" \\"\\",\n \\"deposittimeinterval\\" \\"\\"\n }\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" "yx6wzl5px thndum9b31v", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //wsb bakuun com/v2/push ari/cpb46/881826\\")\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 \\"sharepost\\" \\"string\\",\n \\"sourceid\\" \\"string\\",\n \\"propertyid\\" \\"string\\",\n \\"roomid\\" \\"string\\",\n \\"rateid\\" \\"string\\",\n \\"startdate\\" \\"string\\",\n \\"enddate\\" \\"string\\",\n \\"refundable\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"policydetails\\" {\n \\"cancellation\\" {\n \\"policyid\\" \\"\\",\n \\"dayspriorcheckin\\" \\"\\",\n \\"penaltytype\\" \\"\\",\n \\"penaltyamount\\" \\"\\",\n \\"penaltyapplied\\" \\"\\",\n \\"level\\" \\"\\"\n },\n \\"deposit\\" {\n \\"depositpolicy\\" \\"\\",\n \\"deposittype\\" \\"\\",\n \\"depositamount\\" \\"\\",\n \\"depositapplied\\" \\"\\",\n \\"depositintervalunits\\" \\"\\",\n \\"deposittimeinterval\\" \\"\\"\n }\n }\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "f6dfmy8yp37hbzlk13k1v" }, "results" { "languages" \[ { "id" "nk06oapm sjchzgv2zyly", "language" "200", "code" "{\n \\"success\\" true,\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "xp3tweagik5ayk9jvhgru", "language" "402", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 402,\n \\"message\\" \\"invalid parameter\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n }", "customlabel" "" }, { "id" "lav04x ysdgm3 ssnghc7", "language" "404", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 404,\n \\"message\\" \\"invalid start date\\"\n }\n ]\n }", "customlabel" "" }, { "id" "mxok8k nubsnplj22ktle", "language" "405", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 405,\n \\"message\\" \\"invalid end date\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n }", "customlabel" "" }, { "id" "wceyfpr rexmcv0yiags", "language" "408", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 408,\n \\"message\\" \\"processing error\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n }", "customlabel" "" }, { "id" "o47uhre8zesuhyi5rlvcl", "language" "415", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 415,\n \\"message\\" \\"invalid authentication key\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "by6marnhie6 kzgkelkbs", "language" "416", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 416,\n \\"message\\" \\"overlapping data range\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "hf6djkv kvqkoot ujkbj", "language" "417", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 440,\n \\"message\\" \\"invalid source id\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "4fpcqzpn0hx0rp1xgndmo", "language" "418", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 442,\n \\"message\\" \\"endpoint is not active\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "tmhcxf0m9aw57yulhuuaj", "language" "421", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 446,\n \\"message\\" \\"invalid property mapping\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "zw9yu5duevvqhh7n3gvgs", "language" "422", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 451,\n \\"message\\" \\"invalid room mapping\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "8dtaz7mwe3 eigkdxsvcu", "language" "423", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 453,\n \\"message\\" \\"mapping is not active\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "mb14rod0libv6sv9fwfzc", "language" "424", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 454,\n \\"message\\" \\"invalid endpoint\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "bf1hdhbf0yoxks1xjd6bv", "language" "425", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 471,\n \\"message\\" \\"channel id blocked\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "8vicnrikr8kwhnvfylnm ", "language" "426", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 453,\n \\"message\\" \\"mapping is not active\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "2p841kkn9bojgc9xdo1hj", "language" "428", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 454,\n \\"message\\" \\"invalid endpoint\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "rezbdorah7pxzff6o42z7", "language" "429", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 452,\n \\"message\\" \\"invalid rate plan mapping\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "zcwpkcoai2gcs lmjv5yy", "language" "500", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 500,\n \\"message\\" \\"internal server error\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "em kpv2ozfn8mco7 f1sv", "language" "502", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 502,\n \\"message\\" \\"bad gateway\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "zzze2j6y7yzdula qc4od", "language" "503", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 503,\n \\"message\\" \\"service unavailable\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" }, { "id" "b4wrfm8k9w0kuyctvgtou", "language" "504", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 504,\n \\"message\\" \\"endpoint request timed out\\"\n }\n ],\n \\"trackingid\\" \\"68c168dd04829387650a476d\\"\n}", "customlabel" "" } ], "selectedlanguageid" "hf6djkv kvqkoot ujkbj" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "sharepost", "kind" "required", "type" "string", "description" "system generated, human readable secret api access key (unique per account) ", "" "system generated, human readable secret api access key (unique per account) " }, { "name" "sourceid", "kind" "required", "type" "string", "description" "connectivity partner identifier assigned by bakuun (e g cpbxx)", "" "connectivity partner identifier assigned by bakuun (e g cpbxx)" }, { "name" "propertyid", "kind" "required", "type" "string", "description" "unique property identifier (shared mapping between bakuun and the connectivity partner) ", "" "unique property identifier (shared mapping between bakuun and the connectivity partner) " }, { "name" "roomid", "kind" "required", "type" "string", "description" "id identifying the room type (as mapped between bakuun and the connectivity partner) ", "" "id identifying the room type (as mapped between bakuun and the connectivity partner) " }, { "name" "rateid", "kind" "required", "type" "string", "description" "id identifying the rate type (as mapped between bakuun and the connectivity partner) ", "" "id identifying the rate type (as mapped between bakuun and the connectivity partner) " }, { "name" "startdate", "kind" "required", "type" "string", "description" "start date of the update range, formatted as yyyy mm dd ", "" "start date of the update range, formatted as yyyy mm dd " }, { "name" "enddate", "kind" "required", "type" "string", "description" "end date of the update range, formatted as yyyy mm dd ", "" "end date of the update range, formatted as yyyy mm dd " }, { "name" "refundable", "kind" "required", "type" "string", "description" "\\"true\\" if the rate is refundable, \\"false\\" if non refundable ", "" "\\"true\\" if the rate is refundable, \\"false\\" if non refundable " }, { "name" "action", "kind" "required", "type" "string", "description" "always set as getcancellation", "" "always set as getcancellation" }, { "name" "policydetails", "kind" "required", "type" "object", "description" "", "" "required", "children" \[ { "name" "cancellation", "kind" "required", "type" "object", "description" "each entry represents one cancellation rule level (e g first deadline, second deadline) ", "children" \[ { "name" "policyid", "kind" "required", "type" "integer", "description" "type of cancellation policy linked to the rate plan 1 = standard, 2 = flexible 1, 3 = flexible 2, 4 = flexible 3, 5 = flexible 4" }, { "name" "dayspriorcheckin", "kind" "required", "type" "integer", "description" "number of days before check in a guest can cancel without penalty use 0 if cancellation is set at 18 00 on day of arrival " }, { "name" "penaltytype", "kind" "required", "type" "integer", "description" "penalty cost type 3 = percentage of the stay " }, { "name" "penaltyamount", "kind" "required", "type" "integer", "description" "percentage value from 1 to 100 " }, { "name" "penaltyapplied", "kind" "required", "type" "integer", "description" "where the penalty is applied 3 = first night, 4 = full stay" }, { "name" "level", "kind" "required", "type" "integer", "description" "level of the cancellation rule 1 = first level, 2 = second level (for multi step policies) " } ] }, { "name" "deposit", "kind" "required", "type" "object", "description" "represents the deposit policy for the rate plan ", "children" \[ { "name" "depositpolicy", "kind" "required", "type" "string", "description" "whether a deposit is required \\"required\\" = true, \\"not required\\" = false when refundable is false, deposit will always be \\"required\\"" }, { "name" "deposittype", "kind" "required", "type" "integer", "description" "deposit cost parameter 3 = percentage " }, { "name" "depositamount", "kind" "required", "type" "integer", "description" "percentage value from 1 to 100 " }, { "name" "depositapplied", "kind" "required", "type" "integer", "description" "where the deposit is applied 3 = first night, 4 = full stay " }, { "name" "depositintervalunits", "kind" "required", "type" "integer", "description" "when deposit is charged 1 = days before arrival, 0 = at moment of booking" }, { "name" "deposittimeinterval", "kind" "required", "type" "integer", "description" "interval value applied only if depositintervalunits = 1 allowed values 1–10 or 10, 30, 45, 60 represents number of days before arrival when deposit is charged " } ] } ], "schema" \[ { "name" "cancellation", "kind" "required", "type" "object", "description" "each entry represents one cancellation rule level (e g first deadline, second deadline) ", "children" \[ { "name" "policyid", "kind" "required", "type" "integer", "description" "type of cancellation policy linked to the rate plan 1 = standard, 2 = flexible 1, 3 = flexible 2, 4 = flexible 3, 5 = flexible 4" }, { "name" "dayspriorcheckin", "kind" "required", "type" "integer", "description" "number of days before check in a guest can cancel without penalty use 0 if cancellation is set at 18 00 on day of arrival " }, { "name" "penaltytype", "kind" "required", "type" "integer", "description" "penalty cost type 3 = percentage of the stay " }, { "name" "penaltyamount", "kind" "required", "type" "integer", "description" "percentage value from 1 to 100 " }, { "name" "penaltyapplied", "kind" "required", "type" "integer", "description" "where the penalty is applied 3 = first night, 4 = full stay" }, { "name" "level", "kind" "required", "type" "integer", "description" "level of the cancellation rule 1 = first level, 2 = second level (for multi step policies) " } ] }, { "name" "deposit", "kind" "required", "type" "object", "description" "represents the deposit policy for the rate plan ", "children" \[ { "name" "depositpolicy", "kind" "required", "type" "string", "description" "whether a deposit is required \\"required\\" = true, \\"not required\\" = false when refundable is false, deposit will always be \\"required\\"" }, { "name" "deposittype", "kind" "required", "type" "integer", "description" "deposit cost parameter 3 = percentage " }, { "name" "depositamount", "kind" "required", "type" "integer", "description" "percentage value from 1 to 100 " }, { "name" "depositapplied", "kind" "required", "type" "integer", "description" "where the deposit is applied 3 = first night, 4 = full stay " }, { "name" "depositintervalunits", "kind" "required", "type" "integer", "description" "when deposit is charged 1 = days before arrival, 0 = at moment of booking" }, { "name" "deposittimeinterval", "kind" "required", "type" "integer", "description" "interval value applied only if depositintervalunits = 1 allowed values 1–10 or 10, 30, 45, 60 represents number of days before arrival when deposit is charged " } ] } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "success", "kind" "optional", "type" "boolean", "description" "" }, { "name" "trackingid", "kind" "optional", "type" "string", "description" "", "children" \[] } ] }

