CreateMaintenanceTasks

Description

This method is used to create a set of maintenance tasks. It returns the status of the maintenance tasks created.

Note

Maintenance tasks cannot be created in plants associated to buildings.

Request

ParameterTypeMandatory/OptionalMaximum character length/limitDescription
plantIdlongMandatoryNot relevant

Id of the plant to which the job should be associated

maintenanceTasksList<TaskInputMandatory Not relevantList of maintenance tasks 
applicationName string Mandatory Should be less than or equal to 10 characters

The name of the integration partner

 

Request - sample input

<CreateMaintenanceTasks>
  <MethodParameters>
    <UserAuthentication>
      <UserName>username</UserName>
      <Password>password</Password>
      <AnyAttr attr0="XmlAttributeArray" isNull="false">
        <XmlAttributeArray0>System.Xml.XmlAttribute</XmlAttributeArray0>
      </AnyAttr>
    </UserAuthentication>
    <plantId>6731</plantId>
    <maintenanceTasks attr0="TaskInputArray" isNull="false">
      <TaskInputArray0>
        <MaintenanceTask>
          <Description>Service AC</Description>
          <Month>12</Month>
          <IsRepeated>False</IsRepeated>
        </MaintenanceTask>
        <DeviceId>970</DeviceId>
        <RoomIds attr0="Int64Array" isNull="false">
          <Int64Array0>0</Int64Array0>
        </RoomIds>
      </TaskInputArray0>
    </maintenanceTasks>
    <applicationName>test</applicationName>
  </MethodParameters>
</CreateMaintenanceTasks>

Response

TypeDescription
List<MaintenanceTaskCreateStatus>Status of the maintenance tasks created

Note

If an error occurrs when creating a task, MaintenanceTaskCreateStatus for that task displays the associated error code.

Response - sample output

<CreateMaintenanceTasks>
  <MethodParameters>
    <MaintenanceTaskCreateStatusArray>
      <MaintenanceTaskCreateStatusArray0>
        <TaskId>910</TaskId>
        <Description>Service AC</Description>
        <Month>12</Month>
        <IsRepeated>False</IsRepeated>
        <ErrorCode>0</ErrorCode>
      </MaintenanceTaskCreateStatusArray0>
    </MaintenanceTaskCreateStatusArray>
  </MethodParameters>
</CreateMaintenanceTasks>

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   

193 

Maintenance tasks must contain a description    

194 

DeviceId does not exist or does not belong to the given plant

195 

Atleast one maintenance task is required

202 

This operation can only be done on plants connected to properties 

204 

Entered month is invalid. The range is from 1-12  

205 

Given device's RoomId conflicts with the RoomIds provided

207 

RoomId does not exist or belong to the given plant   

216

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