Buyer API (Push)
Mapping
Fetch Room Details
1 min
{ "name" "get room details", "method" "post", "url" "https //wsb bakuun com/v2/ratedockroomlist/test/rdkxx/966102", "description" "fetch room details with partner room code\n\n", "tab" "examples", "examples" { "languages" \[ { "id" " a6ev31cslizcdtyzhisl", "language" "json", "code" "{\n \\"password\\" \\"xxxxx\\",\n \\"username\\" \\"xxxx\\",\n \\"action\\" \\"getroom\\",\n \\"hotelref\\" {\n \\"code\\" \\"htlx x\\",\n \\"name\\" \\"test property\\"\n }\n}", "customlabel" "" }, { "id" "qcpkjnct8mcg cwafuhwn", "language" "curl", "code" "curl location 'https //wsb bakuun com/v2/ratedockroomlist/test/rdkxx/966102' \\\\\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 \\"name\\" \\"\\"\n }\n}'", "customlabel" "" }, { "id" "sws4em22udsqerevurpos", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //wsb bakuun com/v2/ratedockroomlist/test/rdkxx/966102',\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 \\"name\\" \\"\\"\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" "4bxlgkg6lgizq50bkqmxe", "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 \\"name\\" \\"\\"\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/ratedockroomlist/test/rdkxx/966102\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" " xft1fig7bx9wttkrsbcn", "language" "python", "code" "import requests\nimport json\n\nurl = \\"https //wsb bakuun com/v2/ratedockroomlist/test/rdkxx/966102\\"\n\npayload = json dumps({\n \\"username\\" \\"string\\",\n \\"password\\" \\"string\\",\n \\"action\\" \\"string\\",\n \\"hotelref\\" {\n \\"code\\" \\"\\",\n \\"name\\" \\"\\"\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" "pehdklwoyc6hrlb5oawxe", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"json\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //wsb bakuun com/v2/ratedockroomlist/test/rdkxx/966102\\")\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 \\"name\\" \\"\\"\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\\" \\"xxx\\",\n \\"hotelroomlists\\" \[\n {\n \\"roomtypeid\\" \\"xxx\\",\n \\"roomname\\" \\"xxxx\\",\n \\"type\\" \\"daily room\\"\n },\n {\n \\"roomtypeid\\" \\"xxxx\\",\n \\"roomname\\" \\" standard single\\",\n \\"type\\" \\"daily room\\"\n }\n ]\n },\n \\"warnings\\" \[],\n \\"errors\\" \[]\n}", "customlabel" "" }, { "id" "4trsqtziivrtdf0gtbjxr", "language" "401", "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 \n", "" "api password provided by the partner to authenticate incoming requests from bakuun \n" }, { "name" "action", "kind" "required", "type" "string", "description" "defines the requested operation must be set to getroom ", "" "defines the requested operation must be set to getroom " }, { "name" "hotelref", "kind" "required", "type" "object", "description" "", "" "hotelref", "children" \[ { "name" "code", "kind" "required", "type" "string", "description" "the hotel code assigned by the partner system\n\n" }, { "name" "name", "kind" "required", "type" "string", "description" "the hotel name assigned by the partner system\n" } ], "schema" \[ { "name" "code", "kind" "required", "type" "string", "description" "the hotel code assigned by the partner system\n\n" }, { "name" "name", "kind" "required", "type" "string", "description" "the hotel name assigned by the partner system\n" } ] } ], "formdataparameters" \[] }, "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" }, "hastryitout" false, "response" \[ { "name" "success", "kind" "optional", "type" "boolean", "description" "" }, { "name" "data", "kind" "optional", "type" "object", "description" "", "children" \[ { "name" "hotelid", "kind" "optional", "type" "string", "description" "the hotel code assigned by the partner system" }, { "name" "hotelroomlists", "kind" "optional", "type" "string", "description" "" }, { "name" "roomtypeid", "kind" "optional", "type" "string", "description" "the room id assigned by the partner system" }, { "name" "roomname", "kind" "optional", "type" "string", "description" "the room name assigned by the partner system" }, { "name" "type", "kind" "optional", "type" "string", "description" "used to identify the room selling model , the allowed value would be daily room" } ] }, { "name" "warnings", "kind" "optional", "type" "array", "description" "", "children" \[] }, { "name" "errors", "kind" "optional", "type" "array", "description" "", "children" \[] } ] }

