Update Travel Status SOAP API
The sp:EmpChangeTravelStatus2Request
API method can be used to update the travel status of an operative.
Description
An operative can have a travel status with values:
| The vehicle has its engine running and is in a different location between move events. |
| The vehicle has its engine running but it isn’t moving, i.e. it’s at the same location for two or more events. |
| The vehicle’s engine isn’t running, and it’s location isn’t changing. Additional information in the form of a location type - the type of location that the vehicle is stopped near (e.g. a parts depot) - may also be available. |
Cancelled | Returns Job Cancelled status |
| The vehicle was expected to send a new event because the sample time has elapsed since the previous move (or stationary) event but one hasn’t been received. (This could be because the vehicle is ‘out of range’.) |
The travel status is set by calling the sp:EmpChangeTravelStatus2Request
API method.
When the travel status is Stopped
, additional information in the form of a location type - the type of location that the vehicle is stopped near (GeoFenceLocType
) - can be supplied:
By default, ServiceGPS is configured to send one of the following two character strings for the location type (GeoFenceLocType
), but they are configurable:
“HO” Home
“VD” Vehicle Depot
“PL” Parts Location
“TO” Team Office
“CO” Company Office
“CS” Customer Site
“NG” No Go
A location name can also be supplied if one has been defined in ServiceGPS for the location (geofence).
This can used for different purposes, depending the value of the type. Where the location type (GeoFenceLocType
, above) is Parts Location
, for example, the location name could be the name of the building where the parts are located, e.g. “Stockport Depot”.
#define SP_LatitudeMin -90.0 /* 90°S */
#define SP_LatitudeMax +90.0 /* 90°N */
#define SP_LongitudeMin -180.0 /* 180°W */
#define SP_LongitudeMax +180.0 /* 180°E */
Definition
The definition of this API is:
The Timestamp field is the timestamp from the GPS device in the vehicle itself and can be operative-local or UTC, according to the setting of EmpChangeTravelStatus: Time Zone Type (tz_opts ).
Return Structure
The API returns the standard return structure.
Return Codes
In addition to the Standard Return Codes, the possible Return Codes from this API are: