Location Tracking

Access real-time and historical location data for trackable devices with the AirPinpoint API.


Location Tracking

The Location Tracking endpoints allow you to access real-time and historical location data for your trackable devices.

Get Current Location

Retrieve the current location of a specific trackable device.

Endpoint

GET /trackables/{trackable_id}/locations

Example Request

curl -X GET "https://api.airpinpoint.com/v1/trackables/tag_123456/locations?limit=1" \
     -H "Authorization: Bearer YOUR_API_KEY"

Example Response

[
  {
    "id": "location_id_1",
    "trackableId": "trackable_id_1",
    "name": "HondaGenerator2015",
    "latitude": 37.7937534,
    "longitude": -122.4177643,
    "timestamp": "2024-10-06T15:08:28.172000",
    "isInaccurate": false
  },
  {
    "id": "location_id_2",
    "trackableId": "trackable_id_1", 
    "name": "HondaGenerator2015",
    "trackableType": "beacon",
    "latitude": 37.7937953,
    "longitude": -122.4171904,
    "timestamp": "2024-10-06T15:08:28.172000",
    "isInaccurate": false
  }
]

Response Format

All timestamps in the response are returned in ISO 8601 UTC format (e.g., "2024-10-06T15:08:28.172Z").

The response will include:

  • id: Unique identifier for the location record
  • trackableId: ID of the tracked device
  • name: Name of the device, if set in FindMy
  • latitude: Latitude coordinate
  • longitude: Longitude coordinate
  • timestamp: UTC timestamp of when location was recorded
  • isInaccurate: Boolean indicating if location may be imprecise

Get Location History

Retrieve the location history of a trackable device for a specified time range.

Endpoint

GET /trackables/{trackable_id}/locations

Query Parameters

  • start_time: UTC timestamp (ISO 8601 formatted timestamp) (optional)
  • end_time: UTC timestamp (ISO 8601 formatted timestamp) (optional)
  • limit: Maximum number of results to return (optional, default: 50)
  • skip: Number of results to skip (optional, default: 0)

Example Request

curl -X GET "https://api.airpinpoint.com/v1/trackables/tag_123456/locations?start_time=2023-06-14T00:00:00Z&end_time=2023-06-15T23:59:59Z&limit=50" \
     -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "locations": [
    {
      "id": "loc_789012",
      "trackableId": "tag_123456",
      "trackableType": "beacon",
      "latitude": 37.7749,
      "longitude": -122.4194,
      "timestamp": "2023-06-15T16:00:00Z",
      "isInaccurate": false
    },
    {
      "id": "loc_789013",
      "trackableId": "tag_123456",
      "trackableType": "beacon",
      "latitude": 37.7748,
      "longitude": -122.4192,
      "timestamp": "2023-06-15T15:30:00Z",
      "isInaccurate": false
    }
    // ... more location entries ...
  ],
  "total": 50
}

For more details on location tracking, including real-time updates and advanced querying options, please refer to the API Reference.