---
title: Fetch Rate Plan Details
slug: fetch-rate-plan-details
createdAt: 2025-10-13T06:05:51.357Z
---

:::ApiMethodV2
```json
{
  "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": "-erRed0T7krY7DLqDWgme"
  },
  "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": []
    }
  ],
  "autoGeneratedAnchorSlug": "fetch-rate-plan-details",
  "legacyHash": "Wd211LDEEnfLn83hrCLaU"
}
```
:::



