Documentation Index
Fetch the complete documentation index at: https://docs.pathstack.io/llms.txt
Use this file to discover all available pages before exploring further.
Get your devices connected!
Start off by checking out this guide for how to connect your telematics providers to PathStack so you can access data
from all of them in one place.
Start requesting data!
Already set up your devices? No worries, you can start getting data for them, such as trips and positions. Check out
this guide to see how!
Try it out!
Look how easy it is to get up-to-date data on your entire fleet! It’s as easy as 1, 2, 3…
Authentication
Get devices
Get trips for a device
Get positions in a trip
import requests
url = "https://api.pathstack.io/token"
payload = {
"username": "username",
"password": "password"
}
headers = {"Content-Type": "application/json"}
response = requests.request("POST", url, json=payload, headers=headers)
access_token = response.json()['data']['access_token']
refresh_token = response.json()['data']['refresh_token']
import requests
url = "https://api.pathstack.io/device"
querystring = {"telematics_provider":"navman"}
headers = {"Authorization": "Bearer <access-token>"}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.json())
import requests
url = "https://api.pathstack.io/device/{device_id}/trip"
querystring = {
"start_time_utc":"2024-01-09T10:58:39",
"end_time_utc":"2024-01-10T10:58:39",
}
headers = {"Authorization": "Bearer <access-token>"}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.json())
import requests
url = "https://api.pathstack.io/trip/{trip_id}/position"
headers = {"Authorization": "Bearer <access-token>"}
response = requests.request("GET", url, headers=headers)
print(response.json())