---
title: Stop Sell Rate Plan
slug: stop-sell-rate-plan
docTags: 
createdAt: 2025-09-10T12:18:34.268Z
---

:::ApiMethodV2
```json
{
  "name": "Stop Sell Rate Plan",
  "method": "POST",
  "url": "https://wsb.bakuun.com/v2/push-ari/CPBXX/XXXX",
  "description": "Pushes stop-sell / open-sell status updates from Connectivity Partner to Bakuun.\n\nThis action communicates to Bakuun when a property or specific rate plan 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 rateId and date range.\n",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "R-8Ym-yOAjHTo8F4BBLrM",
        "language": "json",
        "code": "{\n    \"sharePost\": \"xxxx\",\n    \"sourceId\": \"xxx\",\n    \"propertyId\": \"xxx\",\n    \"action\": \"masterCondClosed\",\n    \"data\": [\n        {\n            \"startDateYmd\": \"YYYY-MM-DD\",\n            \"endDateYmd\": \"YYYY-MM-DD\",\n            \"roomId\": \"xxx\",\n            \"rateId\": \"xxx\",\n            \"restriction\": \"Master\",\n            \"status\": \"xx\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "fGGz76zoQlb_xSNL8MVZl",
        "language": "curl",
        "code": "curl --location 'https://wsb.bakuun.com/v2/push-ari/CPB46/881826' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json' \\\n--data '{\n  \"sharePost\": \"String\",\n  \"sourceId\": \"String\",\n  \"propertyId\": \"String\",\n  \"action\": \"String\",\n  \"data\": {\n    \"startDateYmd\": \"\",\n    \"endDateYmd\": \"\",\n    \"roomId\": \"\",\n    \"rateId\": \"\",\n    \"restriction\": \"\",\n    \"status\": \"\"\n  }\n}'",
        "customLabel": ""
      },
      {
        "id": "AbUoGHq4oXvRrOY8akNQ0",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://wsb.bakuun.com/v2/push-ari/CPB46/881826',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   },\n   body: JSON.stringify({\n      \"sharePost\": \"String\",\n      \"sourceId\": \"String\",\n      \"propertyId\": \"String\",\n      \"action\": \"String\",\n      \"data\": {\n         \"startDateYmd\": \"\",\n         \"endDateYmd\": \"\",\n         \"roomId\": \"\",\n         \"rateId\": \"\",\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": "TY0_y91W5TgA_6SM4rvWu",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"sharePost\": \"String\",\n   \"sourceId\": \"String\",\n   \"propertyId\": \"String\",\n   \"action\": \"String\",\n   \"data\": {\n      \"startDateYmd\": \"\",\n      \"endDateYmd\": \"\",\n      \"roomId\": \"\",\n      \"rateId\": \"\",\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://wsb.bakuun.com/v2/push-ari/CPB46/881826\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "fgFoBJ1P0AaPpDIrpc9Jf",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://wsb.bakuun.com/v2/push-ari/CPB46/881826\"\n\npayload = json.dumps({\n   \"sharePost\": \"String\",\n   \"sourceId\": \"String\",\n   \"propertyId\": \"String\",\n   \"action\": \"String\",\n   \"data\": {\n      \"startDateYmd\": \"\",\n      \"endDateYmd\": \"\",\n      \"roomId\": \"\",\n      \"rateId\": \"\",\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": "SIm_oh1irQF5B3SIvRetV",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://wsb.bakuun.com/v2/push-ari/CPB46/881826\")\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   \"sharePost\": \"String\",\n   \"sourceId\": \"String\",\n   \"propertyId\": \"String\",\n   \"action\": \"String\",\n   \"data\": {\n      \"startDateYmd\": \"\",\n      \"endDateYmd\": \"\",\n      \"roomId\": \"\",\n      \"rateId\": \"\",\n      \"restriction\": \"\",\n      \"status\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "R-8Ym-yOAjHTo8F4BBLrM"
  },
  "results": {
    "languages": [
      {
        "id": "HiFBZgQCHsln3H59TZ70S",
        "language": "200",
        "code": "{\n  \"success\": true\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n}\n",
        "customLabel": ""
      },
      {
        "id": "okdaypawwI1931fMXbHlr",
        "language": "410",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 410,\n      \"message\": \"Unauthorized user\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "8XQvQ1waSLILsYOT7_gB-",
        "language": "403",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 403,\n      \"message\": \"Invalid restriction status\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "0bV3-8nFjZFtp_F1b1cIP",
        "language": "404",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 404,\n      \"message\": \"Invalid start date\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "-cg9gsnDSSC2WN0WUfhof",
        "language": "405",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 405,\n      \"message\": \"Invalid end date\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "63Z6Z5LcCEASJg-Hx2tBZ",
        "language": "408",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 405,\n      \"message\": \"Invalid end date\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "6Dgk-0nHUmmdentt1DxUp",
        "language": "415",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 405,\n      \"message\": \"Invalid end date\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "mPoQouawwORgaW0X2RpnB",
        "language": "416",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 405,\n      \"message\": \"Invalid end date\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "bvdoNsbnTbs4b8JgmB17T",
        "language": "431",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 446,\n      \"message\": \"Invalid property mapping\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "CkV1soppRmj5sMTBhboWh",
        "language": "429",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 451,\n      \"message\": \"Invalid room mapping\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "ClGsoKI7jbQ16qU2szy1p",
        "language": "451",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 454,\n      \"message\": \"Invalid endpoint \"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "D1f-RU3h-TRNrc3zvMwf5",
        "language": "418",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 471,\n      \"message\": \"Source ID blocked\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "Jzt-aSNr7PVsZhGS81Jb0",
        "language": "414",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 453,\n      \"message\": \"Mapping is not active\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "JBrVJYhKg4cC-x2eD43NT",
        "language": "424",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 453,\n      \"message\": \"Mapping is not active\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "poHNwqMNQpFRNUoBbuD2B",
        "language": "421",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 454,\n      \"message\": \"Invalid endpoint\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "LraLOoXCGg6WjxiJB6cco",
        "language": "500",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 500,\n      \"message\": \"Internal server error\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "DrdN5lV6p-2a09ua1JEOO",
        "language": "502",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 502,\n      \"message\": \"Bad gateway\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "b4r1K_CB7VfyxM9yypFNA",
        "language": "504",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 504,\n      \"message\": \"Endpoint request timed-out\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "4gIJ8cKKWXseR_xDHXZ6O",
        "language": "503",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 503,\n      \"message\": \"Service unavailable\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "PisK2Exk2I9gDFYDourMC",
        "language": "409",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 442,\n      \"message\": \"Endpoint is not active\"\n    }\n  ]\n}",
        "customLabel": ""
      },
      {
        "id": "wK1SZh0LSPyAVCerX9dPa",
        "language": "413",
        "code": "{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 442,\n      \"message\": \"{\n  \"success\": false,\n  \"trackingId\": \"xxxxxxxxxxxxx\",\n  \"errors\": [\n    {\n      \"code\": 440,\n      \"message\": \"Endpoint is not active\"\n    }\n  ]\n}\"\n    }\n  ]\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "HiFBZgQCHsln3H59TZ70S"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "sharePost",
        "kind": "required",
        "type": "string",
        "description": "System-generated, human-readable secret API access key (unique per account).",
        "": "System-generated, human-readable secret API access key (unique per account)."
      },
      {
        "name": "sourceId",
        "kind": "required",
        "type": "string",
        "description": "Connectivity Partner identifier assigned by Bakuun (e.g. CPBXX)",
        "": "Connectivity Partner identifier assigned by Bakuun (e.g. CPBXX)"
      },
      {
        "name": "propertyId",
        "kind": "required",
        "type": "string",
        "description": "Unique property identifier (shared mapping between Bakuun and the Connectivity partner).",
        "": "Unique property identifier (shared mapping between Bakuun and the Connectivity partner)."
      },
      {
        "name": "action",
        "kind": "required",
        "type": "string",
        "description": "Always set as masterCondClosed",
        "": "Always set as masterCondClosed"
      },
      {
        "name": "data",
        "kind": "required",
        "type": "object",
        "description": "List of departure restriction records (each corresponding to a room/date range).\n",
        "": "List of departure restriction records (each corresponding to a room/date range).\n",
        "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": "roomId",
            "kind": "required",
            "type": "string",
            "description": "ID identifying the room type (as mapped between Bakuun and the Connectivity partner)."
          },
          {
            "name": "rateId",
            "kind": "required",
            "type": "string",
            "description": "ID identifying the rate type (as mapped between Bakuun and the Connectivity partner)."
          },
          {
            "name": "restriction",
            "kind": "required",
            "type": "string",
            "description": "Restriction type , for this action, always \"Master\""
          },
          {
            "name": "status",
            "kind": "required",
            "type": "string",
            "description": "Condition status flag:\n\"1\" = Closed (condition not sellable)\n\"0\" = Open (condition sellable)\n\"N/A\" = Erase Value "
          }
        ],
        "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": "roomId",
            "kind": "required",
            "type": "string",
            "description": "ID identifying the room type (as mapped between Bakuun and the Connectivity partner)."
          },
          {
            "name": "rateId",
            "kind": "required",
            "type": "string",
            "description": "ID identifying the rate type (as mapped between Bakuun and the Connectivity partner)."
          },
          {
            "name": "restriction",
            "kind": "required",
            "type": "string",
            "description": "Restriction type , for this action, always \"Master\""
          },
          {
            "name": "status",
            "kind": "required",
            "type": "string",
            "description": "Condition status flag:\n\"1\" = Closed (condition not sellable)\n\"0\" = Open (condition sellable)\n\"N/A\" = Erase Value "
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "success",
      "kind": "optional",
      "type": "boolean",
      "description": ""
    },
    {
      "name": "trackingId",
      "kind": "optional",
      "type": "string",
      "description": "",
      "children": []
    }
  ],
  "autoGeneratedAnchorSlug": "stop-sell-rate-plan",
  "legacyHash": "3-d-EQH6hysDBaNqBLSqv"
}
```
:::

