Devices Locations

Obtain locations of devices

POST
/loc/v1/locations

This locations endpoint retrieves the locations for a list of devices.

Authorization

thingspace_oauth VZ-M2M-Token
AuthorizationBearer <token>

This is the ThingSpace token, from Credentials and Tokens is used

In: header

VZ-M2M-Token<token>

M2M Session Token (How to generate an M2M session token?)

In: header

Request Body

application/json

Request to obtain location of devices.

Request to obtain location of devices.

accountName*string

Account identifier in "##########-#####".

deviceList*array<>

Device list.

accuracyMode?"0"

Accurary, currently only 0-coarse supported.

Value in

  • "0"
cacheMode?CacheMode

Location cache mode.

Value in

  • "0"
  • "1"
  • "2"

Response Body

application/json

application/json

curl -X POST "https://example.com/loc/v1/locations" \  -H "Content-Type: application/json" \  -d '{    "accountName": "1234567890-00001",    "accuracyMode": "0",    "cacheMode": "1",    "deviceList": [      {        "id": "980003420535573",        "kind": "imei",        "mdn": "7892345678"      },      {        "id": "375535024300089",        "kind": "imei",        "mdn": "7897654321"      }    ]  }'
[  {    "msid": "7892345678",    "pd": {      "time": "20170520004421",      "x": "33.45324",      "y": "-84.59621",      "radius": "5571",      "qos": false    },    "error": {}  },  {    "msid": "8583239709",    "pd": {      "time": "20170525214342",      "x": "38.8408694",      "y": "-105.0422583",      "radius": "3866",      "qos": false    },    "error": {}  },  {    "msid": "7897654321",    "pd": {},    "error": {      "time": "20170525214342",      "type": "POSITION METHOD FAILURE",      "info": "Exception code=ABSENT SUBSCRIBER"    }  }]