Buyer API (Push)
Booking
Cancel
1 min
{ "name" "cancel", "method" "post", "url" "https //wsb qabakuun cloud/v2/booking/mpbxx/163944", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "polhsw0fal 4gozdfskjr", "language" "json", "code" "{\n \\"username\\" \\"xxxxx\\",\n \\"password\\" \\"xxxxx\\",\n \\"partnerid\\" \\"mpbxx\\",\n \\"partnername\\" \\"test partner\\",\n \\"action\\" \\"pushcancelbooking\\",\n \\"hotelreservation\\" \[\n {\n \\"hotelcode\\" \\"helix\\",\n \\"hotelname\\" \\"test property\\",\n \\"resstatus\\" \\"cancel\\",\n \\"resid\\" \\"rd00123 bakuun123\\"\n }\n ]\n}", "customlabel" "" }, { "id" "bqecojp44eb4pnv5rjfkl", "language" "curl", "code" "curl location 'https //wsb qabakuun cloud/v2/booking/mpbxx/163944' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"partnerid\\" \\"string\\",\n \\"partnername\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelreservation\\" {\n \\"hotelcode\\" \\"\\",\n \\"hotelname\\" \\"\\",\n \\"resstatus\\" \\"\\",\n \\"resid\\" \\"\\"\n }\n}'", "customlabel" "" }, { "id" "ofvi9scfhnuhpberiv8qo", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //wsb qabakuun cloud/v2/booking/mpbxx/163944',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"partnerid\\" \\"string\\",\n \\"partnername\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelreservation\\" {\n \\"hotelcode\\" \\"\\",\n \\"hotelname\\" \\"\\",\n \\"resstatus\\" \\"\\",\n \\"resid\\" \\"\\"\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" "zirlwvfeagpeghwn7wdrw", "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 \\"partnerid\\" \\"string\\",\n \\"partnername\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelreservation\\" {\n \\"hotelcode\\" \\"\\",\n \\"hotelname\\" \\"\\",\n \\"resstatus\\" \\"\\",\n \\"resid\\" \\"\\"\n }\n});\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //wsb qabakuun cloud/v2/booking/mpbxx/163944\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "t2xvxxuwlboybbqez4izc", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //wsb qabakuun cloud/v2/booking/mpbxx/163944\\"\n\npayload = json dumps({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"partnerid\\" \\"string\\",\n \\"partnername\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelreservation\\" {\n \\"hotelcode\\" \\"\\",\n \\"hotelname\\" \\"\\",\n \\"resstatus\\" \\"\\",\n \\"resid\\" \\"\\"\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" "olp17goqx1ax5hep twuy", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //wsb qabakuun cloud/v2/booking/mpbxx/163944\\")\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 \\"partnerid\\" \\"string\\",\n \\"partnername\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelreservation\\" {\n \\"hotelcode\\" \\"\\",\n \\"hotelname\\" \\"\\",\n \\"resstatus\\" \\"\\",\n \\"resid\\" \\"\\"\n }\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "polhsw0fal 4gozdfskjr" }, "results" { "languages" \[ { "id" "inx ac2uwxrduwmplwzuu", "language" "200", "code" "\[\n {\n \\"success\\" true,\n \\"message\\" \\"reservation cancel success\\",\n \\"roomindex\\" \\"2\\",\n \\"reservationid\\" \\"mpb543 2\\"\n },\n {\n \\"success\\" true,\n \\"message\\" \\"reservation cancel success\\",\n \\"roomindex\\" \\"1\\",\n \\"reservationid\\" \\"mpb543 1\\"\n }\n]", "customlabel" "" }, { "id" "s ku eaci 3sqmif56kpn", "language" "451", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 450,\n \\"message\\" \\"insufficient property data\\"\n }\n ]\n}", "customlabel" "" } ], "selectedlanguageid" "inx ac2uwxrduwmplwzuu" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "username", "kind" "required", "type" "string", "description" "system generated, api access secret key (unique per account) ", "" "system generated, api access secret key (unique per account) " }, { "name" "password", "kind" "required", "type" "string", "description" "system generated, api access secret key (unique per account) ", "" "system generated, api access secret key (unique per account) " }, { "name" "partnerid", "kind" "required", "type" "string", "description" "partner (buyer) identifier (e g rdkxx mpbxxx) ", "" "partner (buyer) identifier (e g rdkxx mpbxxx) " }, { "name" "partnername", "kind" "required", "type" "string", "description" "partner (buyer) name", "" "partner (buyer) name" }, { "name" "action", "kind" "required", "type" "string", "description" "always set as pushcancelbooking", "" "always set as pushcancelbooking" }, { "name" "hotelreservation", "kind" "required", "type" "object", "description" "", "" "object", "children" \[ { "name" "hotelcode", "kind" "required", "type" "string", "description" "unique bakuun or partner property id " }, { "name" "hotelname", "kind" "required", "type" "string", "description" "name of the property (for reference) " }, { "name" "resstatus", "kind" "required", "type" "string", "description" "must be \\"cancel\\" to confirm cancellation action " }, { "name" "resid", "kind" "required", "type" "string", "description" "reservation id previously generated" } ], "schema" \[ { "name" "hotelcode", "kind" "required", "type" "string", "description" "unique bakuun or partner property id " }, { "name" "hotelname", "kind" "required", "type" "string", "description" "name of the property (for reference) " }, { "name" "resstatus", "kind" "required", "type" "string", "description" "must be \\"cancel\\" to confirm cancellation action " }, { "name" "resid", "kind" "required", "type" "string", "description" "reservation id previously generated" } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "success", "kind" "optional", "type" "boolean", "description" "" }, { "name" "message", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "roomindex", "kind" "optional", "type" "string", "description" "", "children" \[] }, { "name" "reservationid", "kind" "optional", "type" "string", "description" "", "children" \[] } ] }

