getOutdoorsTracksLocation(data: GetOutdoorsTracksLocationParams)

Requires:
@tuya-miniapp/cloud-api≥1.0.5

Description

Batch query real-time locations by device ID.

Parameters

ParameterTypeRequiredDescription
YesRequest body

Return Value

Type: Promise<GetOutdoorsTracksLocationResult>
GetOutdoorsTracksLocationResult (see type definitions and the minituya return table for field meanings)

Referenced Types

typeGetOutdoorsTracksLocationResult
PropertyTypeDescription
deviceLocationListDeviceLocationItem[]Real-time location list of devices

Examples

Request example

import { getOutdoorsTracksLocation } from '@tuya-miniapp/cloud-api';

getOutdoorsTracksLocation({
  deviceIds: 'vdevo16245017293',
})
  .then((response) => {
    console.log(response);
  })
  .catch();

Response example

{
  "deviceLocationList": [
    {
      "deviceId": "vdevo16245017293****",
      "lon": 114.003117,
      "speed": 100,
      "protocol": "GPS",
      "lat": 22.594031,
      "timestamp": 1625198100154
    }
  ]
}