GPS history or nearest point
curl --request GET \
--url https://api.fleeticc.com/api/partner/v1/history \
--header 'X-Api-Key: <api-key>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>'import requests
url = "https://api.fleeticc.com/api/partner/v1/history"
headers = {
"X-Api-Key": "<api-key>",
"X-Timestamp": "<x-timestamp>",
"X-Signature": "<x-signature>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Api-Key': '<api-key>',
'X-Timestamp': '<x-timestamp>',
'X-Signature': '<x-signature>'
}
};
fetch('https://api.fleeticc.com/api/partner/v1/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fleeticc.com/api/partner/v1/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"X-Signature: <x-signature>",
"X-Timestamp: <x-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fleeticc.com/api/partner/v1/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Timestamp", "<x-timestamp>")
req.Header.Add("X-Signature", "<x-signature>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fleeticc.com/api/partner/v1/history")
.header("X-Api-Key", "<api-key>")
.header("X-Timestamp", "<x-timestamp>")
.header("X-Signature", "<x-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fleeticc.com/api/partner/v1/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
request["X-Timestamp"] = '<x-timestamp>'
request["X-Signature"] = '<x-signature>'
response = http.request(request)
puts response.read_body{
"code": "200",
"message": "<string>",
"data": {}
}Partner API
History
Past GPS points for a vehicle, or the nearest point at a given time
GET
/
api
/
partner
/
v1
/
history
GPS history or nearest point
curl --request GET \
--url https://api.fleeticc.com/api/partner/v1/history \
--header 'X-Api-Key: <api-key>' \
--header 'X-Signature: <x-signature>' \
--header 'X-Timestamp: <x-timestamp>'import requests
url = "https://api.fleeticc.com/api/partner/v1/history"
headers = {
"X-Api-Key": "<api-key>",
"X-Timestamp": "<x-timestamp>",
"X-Signature": "<x-signature>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Api-Key': '<api-key>',
'X-Timestamp': '<x-timestamp>',
'X-Signature': '<x-signature>'
}
};
fetch('https://api.fleeticc.com/api/partner/v1/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fleeticc.com/api/partner/v1/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"X-Signature: <x-signature>",
"X-Timestamp: <x-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fleeticc.com/api/partner/v1/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("X-Timestamp", "<x-timestamp>")
req.Header.Add("X-Signature", "<x-signature>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fleeticc.com/api/partner/v1/history")
.header("X-Api-Key", "<api-key>")
.header("X-Timestamp", "<x-timestamp>")
.header("X-Signature", "<x-signature>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fleeticc.com/api/partner/v1/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
request["X-Timestamp"] = '<x-timestamp>'
request["X-Signature"] = '<x-signature>'
response = http.request(request)
puts response.read_body{
"code": "200",
"message": "<string>",
"data": {}
}GET https://api.fleeticc.com/api/partner/v1/history
vehicleId or imei.
Headers
string
required
Your Partner API key
string
required
Unix seconds
string
required
HMAC signature of the full path including the query string
Trip history (time range)
string
Fleeticc vehicle UUID (or use
imei)string
Device IMEI (or use
vehicleId)integer
required
Start time (Unix seconds)
integer
required
End time (Unix seconds)
Request example
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin:$PATH"
KEY="$FLEETICC_API_KEY"
SECRET="$FLEETICC_API_SECRET"
IMEI="359633100000001"
FROM=$(($(date +%s) - 86400))
TO=$(date +%s)
REQ_PATH="/api/partner/v1/history?imei=${IMEI}&from=${FROM}&to=${TO}"
TS=$(date +%s)
BODY_HASH=$(printf '' | openssl dgst -sha256 -hex | awk '{print $NF}')
SIG=$(printf 'GET\n%s\n%s\n%s' "$REQ_PATH" "$TS" "$BODY_HASH" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $NF}')
curl -sS -X GET "https://api.fleeticc.com$REQ_PATH" \
-H "X-Api-Key: $KEY" \
-H "X-Timestamp: $TS" \
-H "X-Signature: $SIG"
Example response
{
"code": "200",
"message": "Partner GPS history retrieved successfully.",
"data": {
"mode": "range",
"vehicleId": "8f3c2a1b-4d5e-6f70-8192-a3b4c5d6e7f8",
"imei": "359633100000001",
"from": 1761190000,
"to": 1761200000,
"record": [
{
"timestamp": 1761190100,
"latitude": 7.29,
"longitude": 80.63,
"speed": 12,
"heading": 90,
"accstatus": 1
}
]
}
}
Location at a specific time
Useful when you already have a timestamp (for example a stop or job event) and want the GPS point closest to that moment.string
Fleeticc vehicle UUID (or use
imei)string
Device IMEI (or use
vehicleId)integer
required
Time you care about (Unix seconds)
integer
Search ± this many seconds (default
300, max 3600)point may be null. Save at and try again later.
Example response
{
"code": "200",
"message": "Partner GPS history retrieved successfully.",
"data": {
"mode": "nearest",
"at": 1761200000,
"windowSeconds": 300,
"point": {
"timestamp": 1761199988,
"latitude": 7.2911,
"longitude": 80.635,
"speed": 0,
"heading": 10,
"accstatus": 0
}
}
}
Limits
Up to 60 requests per minute per API key. Max range 7 days perfrom/to request.Authorizations
Also send X-Timestamp (Unix seconds) and X-Signature (HMAC-SHA256 hex). See Authentication.
Headers
Your Partner API key
Example:
"pk_078dd6a8b290dbce3543d18f9c6cf72d"
Current Unix time in seconds (±5 minutes)
Example:
"1761200000"
HMAC-SHA256 hex of METHOD\nPATH\nTIMESTAMP\nBODY_SHA256
Query Parameters
Fleeticc vehicle id (or use imei)
Device IMEI (or use vehicleId)
Example:
"359633100000001"
Range start (Unix seconds). Required with to.
Example:
1761190000
Range end (Unix seconds). Required with from. Max span 7 days.
Example:
1761200000
Unix seconds — nearest GPS point mode
Search ± seconds around at (default 300, max 3600)