CreateDevices

Description

This method is used to create devices for a given plant. It returns the device status upon completion. If an error occurs during device creation, the associated error code is displayed in DeviceCreateStatus

Note

  • Devices can be created by property owners or professionals
  • Devices cannot be created in plants associated to buildings

Request

ParameterTypeMandatory/OptionalMaximum character length/limitDescription
pantIdlongMandatoryNot relevant

Id of the plant

devicesList<DeviceInputMandatory Not relevantNew devices installed 
applictionName string Mandatory Should be less than or equal to 10 characters

The name of the integration partner


Request - sample input 

<CreateDevices>
  <MethodParameters>
    <UserAuthentication>
      <UserName>username</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <plantId>6731</plantId>
    <devices attr0="DeviceInputArray" isNull="false">
      <DeviceInputArray0>
        <ProductName>Indesit 135/ B G S</ProductName>
        <DeviceTypeId>2</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>
        <RoomId>0</RoomId>
        <UserManual>
          <Url>http://kitchen.manualsonline.com/manuals/mfg/indesit/135_b_g_s.html</Url>
          <Data isNull="false" />
        </UserManual>
        <MaintenanceTask>
          <Description>Warranty</Description>
          <Month>12</Month>
          <IsRepeated>False</IsRepeated>
        </MaintenanceTask>
      </DeviceInputArray0>
    </devices>
    <applicationName>test</applicationName>
  </MethodParameters>
</CreateDevices>

Response

PropertyTypeDescription
DeviceCreateStatuses List<DeviceCreateStatusList of devices created 

Response - sample output 

<CreateDevices>
  <MethodParameters>
    <DeviceCreateStatusArray>
      <DeviceCreateStatusArray0>
        <DeviceId>970</DeviceId>
        <ProductName>Indesit 135/ B G S</ProductName>
        <ProductCodeType>0</ProductCodeType>
        <ProductCode isNull="false" />
        <InstallationYear>0</InstallationYear>
        <MaintenanceTaskCreateStatus>
          <TaskId>909</TaskId>
          <Description>Warranty</Description>
          <Month>12</Month>
          <IsRepeated>False</IsRepeated>
          <ErrorCode>0</ErrorCode>
        </MaintenanceTaskCreateStatus>
        <ErrorCode>0</ErrorCode>
      </DeviceCreateStatusArray0>
    </DeviceCreateStatusArray>
  </MethodParameters>
</CreateDevices>

Exceptions

Error CodeDescription
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

152 

No property is connected to the given plantId

167 

You are not authorized to use this method  

179 

One or more of the attached RoomIds does not belong to the given plant

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 

202 

This operation can only be done on plants connected to properties   

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)