---
title: Stop Sales Restriction Room Level
slug: stop-sales-restriction-room-level
createdAt: 2025-09-10T12:17:20.793Z
---

:::ApiMethodV2
```json
{
  "name": "Stop Sales Restriction Room Level",
  "method": "POST",
  "url": "https://aggregate.bakuun.com/api/updateroomstopsellsrq/MPBXX/invupdate",
  "description": "Pushes master stop-sell / open-sell status updates from Bakuun to the partner system.\n\nThis action communicates to the partner when a property or specific room type becomes closed (stop-sell) or open (sell-allowed) for given date ranges.\nIt ensures both systems maintain synchronized availability and restrictions.\n\nA \"Master\" restriction applies at the room level, regardless of rate plan.\n\nIf multiple records are sent, each represents a unique combination of roomCode and date range.\n\nPartners must process both \"1\" (close) and \"0\" (open) updates immediately to ensure accurate distribution.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "iBKpYJYZSJXvngOIIkoHV",
        "language": "json",
        "code": "{\n   \"username\": \"string\",\n   \"password\": \"string\",\n   \"hotelId\": \"string\",\n   \"action\": \"MasterClosedRQ\",\n   \"data\": [\n      {\n         \"startDateYmd\": \"YYYY-MM-DD\",\n         \"endDateYmd\": \"YYYY-MM-DD\",\n          \"roomCode\": \"sting\",\n          \"restriction\": \"Master\",\n          \"status\": \"0\"\n       },\n        {\n         \"startDateYmd\": \"YYYY-MM-DD\",\n         \"endDateYmd\": \"YYYY-MM-DD\",\n          \"roomCode\": \"string\",\n          \"restriction\": \"Master\",\n          \"status\": \"1\"\n       }\n   ]\n }",
        "customLabel": ""
      },
      {
        "id": "e6q9zedjq4367AOLuXUkH",
        "language": "curl",
        "code": "curl --location 'https://aggregate.bakuun.com/api/updateroomstopsellsrq/MPBXX/invupdate' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"username\": \"String\",\n  \"password\": \"String\",\n  \"hotelId\": \"String\",\n  \"action\": \"String\",\n  \"data\": {\n    \"startDateYmd\": \"\",\n    \"endDateYmd\": \"\",\n    \"roomCode\": \"\",\n    \"restriction\": \"\",\n    \"status\": \"\"\n  }\n}'",
        "customLabel": ""
      },
      {
        "id": "_o0edO-cjH-lhfTfAYbP_",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://aggregate.bakuun.com/api/updateroomstopsellsrq/MPBXX/invupdate',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"username\": \"String\",\n      \"password\": \"String\",\n      \"hotelId\": \"String\",\n      \"action\": \"String\",\n      \"data\": {\n         \"startDateYmd\": \"\",\n         \"endDateYmd\": \"\",\n         \"roomCode\": \"\",\n         \"restriction\": \"\",\n         \"status\": \"\"\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": "_MmFm8URUuRVDX7h8BDGf",
        "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   \"hotelId\": \"String\",\n   \"action\": \"String\",\n   \"data\": {\n      \"startDateYmd\": \"\",\n      \"endDateYmd\": \"\",\n      \"roomCode\": \"\",\n      \"restriction\": \"\",\n      \"status\": \"\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://aggregate.bakuun.com/api/updateroomstopsellsrq/MPBXX/invupdate\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "ytuZHr1I4plUBMCV-7NWE",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://aggregate.bakuun.com/api/updateroomstopsellsrq/MPBXX/invupdate\"\n\npayload = json.dumps({\n   \"username\": \"String\",\n   \"password\": \"String\",\n   \"hotelId\": \"String\",\n   \"action\": \"String\",\n   \"data\": {\n      \"startDateYmd\": \"\",\n      \"endDateYmd\": \"\",\n      \"roomCode\": \"\",\n      \"restriction\": \"\",\n      \"status\": \"\"\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": "tTU7BQ4mQRoRbs4AAIA_h",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://aggregate.bakuun.com/api/updateroomstopsellsrq/MPBXX/invupdate\")\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   \"hotelId\": \"String\",\n   \"action\": \"String\",\n   \"data\": {\n      \"startDateYmd\": \"\",\n      \"endDateYmd\": \"\",\n      \"roomCode\": \"\",\n      \"restriction\": \"\",\n      \"status\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "iBKpYJYZSJXvngOIIkoHV"
  },
  "results": {
    "languages": [
      {
        "id": "RquppNRlZjCPOoypIlGaQ",
        "language": "200",
        "code": "{\n  \"success\": true\n}\n",
        "customLabel": ""
      },
      {
        "id": "qvHdFBqSVgRw131z22ysN",
        "language": "500",
        "code": "{\n  \"success\": false, \n  \"errors\": [\n    {\n      \"code\": 500,\n      \"message\": \"Internal server error\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "J4mxUvJ4AO7nrB9yYvJhb",
        "language": "502",
        "code": "{\n  \"success\": false,  \n  \"errors\": [\n    {\n      \"code\": 502,\n      \"message\": \"Bad gateway\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "cdhGq4MAExO1TlVZpPoA-",
        "language": "503",
        "code": "{\n  \"success\": false, \n  \"errors\": [\n    {\n      \"code\": 503,\n      \"message\": \"Service unavailable\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "Men6SxhzchlyhkHPQdLEm",
        "language": "504",
        "code": "{\n  \"success\": false,\n  \"errors\": [\n    {\n      \"code\": 504,\n      \"message\": \"Endpoint request timed-out\"\n    }\n  ]\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Men6SxhzchlyhkHPQdLEm"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "username",
        "kind": "required",
        "type": "string",
        "description": "API username provided by the partner to authenticate incoming pushes from Bakuun.",
        "": "API username provided by the partner to authenticate incoming pushes 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": "hotelId",
        "kind": "required",
        "type": "string",
        "description": "Unique property identifier (shared mapping between Bakuun and the partner).",
        "": "Unique property identifier (shared mapping between Bakuun and the partner)."
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Always set to MasterClosedRQ",
        "": "Always set to MasterClosedRQ"
      },
      {
        "name": "data",
        "kind": "required",
        "type": "object",
        "description": "List of restriction updates (stop-sell or reopen events).",
        "": "List of restriction updates (stop-sell or reopen events).",
        "children": [
          {
            "name": "startDateYmd",
            "kind": "required",
            "type": "string",
            "description": "Start date of the update range, formatted as YYYY-MM-DD."
          },
          {
            "name": "endDateYmd",
            "kind": "required",
            "type": "string",
            "description": "End date of the update range, formatted as YYYY-MM-DD."
          },
          {
            "name": "roomCode",
            "kind": "required",
            "type": "string",
            "description": "Code identifying the room (as per the room mapping)."
          },
          {
            "name": "restriction",
            "kind": "required",
            "type": "string",
            "description": "Restriction type. For this action, always \"Master\"."
          },
          {
            "name": "status",
            "kind": "required",
            "type": "string",
            "description": "Indicates closure or opening status:\n\"1\" = Closed / Stop-Sell\n\"0\" = Open / Sell-Allowed \n"
          }
        ],
        "schema": [
          {
            "name": "startDateYmd",
            "kind": "required",
            "type": "string",
            "description": "Start date of the update range, formatted as YYYY-MM-DD."
          },
          {
            "name": "endDateYmd",
            "kind": "required",
            "type": "string",
            "description": "End date of the update range, formatted as YYYY-MM-DD."
          },
          {
            "name": "roomCode",
            "kind": "required",
            "type": "string",
            "description": "Code identifying the room (as per the room mapping)."
          },
          {
            "name": "restriction",
            "kind": "required",
            "type": "string",
            "description": "Restriction type. For this action, always \"Master\"."
          },
          {
            "name": "status",
            "kind": "required",
            "type": "string",
            "description": "Indicates closure or opening status:\n\"1\" = Closed / Stop-Sell\n\"0\" = Open / Sell-Allowed \n"
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "success",
      "kind": "optional",
      "type": "boolean",
      "description": ""
    }
  ],
  "autoGeneratedAnchorSlug": "stop-sales-restriction-room-level",
  "legacyHash": "tg6E7n_1lcAVjH6i-fYi-"
}
```
:::

