---
title: "UpdateRoom"
method: POST
path: "/UpdateRoom"
tags: ["Content"]
---

# UpdateRoom

`POST /UpdateRoom`

## Request

- Base URL: `https://api.your-ota.com/cloudbeds`
- URL: `https://api.your-ota.com/cloudbeds/UpdateRoom`
- Auth: API key in query parameter `shared_secret`

Create or update room after it has been changed on the Cloudbeds channel manager.

## Request body

- object
  - `mya_property_id` integer, required: Property ID on the Cloudbeds channel manager
  - `ota_property_id` string, required: Username, login or property ID on the OTA
  - `ota_property_password` string, required: Password for property on your OTA. In case the OTA does not use passwords this will be an empty string.
  - `ota_property_sub_id` string, required: Property ID on the OTA, if OTA supports multiple properties under one `ota_property_id`/`ota_property_password` combination. See `GetSubProperties` for more details.
  - `guid` string, required: Request reference ID, used for debugging and support requests.
  - `shared_secret` string, required: Authentication between the OTA and the channel. Identical for all requests. Not to be shared with customers.
  - `ota_cid` string, required: OTA ID as given by Cloudbeds
  - `room` object, required
    - `mya_room_id` integer, required: Room ID on the Cloudbeds channel manager.
    - `ota_room_id` string: Room ID on the OTA.
    - `units` integer, required: How many rooms of this type there are.
    - `beds` integer, required: Number of people that can stay in this room.
    - `max_adults` integer: Maximum number of adults that can stay in this room.
    - `max_children` integer: Maximum number of children that can stay in this room.
    - `dormitory` boolean, required: If `true` it's a dormitory (shared room), `false` for private rooms.
    - `gender` 'MALE' | 'FEMALE' | 'MIXED': Gender. Required for dormitory
    - `label` string, required: Short string that describes the room for displaying purposes.
    - `description` string, nullable, required: Longer description of the room which describes a room to a potential guest.
    - `images` object[], required: List of room-level images.
      - `url` string, required: Publicly accessible URL to the full resolution image
      - `description` string, nullable, required: Description of the image to show on a channel (max. 2000 characters)
      - `sort_order` integer, required: Number indicating the displayed sort order. Lower numbers means further left/top. Defaults to 0.
    - `rateplans` object[]: List of rate plans configured for the room
      - `mya_rate_id` integer, required: Rate plan ID on the Cloudbeds channel manager. Every room has a default rate plan, and the ID (even across different rooms) is always `0`. Any non-default rate plans have a higher ID.
      - `label_public` string, nullable, required: Name or short summary of the rate plan, suitable for display to guests. The label is chosen by the property.
      - `label_private` string, nullable, required: Name or short summary of the rate plan, aimed to be shown just to the property. This could for example be a code like `NF` for "Non-refundable". The label is chosen by the property.
      - `meal_codes` integer[]: Combination (list) of meal codes that are available for this rate plan. `1` for All-Inclusive, `19` for Breakfast, `21` for Lunch, `22` for Dinner
      - `refundable` boolean: If present specifies if rate plan is refundable
      - `refundable_until_days` integer: Minimal number of days before check-in required for a rate plan to be refundable
  - `verb` 'UpdateRoom', required

## Response `200`

UpdateRoom

- union
  - object
    - `success` true, required
    - `room_mappings` object[]
      - `mya_rate_id` integer: Rate plan ID on the Cloudbeds channel manager
      - `ota_room_id` string, required: OTA room ID
      - `ota_rate_id` string: OTA rate plan ID
  - ResponseError
    - `errors` object[], required: Array of error objects.
      - `id` integer, required: Error code. Check the "Error Codes" section of the specification for valid codes.
      - `msg` string: Optional error string to give more details about the error. Myallocator localises errors into different langauges, so this field is generally ignored and only useful for debugging.
    - `success` false, required

---

[API](https://skmtc.dev/cloudbeds/apis/cloudbeds-ota-build-to-us-api.md) - [All operations](https://skmtc.dev/cloudbeds/apis/cloudbeds-ota-build-to-us-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudbeds/apis/cloudbeds-ota-build-to-us-api/revisions/baef9c11c34d?raw)
