Back to index

CreateLocationWatchlistForVehicle_v1

This method allows you to create a location watchlist for a specified vehicle in the database. Multiple watches of both GeocodeWatch (lat/long + radius) and LocationWatch (LocationID) type are accepted.

IMPORTANT: This will delete all existing watches for the given 'vehicleID' before creating the new ones. Therefore if you want to maintain existing watches you should include those in the request again.

Parameters:

[in] usn The user-name that you need to use to authenticate on this interface.
[in] pwd The password that you need to use to authenticate on this interface.
[in] options String parameter. This is currently unused and reserved for future versions of the API. Pass in an empty string.
[in] vehicleID Int parameter. The Vehicle ID of the vehicle the location watchlist is for. This field is mandatory.
[in] driverID Int parameter. The driverID of the driver the location watchlist is for. Optional.
[in] geoCodeWatches Array parameter. An array of GeocodeWatch items. Each GeocodeWatch must have values for WatchLocationIdentifier, Latitude, Longitude, RadiusInKm, and WatchType ('Entered', 'Stopped', or 'Exited').
[in] locationWatches Array parameter. An array of LocationWatch items. Each LocationWatch must have values for WatchLocationIdentifier, LocationID and WatchType ('Entered', 'Stopped', or 'Exited').
[out] error If an error happpens this string contains the error message. In case an error has happened (this variable contains a valid non-empty string) then the return value will not contain any usable data, do not try to parse it as an xml.
return value If the errorMsg variable is null or empty then the returned string contains the requested data in xml format. The xml has the following structure:
<?xml version="1.0" encoding="utf-16"?>
<root>
<vehicleID>111</vehicleID>
<driverID>222</driverID>
<geocodeWatches>
  <geocodeWatch watchID="1234" watchLocationIdentifier="MCS-12345" error="" />
</geocodeWatches>
<locationWatches>
  <locationWatch watchID="1444" watchLocationIdentifier="MCS-54321" error="" />
</locationWatches>
</root>
Please note this.

Remarks

Minimum R-COM Database version

0.2982

Error messages

Please see this page.