...

Location Tracking

Access real-time and historical location data for your devices


Retrieve current and historical location data for any tracked device.

Get current location

Returns the most recent location for a device.

GET/trackables/{trackableId}/locations

Get current location for your device. Sign in to auto-populate your trackable ID.

Path Parameters

Response

JSON
{
  "locations": [
    {
      "id": "loc_abc123",
      "trackableId": "trk_xyz789",
      "name": "Delivery Van #3",
      "latitude": 37.7749,
      "longitude": -122.4194,
      "timestamp": "2024-01-15T10:30:00Z",
      "horizontalAccuracy": 10.0,
      "batteryLevel": 1
    }
  ]
}

Response fields

FieldTypeDescription
idstringUnique location record ID
trackableIdstringDevice identifier
namestringDevice name from Find My
latitudenumberLatitude coordinate
longitudenumberLongitude coordinate
timestampstringISO 8601 UTC timestamp
horizontalAccuracynumberAccuracy in meters
batteryLevelnumber0=full, 1=medium, 2=low, 3=critical
isInaccuratebooleantrue if location may be imprecise

Tip

Lower horizontalAccuracy values mean more precise locations. Values under 20m are typically reliable.

Get location history

Retrieve historical locations within a time range.

Query parameters

ParameterTypeDescription
start_timestringStart of range (ISO 8601)
end_timestringEnd of range (ISO 8601)
limitnumberMax results (default: 50)
skipnumberResults to skip for pagination

Example

Terminal
curl -X GET "https://api.airpinpoint.com/v1/trackables/trk_xyz789/locations?start_time=2024-01-14T00:00:00Z&end_time=2024-01-15T23:59:59Z&limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

JSON
{
  "locations": [
    {
      "id": "loc_001",
      "trackableId": "trk_xyz789",
      "latitude": 37.7749,
      "longitude": -122.4194,
      "timestamp": "2024-01-15T16:00:00Z",
      "horizontalAccuracy": 10.0,
      "batteryLevel": 1
    },
    {
      "id": "loc_002",
      "trackableId": "trk_xyz789",
      "latitude": 37.7748,
      "longitude": -122.4192,
      "timestamp": "2024-01-15T15:30:00Z",
      "horizontalAccuracy": 15.0,
      "batteryLevel": 1
    }
  ],
  "total": 2
}

Timestamps

All timestamps use ISO 8601 UTC format:

Code
2024-01-15T10:30:00Z

Note

Store timestamps as-is in your database. Convert to local time only when displaying to users.

Polling strategies

Location updates depend on your plan's refresh rate:

PlanRefresh RateBest Practice
Business1 minutePoll every 1min, geofence alerts included
Enterprise1 minutePoll every 1min, or use webhooks

Warning

Polling too frequently won't give you more data and may hit rate limits. Match your polling interval to your plan's refresh rate.