Skip to main content
Omnitracs Knowledge Base

Set Trailer Geofence

setTrailerGeofence

The setTrailerGeofence web service will set or disable a Geofence for a specified trailer.  Geofences can only be set for owned trailers.  As a result of setting or disabling a geofence, the geofence configuration parameters will be sent to the trailer.

void setTrailerGeofence(AssetIdentifier trailer, Geofence geofence) throws WSException

  • trailer: An AssetIdentifier that contains the identifier of the trailer whose geofence will be set.
  • geofence: A Geofence object containing the geofence definition.
                     All elements of the Geofence object are required in this service.  Null values are not valid.

 

Authorization Requirements

 

The credentials supplied with this method call (as specified in the accompanying WS-Security header) must be authorized to the following application(s) and their associated role-based permissions.

Required Application Licenses
- Remote Integration

Required User Permissions
- Can use Trailer Tracks
- Can view geofence details

Customer integrators are authorized to their own company's data only.

 

Exceptions

 

002 Required field not specified.
003 Company not authorized for integration.
004 User not authorized.
005 Trailer SCAC is required.
006 Trailer SCAC is invalid.
007 Trailer ID is required.
008 Trailer ID is invalid.
009 Editing not allowed for foreign trailer.
010 Geofence description is invalid.
011 Geofence description contains an invalid character.
012 Center preference not specified.
013 Center preference must be '1' or '2'.
014 Geofence latitude is invalid.
015 Geofence longitude is invalid.
016 Latitude and longitude must be blank for a self-centered geofence.
017 Center position is formatted incorrectly.
018 North/south length not specified.
019 North/south length not within valid range.
020 East/west length not specified.
021 East/west length not within valid range.
022 Status flag not specified.
023 Status flag must be 'Y' or 'N'.
024 Ongoing flag not specified.
025 Ongoing flag must be 'Y' or 'N'.
026 Geofence cannot be Ongoing and Disabled.
027 Start date is invalid.
028 Start date must be greater than current date/time.
029 Start date and stop date cannot be equal.
030 Stop date must be greater than current date.
031 Start date must be less than stop date.
032 Stop date is invalid.
033 If geofence is Disabled, Start date and Stop dates cannot be changed.
034 If geofence is Ongoing, Stop Date cannot be changed.
035 Check interval is formatted incorrectly.
036 Check interval value is invalid.
037 Entry event action invalid.
038 Exit event action invalid.
039 Device type is not geofence capable.

 

Sample setTrailerGeofence Request

 

Only the SOAP body is shown. To see a sample SOAP Envelope and Header, click here.

<soapenv:Body>

     <setTrailerGeofence>

         <trailer xmlns="">

            <id>ALIVE595</id>

            <scac>LABU</scac>

         </trailer>

         <geofence xmlns="">

            <desc>DHTEST geofence</desc>

            <centerPref>1</centerPref>

            <centerLat>0</centerLat>

            <centerLon>0</centerLon>

            <nsLength>1.0</nsLength>

            <ewLength>1.0</ewLength>

            <startDate>2006-03-31T08:00:00Z</startDate>

            <stopDate />

            <active>Y</active>

            <ongoing>Y</ongoing>

            <checkInt>+00000001500</checkInt>

            <entryAction>000</entryAction>

            <exitAction>000</exitAction>

         </geofence>

      </setTrailerGeofence>

</soapenv:Body>

 

Sample setTrailerGeofence Response

 

An empty response conveys success. If there was an error, an exception would have been thrown.

<soapenv:Body>

      <setTrailerGeofenceResponse/>

</soapenv:Body>

  • Was this article helpful?