POST apioauth/installation/deviceassociation

Associate a service to a device into the unallocated group.

Request Information

URI Parameters

None.

Body Parameters

DeviceAssociationModel

OAuthDeviceAssociationModel
NameDescriptionTypeAdditional information
UnAllocatedGroupID

The group id where the unallocated units are saved

unsigned integer

None.

AllocatedGroupID

The group id where the allocated units are saved

unsigned integer

None.

VehicleList

A list of vehicles to be associated to devices

Collection of DeviceAssociationVehicleModel

None.

Request Formats

application/json, text/json

Sample:
{
  "UnAllocatedGroupID": 1,
  "AllocatedGroupID": 2,
  "VehicleList": [
    {
      "IMEI": "sample string 1",
      "VehicleRegistration": "sample string 2",
      "ServiceType": 0,
      "ServiceRegion": 0
    },
    {
      "IMEI": "sample string 1",
      "VehicleRegistration": "sample string 2",
      "ServiceType": 0,
      "ServiceRegion": 0
    }
  ]
}

application/xml, text/xml

Sample:
<OAuthDeviceAssociationModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <UnAllocatedGroupID>1</UnAllocatedGroupID>
  <AllocatedGroupID>2</AllocatedGroupID>
  <VehicleList>
    <DeviceAssociationVehicleModel>
      <IMEI>sample string 1</IMEI>
      <VehicleRegistration>sample string 2</VehicleRegistration>
      <ServiceType>v0Default</ServiceType>
      <ServiceRegion>Europe</ServiceRegion>
    </DeviceAssociationVehicleModel>
    <DeviceAssociationVehicleModel>
      <IMEI>sample string 1</IMEI>
      <VehicleRegistration>sample string 2</VehicleRegistration>
      <ServiceType>v0Default</ServiceType>
      <ServiceRegion>Europe</ServiceRegion>
    </DeviceAssociationVehicleModel>
  </VehicleList>
</OAuthDeviceAssociationModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

AssociationResponseModel

AssociationResponseModel
NameDescriptionTypeAdditional information
RequestStatus

Status indicating if a web service call was successful

boolean

None.

RequestMessage

Any extra information indicating why a call was not successful

string

None.

IMEILookup

A list of imeis to service id

Collection of IMEIServiceIDLookup

None.

Response Formats

application/json, text/json

Sample:
{
  "RequestStatus": true,
  "RequestMessage": "sample string 2",
  "IMEILookup": [
    {
      "IMEI": "sample string 1",
      "ServiceID": 2
    },
    {
      "IMEI": "sample string 1",
      "ServiceID": 2
    }
  ]
}

application/xml, text/xml

Sample:
<AssociationResponseModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <RequestStatus>true</RequestStatus>
  <RequestMessage>sample string 2</RequestMessage>
  <IMEILookup>
    <IMEIServiceIDLookup>
      <IMEI>sample string 1</IMEI>
      <ServiceID>2</ServiceID>
    </IMEIServiceIDLookup>
    <IMEIServiceIDLookup>
      <IMEI>sample string 1</IMEI>
      <ServiceID>2</ServiceID>
    </IMEIServiceIDLookup>
  </IMEILookup>
</AssociationResponseModel>