Buyer API (Push)
Mapping
Fetch Rate Plan Details
1 min
{ "name" "fetch rate plan details", "method" "post", "url" " https //wsb bakuun com/v2/rateplanlist/mpbxx/575653", "description" "fetch rate plan details with partner rate plan code\n\n", "tab" "examples", "examples" { "languages" \[ { "id" " a6ev31cslizcdtyzhisl", "language" "json", "code" "{\n \\"password\\" \\"xxxxxxxxx\\",\n \\"username\\" \\"xxxxxxxxx\\",\n \\"action\\" \\"getroomrateplan\\",\n \\"hotelref \\" {\n \\"code\\" \\"htlx\\",\n \\"room\\" {\n \\"code\\" \\"rx x\\"\n }\n }\n}\n}", "customlabel" "" }, { "id" "jypzdpajinpqe 4votawb", "language" "curl", "code" "curl location 'https //wsb bakuun com/v2/rateplanlist/mpbxx/575653' \\\\\n header 'accept application/json' \\\\\n header 'content type application/json' \\\\\n data '{\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelref\\" {\n \\"code\\" \\"\\",\n \\"room\\" {\n \\"code\\" \\"\\"\n }\n }\n}'", "customlabel" "" }, { "id" "hz0tlkyvlupqwpaqvrel4", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //wsb bakuun com/v2/rateplanlist/mpbxx/575653',\n 'headers' {\n 'accept' 'application/json',\n 'content type' 'application/json'\n },\n body json stringify({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelref\\" {\n \\"code\\" \\"\\",\n \\"room\\" {\n \\"code\\" \\"\\"\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" "pasplhy3xy4yw9grvuvpj", "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 \\"action\\" \\"string\\",\n \\"hotelref\\" {\n \\"code\\" \\"\\",\n \\"room\\" {\n \\"code\\" \\"\\"\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/rateplanlist/mpbxx/575653\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "dhfsc8zwqozln7wgm apy", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //wsb bakuun com/v2/rateplanlist/mpbxx/575653\\"\n\npayload = json dumps({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelref\\" {\n \\"code\\" \\"\\",\n \\"room\\" {\n \\"code\\" \\"\\"\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" "zgiwqx1qpl8etersbakxy", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //wsb bakuun com/v2/rateplanlist/mpbxx/575653\\")\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 \\"action\\" \\"string\\",\n \\"hotelref\\" {\n \\"code\\" \\"\\",\n \\"room\\" {\n \\"code\\" \\"\\"\n }\n }\n})\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" " a6ev31cslizcdtyzhisl" }, "results" { "languages" \[ { "id" "bvujfridcm7llpyvvpe0n", "language" "200", "code" "{\n \\"success\\" true,\n \\"data\\" {\n \\"hotelid\\" \\"xxxxxxxxx\\",\n \\"room\\" {\n \\"roomtypeid\\" \\"xxxxxxxxx\\",\n \\"rateplans\\" \[\n {\n \\"rateplanid\\" \\"xxxxxxxxx\\",\n \\"rateplanname\\" \\"xxxxxxxxx\\",\n \\"canceltype\\" 1,\n \\"authperson\\" 2,\n \\"extrabed\\" 2,\n \\"extracradles\\" 1,\n \\"default breakfast\\" 1,\n \\"default halfmeal\\" 0,\n \\"default fullmeal\\" 1\n },\n {\n \\"rateplanid\\" \\"xxxxxxxxx\\",\n \\"rateplanname\\" \\"xxxxxxxxx\\",\n \\"canceltype\\" 1,\n \\"authperson\\" 2,\n \\"extrabed\\" 2,\n \\"extracradles\\" 1,\n \\"default breakfast\\" 1,\n \\"default halfmeal\\" 0,\n \\"default fullmeal\\" 1\n }\n ]\n }\n },\n \\"warnings\\" \[],\n \\"errors\\" \[]\n}", "customlabel" "" }, { "id" " erred0t7kry7dlqdwgme", "language" "410 message", "code" "{\n \\"success\\" false,\n \\"errors\\" \[\n {\n \\"code\\" 410,\n \\"message\\" \\"unauthorized user\\"\n }\n ]", "customlabel" "" } ], "selectedlanguageid" "bvujfridcm7llpyvvpe0n" }, "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "name" "username", "kind" "required", "type" "string", "description" "api username provided by the partner to authenticate incoming requests from bakuun ", "" "api username provided by the partner to authenticate incoming requests 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" "action", "kind" "required", "type" "string", "description" "defines the requested operation must be set to getroomrateplan ", "" "defines the requested operation must be set to getroomrateplan " }, { "name" "hotelref", "kind" "required", "type" "object", "description" "", "" "hotelref", "children" \[ { "name" "code", "kind" "required", "type" "string", "description" "the hotel code assigned by the partner system" }, { "name" "room", "kind" "required", "type" "object", "description" "the room name assigned by the partner system", "children" \[ { "name" "code", "kind" "required", "type" "string", "description" "the room code assigned by the partner system" } ] } ], "schema" \[ { "name" "code", "kind" "required", "type" "string", "description" "the hotel code assigned by the partner system" }, { "name" "room", "kind" "required", "type" "object", "description" "the room name assigned by the partner system", "children" \[ { "name" "code", "kind" "required", "type" "string", "description" "the room code assigned by the partner system" } ] } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "success", "kind" "optional", "type" "boolean", "description" "indicates whether the request was successful \ntrue / false" }, { "name" "data", "kind" "optional", "type" "object", "description" "contains all returned hotel information ", "children" \[ { "name" "hotelid", "kind" "optional", "type" "string", "description" "unique identifier of the hotel assigned by partner system" }, { "name" "room", "kind" "optional", "type" "object", "description" "room details including rate plans ", "children" \[ { "name" "roomtypeid", "kind" "optional", "type" "string", "description" "unique id of the room type assigned by partner system" }, { "name" "rateplans", "kind" "optional", "type" "object", "description" "list of all rate plans for this room ", "children" \[ { "name" "rateplanid", "kind" "optional", "type" "string", "description" "the rate plan code assigned by the partner system" }, { "name" "rateplanname", "kind" "optional", "type" "string", "description" "the rate plan name stored in the partner system" }, { "name" "canceltype", "kind" "optional", "type" "string", "description" "cancellation policy type \n1 = non refundable\n0 = refundable" }, { "name" "authperson", "kind" "optional", "type" "string", "description" "maximum number of people allowed in the room " }, { "name" "extrabed", "kind" "optional", "type" "string", "description" "number of extra beds available " }, { "name" "extracradles", "kind" "optional", "type" "string", "description" "number of cradles allowed " }, { "name" "default breakfast", "kind" "optional", "type" "string", "description" "indicates if breakfast is included \n1 = included\n0 = not included" }, { "name" "default halfmeal", "kind" "optional", "type" "string", "description" "indicates if half board is included \n1 = included\n0 = not included" }, { "name" "default fullmeal", "kind" "optional", "type" "string", "description" "indicates if full board is included \n1 = included\n0 = not included" } ] } ] } ] }, { "name" "warnings", "kind" "optional", "type" "array", "description" "list of warnings (if any) ", "children" \[] }, { "name" "errors", "kind" "optional", "type" "array", "description" "list of errors (if any) ", "children" \[] } ] }

