AddRoom
Description
This method is used to create rooms for a given property. It returns the id of the created room.
Note
- Rooms can only be created for properties. Not for buildings
- A user can only create rooms for properties with a plant
Request
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
plantId | long | Mandatory | Not relevant | Id of the plant which connects the particular property and company. Here the property is the one to which the room is added |
roomTypeId | int | Mandatory | Not relevant | Type of room to be added. All room types are listed in the Room model. |
roomName | string | Mandatory | Should be less than or equal to 50 characters | Name of the room added |
applictionName | string | Mandatory | Should be less than or equal to 10 characters | The name of the integration partner |
Request - sample input
<AddRoom>
<MethodParameters>
<UserAuthentication>
<UserName>username</UserName>
<Password>password</Password>
<AnyAttr attr0="XmlAttributeArray" isNull="false">
<XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
</AnyAttr>
</UserAuthentication>
<plantId>6731</plantId>
<roomTypeId>2</roomTypeId>
<roomName>Bedroom</roomName>
<applicationName>test</applicationName>
</MethodParameters>
</AddRoom>
Response
Property | Type | Description |
---|---|---|
roomId | long | Id of the room added |
Request - sample output
<AddRoom>
<MethodParameters>
<Int64>40641</Int64>
</MethodParameters>
</AddRoom>
Exceptions
Error Code | Description |
---|---|
123 | An exception occurred while processing your request |
132 | plantId does not exist |
138 | applicationName length has exceeded the maximum character limit allowed (10) |
146 | The applicationName is not set |
152 | No property is connected to the given plantId |
157 | plantId is required |
167 | You are not authorized to use this method |
281 | Room already exists |
283 | roomName is not provided |
284 | You are not authorized to add a room to this property or your license does not authorize you to access this property |
286 | Invalid roomType |
296 | Do not insert a comma in the roomName |
301 | Room description length has exceeded the maximum character limit allowed (250) |