AddRoomsForProject
Description
This method is used to create rooms for a given project. It returns the created room details as the output.
Note:
- Multiple rooms can be added at the same time.
- Any user that is connected to the given project can add rooms for that project.
- Creation of multiple rooms with the same name for a given project is not allowed.
Request
Parameter | Type | Mandatory/Optional | Description |
---|---|---|---|
input | AddRoomsForProjectInput | Mandatory | AddRoomsForProjectInput model |
AddRoomsForProjectInput
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
ProjectId | long | Mandatory/Optional* | Not relevant | The Id of the project. |
ProjectCode | string | Mandatory/Optional* | Not relevant | Project code of the project E.g. ABC0001-A1 |
Rooms | List<ProjectRoomInput> | Mandatory | Not relevant | List of project rooms to be added. roomName and roomTypeId are mandatory for this method |
Note
It is mandatory to provide either the projectCode or the projectId. Preference is given to the projectId, if both the projectCode and the projectId are provided.
Request - sample input
<AddRoomsForProject>
<MethodParameters>
<UserAuthentication>
<UserName>username</UserName>
<Password>password</Password>
<AnyAttr attr0="XmlAttributeArray" isNull="false">
<XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
</AnyAttr>
</UserAuthentication>
<input>
<ProjectId>1211</ProjectId>
<ProjectCode isNull="false" />
<Rooms attr0="ProjectRoomInputArray" isNull="false">
<ProjectRoomInputArray0>
<RoomTypeId>1</RoomTypeId>
<RoomName>Bedroom</RoomName>
<RoomDescription isNull="false" />
</ProjectRoomInputArray0>
</Rooms>
</input>
<applicationName>test</applicationName>
</MethodParameters>
</AddRoomsForProject>
Response
Type | Description |
---|---|
AddRoomsForProjectOutput | AddRoomsForProjectOutput model |
AddRoomsForProjectOutput
Parameter | Type | Description |
---|---|---|
Statuses | List<AddRoomForProjectStatus> | Project room creation statuses list |
Response - sample output
<AddRoomsForProject>
<MethodParameters>
<AddRoomsForProjectOutput>
<Statuses attr0="AddRoomForProjectStatusArray" isNull="false">
<AddRoomForProjectStatusArray0>
<Status>1</Status>
<Room>
<RoomId>325</RoomId>
<RoomTypeId>1</RoomTypeId>
<RoomName>Bedroom</RoomName>
<RoomDescription isNull="false" />
</Room>
<ErrorCode>0</ErrorCode>
</AddRoomForProjectStatusArray0>
</Statuses>
</AddRoomsForProjectOutput>
</MethodParameters>
</AddRoomsForProject>
Exceptions
Error Code | Description |
---|---|
110 | Input parameters contain null or invalid data |
123 | An exception occured while processing your request |
138 | applicationName length has exceeded the maximum character limit allowed (10) |
146 | The applicationName is not set |
167 | You are not authorized to use this method |
227 | The project does not exist or the company is not connected to the given project or your license does not authorize you to access this project |
252 | No input is provided for projectId or projectCode. Provide the input for at least one of these fields |
253 | Ambiguous inputs. Make sure the projectCode and projectId refer to the same project |
254 | Invalid projectCode |
273 | Project does not exist |
281 | Room already exists |
283 | roomName is not provided |
286 | Invalid roomType |
296 | Do not insert a comma in the roomName |
299 | The given project is closed. |
300 | roomName length has exceeded the maximum character limit allowed (50) |
301 | Room description length has exceeded the maximum character limit allowed (250) |