location.batch

The location.batch command is used to publish batch location data.

Publishes are executed sequentially. If any of the individual data publishes fail with an error, the error will be immediately returned and sequential publishing terminates without completion.

TR50 Request

{
  "cmd": {
    "command": "location.batch",
    "params": {
      "thingKey": "mything",
      "ts": "2020-12-06T02:03:04.322Z",
      "corrId": "mycorrid",
      "data": [
        {
          "ts": "2020-12-06T02:03:04.322Z",
          "corrId": "mycorrid",
          "lat": 7.1234,
          "lng": 9.6789,
          "heading": 124.1234,
          "altitude": 3.3,
          "speed": 48.9,
          "fixAcc": 2
        },
        {
          "ts": "2020-12-06T02:04:04.322Z",
          "corrId": "mycorrid",
          "lat": 3.1234,
          "lng": 4.6789,
          "heading": 124.1234,
          "altitude": 3.3,
          "speed": 48.9,
          "fixAcc": 2
        }
      ]
    }
  }
}

Request Parameters

Name Type Required Description
thingKey String Yes* Key of the thing.
esn String ESN of the thing.
iccid String ICCID of the thing.
imei String IMEI of the thing.
imsi String IMSI of the thing.
meid String MEID of the thing.
msisdn String MSISDN of the thing.
*One of the above parameters is required to identify the thing.
ts String Timestamp to use for all data records that do not specify a "ts" parameter.
corrid String Correlation ID to use for all data records that do not specify a "corrId" parameter.
data Array Array of publish objects.
Location data object
ts String The timestamp at which the value is recorded. Defaults to the top level "ts" parameter, if not specified, then the current timestamp will be used.
corrId String A correlation ID that can be used when querying to find related data objects.
lat Float Yes The latitude for this location publish.
lng Float Yes The longitude for this location publish.
heading Integer   The direction for this location publish.
altitude Integer   The altitude for this location publish.
speed Integer   The speed for this location publish.
fixAcc Integer   The accuracy in meters of the coordinates being published.
fixType String   A string describing the location fixation type. Typically gps, gnss, manual, or m2m-locate.

gps- Location information using the GPS

gnss- Location information based on Global Navigation Satellite System (GNSS)

manual- Location entered manually

m2m-locate - A location-based service (LBS) which provides Telit cellular module users an additional means of obtaining a geo-location fix (latitude-longitude). The service derives device position from a triangulation process which uses cellular base-stations as references. Particularly useful when GNSS signals are either masked or jammed outdoors; or where GNSS signal strength is too weak to provide a reliable position such as in many indoor situations

TR50 Response

If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true
  }
}