AddDevicesForTenant
Important
Professionals are required to have purchased a valid license consisting of the 'Tenant' feature in order to use this web method. Please contact per.christian@boligmappa.no or yohanw@99x.lk to get a license set up for your company.
This method is used to create devices for a given tenant. It returns the device status upon completion.
Note
- Use the GetTenants method to find the TenantId
- Devices can be created by property owners or professionals
Request
Request - input model
Parameter | Type | Mandatory/Optional | Maximum character length/limit | Description |
---|---|---|---|---|
input | AddDevicesForTenantInput | Mandatory | Not relevant | The CreateDevicesForTenantInput object |
applictionName | string | Mandatory | Should be less than or equal to 10 characters | The name of the integration partner |
Request - sample input
<AddDevicesForTenant>
<MethodParameters>
<UserAuthentication>
<UserName>username</UserName>
<Password>password</Password>
<AnyAttr attr0="XmlAttributeArray" isNull="false">
<XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
</AnyAttr>
</UserAuthentication>
<input>
<TenantId>204</TenantId>
<Devices attr0="TenantDeviceInputArray" isNull="false">
<TenantDeviceInputArray0>
<ProductName>Final Final</ProductName>
<DeviceTypeId>1</DeviceTypeId>
<ManufacturerName isNull="false" />
<ProductCodeType>0</ProductCodeType>
<ProductCode isNull="false" />
<ProductYear>0</ProductYear>
<GtinNumber isNull="false" />
<LifeExpectancy>0</LifeExpectancy>
<WarrantyDuration>0</WarrantyDuration>
<BuildingElementId>0</BuildingElementId>
<InstallationYear>0</InstallationYear>
<TenantRoomId>0</TenantRoomId>
<UserManual isNull="true" />
<DeviceDescription>teststst</DeviceDescription>
<MaintenanceTask isNull="true" />
</TenantDeviceInputArray0>
</Devices>
</input>
<applicationName>est</applicationName>
</MethodParameters>
</AddDevicesForTenant>
Response
Response - output model
Property | Type | Description |
---|---|---|
DeviceCreateStatuses | List<DeviceCreateStatus> | List of devices created |
Note:
If an error occurs during device creation, the associated error code is displayed in DeviceCreateStatus.
Response - sample output
<AddDevicesForTenant>
<MethodParameters>
<DeviceCreateStatusArray>
<DeviceCreateStatusArray0>
<DeviceId>48</DeviceId>
<ProductName>Final Final</ProductName>
<ProductCodeType>0</ProductCodeType>
<ProductCode isNull="false" />
<InstallationYear>0</InstallationYear>
<MaintenanceTaskCreateStatus isNull="true" />
<ErrorCode>0</ErrorCode>
</DeviceCreateStatusArray0>
</DeviceCreateStatusArray>
</MethodParameters>
</AddDevicesForTenant>
Exceptions
Error Code | Description |
---|---|
110 | Input parameters contain null or invalid data |
123 | An exception occurred while processing your request |
138 | applicationName length has exceeded the maximum character limit allowed (10) |
146 | The applicationName is not set |
186 | ProductName is not provided |
191 | No devices have been provided |
193 | Maintenance tasks must contain a description |
196 | Url or data must be provided to create a device manual |
204 | Entered month is not valid. The range is from 1-12 |
206 | Invalid building element |
210 | The DeviceTypeId provided is invalid |
216 | Maintenance description length has exceeded the maximum character limit allowed (70) |
304 | DeviceDescription length has exceeded the maximum character limit allowed (250) |
305 | DeviceName length has exceeded the maximum character limit allowed (25) |
306 | ManufactureName length has exceeded the maximum character limit allowed (25) |
307 | ProductCode length has exceeded the maximum character limit allowed (25) |
308 | GtinNumber length has exceeded the maximum character limit allowed (25) |
312 | Invalid warranty duration range or the number of digits exceed 3 |
313 | Invalid life expectancy range or the number of digits exceed 3 |
314 | Invalid installation year |
315 | Warranty duration cannot be greater than life expectancy |
319 | Invalid product code type ID |
334 | Device already exists |
401 | Tenant does not exist |
402 | You are not authorized for this tenant |
403 | One or more of the attached RoomIds are either invalid or does not belong to the tenant |
405 | Invalid product year |
406 | Product year should be less than the installation year |
411 | You need to have the Tenants Addon to perform this action |
412 | The office space (tenant) no longer exists and this workspace has been deactivated. |