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

ParameterTypeMandatory/OptionalMaximum character length/limitDescription
inputAddDevicesForTenantInputMandatoryNot relevantThe 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

PropertyTypeDescription
DeviceCreateStatuses List<DeviceCreateStatusList 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 CodeDescription
110Input 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  

210The DeviceTypeId provided is invalid
216 

Maintenance description length has exceeded the maximum character limit allowed (70)  

304DeviceDescription length has exceeded the maximum character limit allowed (250)
305DeviceName length has exceeded the maximum character limit allowed (25)
306ManufactureName length has exceeded the maximum character limit allowed (25)
307ProductCode length has exceeded the maximum character limit allowed (25)
308GtinNumber length has exceeded the maximum character limit allowed (25)
312Invalid warranty duration range or the number of digits exceed 3
313Invalid life expectancy range or the number of digits exceed 3
314Invalid installation year
315Warranty duration cannot be greater than life expectancy
319Invalid product code type ID
334Device already exists
401Tenant does not exist
402

You are not authorized for this tenant

403One or more of the attached RoomIds are either invalid or does not belong to the tenant
405Invalid product year 
406Product year should be less than the installation year
411You need to have the Tenants Addon to perform this action
412The office space (tenant) no longer exists and this workspace has been deactivated.