---
title: Minimum Length of Stay Arrival at Rate Plan Level (cloned)
slug: minimum-length-of-stay-arrival-at-rate-plan-level-cloned
docTags: 
createdAt: 2025-09-10T11:52:05.061Z
---

:::ApiMethodV2
```json
{
  "name": "Length of Stay Arrival Rate Plan Level",
  "method": "POST",
  "url": "https://aggregate.bakuun.com/api/updateRates/MPBXX/invupdate",
  "description": "Pushes Length of Stay (LOS) on arrival conditions from Bakuun to the partner system.\n\nThis action communicates the minimum stay requirement for the arrival date of a booking.\nIt ensures that the partner system applies the same restrictions as configured in Bakuun when hotels require guests arriving on specific dates to stay a minimum number of nights.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "F6DFMY8yp37HbzLk13k1v",
        "language": "json",
        "code": "{\n    \"username\": \"string\",\n    \"password\": \"string\",\n    \"hotelId\": \"string\",\n    \"action\": \"SetArrivalLosCondRQ\",\n    \"data\": [\n        {\n            \"startDateYmd\": \"YYYY-MM-DD\",\n            \"endDateYmd\": \"YYYY-MM-DD\",\n            \"roomCode\": \"string\",\n            \"condCode\": \"string\",\n            \"minMaxMessageType\": \"MinLOS Arrival\",\n            \"Time\": \"1\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "nEWu2CSgPMSvBZFZKmVjS",
        "language": "curl",
        "code": "curl --location 'https://aggregate.bakuun.com/api/updateRates/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    \"condCode\": \"\",\n    \"minMaxMessageType\": \"\",\n    \"Time\": \"\"\n  }\n}'",
        "customLabel": ""
      },
      {
        "id": "Z2iO11F--Z5D_P2Oeyko0",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://aggregate.bakuun.com/api/updateRates/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         \"condCode\": \"\",\n         \"minMaxMessageType\": \"\",\n         \"Time\": \"\"\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": "REsyE6geYn_u1yQtocF3f",
        "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      \"condCode\": \"\",\n      \"minMaxMessageType\": \"\",\n      \"Time\": \"\"\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/updateRates/MPBXX/invupdate\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "UX-GGlvaj79Iv0nR3Ajfz",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://aggregate.bakuun.com/api/updateRates/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      \"condCode\": \"\",\n      \"minMaxMessageType\": \"\",\n      \"Time\": \"\"\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": "MKDJ2UzX-PhZH82Axkliy",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://aggregate.bakuun.com/api/updateRates/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      \"condCode\": \"\",\n      \"minMaxMessageType\": \"\",\n      \"Time\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "F6DFMY8yp37HbzLk13k1v"
  },
  "results": {
    "languages": [
      {
        "id": "Nk06oAPM-SJCHzGv2ZylY",
        "language": "200",
        "code": "{\n    \"success\": true,\n}",
        "customLabel": ""
      },
      {
        "id": "zcwpkCoaI2Gcs_LMjv5yy",
        "language": "500",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 500,\n            \"message\": \"Internal server error\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "em_Kpv2oZfn8MCO7_f1SV",
        "language": "502",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 502,\n            \"message\": \"Bad gateway\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "zzzE2J6Y7YZDula_qc4OD",
        "language": "503",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 503,\n            \"message\": \"Service unavailable\"\n        }\n    ]\n}",
        "customLabel": ""
      },
      {
        "id": "B4wRfM8K9w0KuyctvGtOu",
        "language": "504",
        "code": "{\n    \"success\": false,\n    \"errors\": [\n        {\n            \"code\": 504,\n            \"message\": \"Endpoint request timed-out\"\n        }\n    ]\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "zcwpkCoaI2Gcs_LMjv5yy"
  },
  "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 SetArrivalLosCondRQ.",
        "": "Always set to SetArrivalLosCondRQ."
      },
      {
        "name": "data",
        "kind": "required",
        "type": "object",
        "description": "List of arrival LOS condition records for one or more rooms and date ranges.",
        "": "List of arrival LOS condition records for one or more rooms and date ranges.",
        "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 code as per mapping"
          },
          {
            "name": "condCode",
            "kind": "required",
            "type": "string",
            "description": "Code identifying the rate plan code as per mapping."
          },
          {
            "name": "minMaxMessageType",
            "kind": "required",
            "type": "string",
            "description": "Always MinLOS Arrival"
          },
          {
            "name": "Time",
            "kind": "required",
            "type": "string",
            "description": "Value of minimum stay arrival, accepted value between 1 to 999. N/A to clear the 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": "roomCode",
            "kind": "required",
            "type": "string",
            "description": "Code identifying the room code as per mapping"
          },
          {
            "name": "condCode",
            "kind": "required",
            "type": "string",
            "description": "Code identifying the rate plan code as per mapping."
          },
          {
            "name": "minMaxMessageType",
            "kind": "required",
            "type": "string",
            "description": "Always MinLOS Arrival"
          },
          {
            "name": "Time",
            "kind": "required",
            "type": "string",
            "description": "Value of minimum stay arrival, accepted value between 1 to 999. N/A to clear the value."
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "success",
      "kind": "optional",
      "type": "boolean",
      "description": ""
    }
  ],
  "autoGeneratedAnchorSlug": "length-of-stay-arrival-rate-plan-level",
  "legacyHash": "vzhSUehopTtLCuG25WWeH"
}
```
:::

