AddDevicesForProject

Description

This method is used to create devices for a given project. The device details that were created are returned as the output.

Notes: 

  • Multiple devices can be added at the same time.
  • Any company that is connected to a given project can add devices to that project.
  • The functionality for the DeviceCode has not been implemented yet.

Request

ParameterTypeMandatory/OptionalMaximum character length/limitDescription
inputAddDevicesForProjectInputMandatoryNot relevantAddDevicesForProjectInput model
applicationNameStringMandatoryShould be less than or equal to 10 charactersThe name of the integration partner


AddDevicesForProjectInput

ParameterTypeMandatory/OptionalDescription 
ProjectIdlongMandatory/Optional*The Id of the project
ProjectCodestringMandatory/Optional*Project code of the project E.g. ABC0001-A1 
DeviceCodestringOptional

The DeviceCode that is given as input to retrieve data from NRF/NOBB/EFO repositories to create the device

DevicesList<ProjectDeviceInput>MandatoryList of project devices to be added. DeviceName and DeviceTypeId 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

<AddDevicesForProject>
  <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" />
      <DeviceCode isNull="false" />
      <Devices attr0="ProjectDeviceInputArray" isNull="false">
        <ProjectDeviceInputArray0>
          <DeviceName>Whirlpool washing machine</DeviceName>
          <DeviceDescription isNull="false" />
          <DeviceTypeId>1</DeviceTypeId>
          <ManufactureName isNull="false" />
          <ProductCodeType>0</ProductCodeType>
          <ProductCode isNull="false" />
          <GtinNumber isNull="false" />
          <LifeExpectancy>0</LifeExpectancy>
          <WarrantyDuration>0</WarrantyDuration>
          <BuildingElementId>0</BuildingElementId>
          <InstallationYear>0</InstallationYear>
          <RoomId>0</RoomId>
          <UserManual>
            <Url>https://www.manualslib.com/manual/776758/Whirlpool-Washing-Machine.html</Url>
            <Data isNull="false" />
          </UserManual>
        </ProjectDeviceInputArray0>
      </Devices>
    </input>
    <applicationName>test</applicationName>
  </MethodParameters>
</AddDevicesForProject>

Response

TypeDescription
AddDevicesForProjectOutputAddDevicesForProjectOutput model


AddDevicesForProjectOutput

ParameterTypeDescription
StatusesList<AddDeviceForProjectStatus>Project device creation statuses list

Response - sample output

<AddDevicesForProject>
  <MethodParameters>
    <AddDevicesForProjectOutput>
      <Statuses attr0="AddDeviceForProjectStatusArray" isNull="false">
        <AddDeviceForProjectStatusArray0>
          <Status>0</Status>
          <Device>
            <Id>0</Id>
            <ProjectId>1211</ProjectId>
            <DeviceName>Whirlpool washing machine</DeviceName>
            <DeviceDescription isNull="false" />
            <ManufactureName isNull="false" />
            <ProductCodeType>0</ProductCodeType>
            <ProductCode isNull="false" />
            <GtinNumber isNull="false" />
            <LifeExpectancy>0</LifeExpectancy>
            <WarrantyDuration>0</WarrantyDuration>
            <BuildingElementId>0</BuildingElementId>
            <DeviceTypeId>1</DeviceTypeId>
            <InstallationYear>0</InstallationYear>
            <RoomId>0</RoomId>
            <UserManual>https://www.manualslib.com/manual/776758/Whirlpool-Washing-Machine.html</UserManual>
          </Device>
          <ErrorCode>320</ErrorCode>
        </AddDeviceForProjectStatusArray0>
      </Statuses>
    </AddDevicesForProjectOutput>
  </MethodParameters>
</AddDevicesForProject>

Exceptions

Error CodeDescription
110Input parameters contain null or invalid data
123 

An exception occured while processing your request  

136Provided Url is invalid
138 

applicationName length has exceeded the maximum character limit allowed (10)

144One or more of the input document models does not contain adequate information (EfoIds, Url or Base64 encoded data)
146 

The applicationName is not set

167You are not authorized to use this method
191 

No devices have been provided 

196 

Url or data must be provided to create a device manual 

206 

Invalid building element  

210The DeviceTypeId provided is not valid
227The 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
252No input is provided for projectId or projectCode. Provide the input for at least one of these fields
253Ambiguous inputs. Make sure the projectCode and projectId refer to the same project 
273Project does not exist
299The given project is closed
302Given RoomId is not attached to the project
303DeviceName is not provided
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 WarrentyDuration range or the number of digits exceed 3
313Invalid LifeExpectancy range or the number of digits exceed 3
314Invalid InstallationYear
315WarrentyDuration cannot be greater than LifeExpectancy
319Invalid ProductCodeType Id
320ProjectDevice already exists