Get Stock Gps History
Get where a stock item has been: its GPS trail, distance, top speed, and alert pins (pickup, return, speeding, tamper, power cut, SOS) over a time window. Pass orderId to use that booking's hire window. Otherwise from/to in epoch milliseconds, defaulting to the last 7 days. Also returns the tracker's latest fix.
App connections need the booking:read or booking:write or inventory:write scope.
curl -X GET "https://dash.lockii.app/api/v1/stock/{stockId}/gps-history" \
-H "x-api-key: $LOCKII_API_KEY"Authorization
x-api-keystringheaderAPI key from Settings → Integrations → API.
AuthorizationstringheaderThe same API key, or an OAuth access token, sent as Authorization: Bearer.
api_keystringqueryAPI key query parameter.
Parameters
stockIdstringpathrequiredStock item ID
orderIdstringqueryBooking ID. Uses that booking's hire window, padded 30 minutes.
fromnumberqueryWindow start, epoch milliseconds. Defaults to 7 days ago.
tonumberqueryWindow end, epoch milliseconds. Defaults to now.
maxPointsintegerqueryMost trail points to return, evenly spaced. Stats use every point.
Default:200
Response
JSON result for this operation.
{}