Devices Locations

Obtain locations of IoT or consumer devices

POST
/loc/v1/devicelocations

Requests the current or cached location of up to 10,000 IoT or consumer devices (phones, tablets. etc.). This request returns a synchronous transaction ID, and the location information for each device is returned asynchronously as a DeviceLocation callback message.

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

*/*

An asynchronous request to obtain locations of devices.

An asynchronous request to obtain locations 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/devicelocations" \  -H "Content-Type: */*" \  -d '<accountName>2234434445-32333</accountName>  <accuracyMode>0</accuracyMode>  <cacheMode>2</cacheMode>  <deviceList>    <id>354677790348290</id>    <kind>imei</kind>    <mdn>5557337468</mdn>  </deviceList>'
{  "txid": "4be7c858-eeee-ffff-gggg-95061456d835",  "status": "QUEUED"}