The last known location is the most recent position Plaspy has on record for a tracker. If someone asks where a van is, the coordinates let you place it on the map. The time of the fix tells you whether the information is seconds old or comes from an earlier trip.
Supply the ID of the device you want to look up. To draw a marker, request latitude and longitude. The position also includes its date and time. If the tracker has never reported, there may be no location to display.
Request Details
GET /api/devices/{deviceId}/lastLocation
Request Parameters
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceIdStringRequired | String | Yes | Tracker identifier in the path. Use the id from the device list. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fieldsString arrayOptional | String array | No | Names of the fields to return. Separate them with commas or repeat the parameter. The selection always includes dateTime. |
Replace the sample identifier with a device id visible in GET /api/devices.
Omitting fields returns the usual available fields. Request outputs explicitly to include device outputs. The position fields table lists the accepted names.
Optional fields with no reading can be omitted. The contract allows null values for latitude, longitude and milleage.
Authentication Required
Send the access token in the Authorization: Bearer <token> header. See Authentication.
Example Request
GET /api/devices/123456789012345/lastLocation?fields=latitude,longitude HTTP/1.1
Host: api.plaspy.com
Authorization: Bearer {token}Response Parameters
A response with a position includes lastLocation. If the tracker has not yet reported, this field may be absent. The lookup uses one unit.
| Field | Type | Presence | Description |
|---|---|---|---|
lastLocationObjectWhen a position is available | Object | When a position is available | Last tracker position. It may be absent if the tracker has never reported. |
successBooleanAlways | Boolean | Always | In a successful response, true confirms the operation. |
apiUsageIntegerAlways | Integer | Always | Units charged for this request. |
apiDailyUsageIntegerAlways | Integer | Always | Daily usage before the units for this request are added. |
Last location fields
| Field | Type | Presence | Description |
|---|---|---|---|
dateTimeDate-timeIn every position | Date-time | In every position | Record date and time in the user’s time zone. |
latitudeNumberDepends on selection and data | Number | Depends on selection and data | Latitude of the last location. |
longitudeNumberDepends on selection and data | Number | Depends on selection and data | Longitude of the last location. |
speedNumberDepends on selection and data | Number | Depends on selection and data | Speed in meters per second. |
courseNumberDepends on selection and data | Number | Depends on selection and data | Course (direction) at the last location. |
batteryIntegerDepends on selection and data | Integer | Depends on selection and data | Battery level of the device at the last location. |
fuelIntegerDepends on selection and data | Integer | Depends on selection and data | Fuel level of the device at the last location. |
fuel2IntegerDepends on selection and data | Integer | Depends on selection and data | Secondary fuel level at the last location. |
temperatureNumberDepends on selection and data | Number | Depends on selection and data | Temperature measured at the last location. |
temperature2NumberDepends on selection and data | Number | Depends on selection and data | Secondary temperature measured at the last location. |
sensorTime1IntegerDepends on selection and data | Integer | Depends on selection and data | Sensor 1 time at the last location. |
sensorTime2IntegerDepends on selection and data | Integer | Depends on selection and data | Sensor 2 time at the last location. |
sensorTime3IntegerDepends on selection and data | Integer | Depends on selection and data | Sensor 3 time at the last location. |
sensorTime4IntegerDepends on selection and data | Integer | Depends on selection and data | Sensor 4 time at the last location. |
inactiveSecondsIntegerDepends on selection and data | Integer | Depends on selection and data | Inactive seconds at the last location. |
rpmIntegerDepends on selection and data | Integer | Depends on selection and data | Revolutions per minute at the last location. |
milleageNumberDepends on selection and data | Number | Depends on selection and data | Mileage at the last location. |
warningTextsString arrayDepends on selection and data | String array | Depends on selection and data | Warning texts at the last location. |
alertTextsString arrayDepends on selection and data | String array | Depends on selection and data | Alert texts at the last location. |
alertsString arrayDepends on selection and data | String array | Depends on selection and data | Alerts at the last location. |
warningsString arrayDepends on selection and data | String array | Depends on selection and data | Warnings at the last location. |
hasBooleanDepends on selection and data | Boolean | Depends on selection and data | Indicates if there are critical alerts at the last location. |
attributesObjectDepends on selection and data | Object | Depends on selection and data | Additional attributes at the last location. |
accessoriesObject arrayDepends on selection and data | Object array | Depends on selection and data | Additional attributes of accessories at the last location. |
inputsBoolean arrayDepends on selection and data | Boolean array | Depends on selection and data | State of the inputs at the last location. |
outputsBoolean arrayIf requested and available | Boolean array | If requested and available | State of the outputs at the last location. |
Example HTTP 200 response
{
"success": true,
"apiUsage": 1,
"apiDailyUsage": 12,
"lastLocation": {
"dateTime": "2026-06-10T09:12:00",
"latitude": 4.61,
"longitude": -74.08
}
}Errors
| Field | Type | Presence | Description |
|---|---|---|---|
successBooleanDepends on the error | Boolean | Depends on the error | In the operation errors shown here, the value is false. |
errorStringDepends on the error | String | Depends on the error | Message explaining why the request was rejected. |
The tracker must be enabled and have daily API allowance available. Once the allowance is exhausted, the request returns HTTP 400. The allowance resets at 00:00 UTC.
If a field is unknown, the API returns HTTP 400 and lists the accepted names in error. Correct the selection and repeat the query. Also check the identifier and device access.
Example HTTP 400 error
{
"success": false,
"error": "Device with id '123456789012345' does not exist."
}- Welcome to Plaspy help
- Map
- Viewing a Device's Route History
- Device Control Panel
- Detailed Device Information
- Buttons on the Map
- Details
- Timeline
- Device Menu
- GeoFences
- Bulk Alert Editing
- Enable map notifications
- Mileage Calculation
- Atributes
- Dashboard
- Arrange the dashboards
- Dashboard blocks
- Devices
- Certificates
- Marker Icon
- Information
- Sensors
- Reassign Digital Sensors
- Commands
- Alerts
- Types
- Configuration
- Reminders
- Limits
- History
- Setting Up a New Tracker
- Solution for Identifier Already in Use by Another Account
- Device Issues
- Email alerts sending limits
- Reports
- New Report
- My Account
- Billing Information
- Password Change
- Email Notifications
- Telegram Accounts
- Update Mobile Phone Number
- Primary Email
- Alternative Email
- Enable Two-Factor Authentication (2FA)
- Security Log
- Password Recovery
- Recover Username
- Delete Your Account
- Receipts
- Transfer a receipt to another account
- Activate a scheduled receipt now
- Subscription
- Subscription Plans
- Change the devices of your subscription
- Retry the payment of a renewal
- Change the payment method
- Sign Up
- Activation Code
- Payment Methods
- Line Renewal
- Settings
- Organization
- Log In
- Contact
- Styles
- Maps
- Email Templates
- Push Notifications
- Telegram Notifications
- WhatsApp Notifications
- Mobile App
- My customers
- Customers
- Subscriptions
- Payments
- Payment link
- Sent notifications
- Settings
- Setup assistant
- Plans
- Message templates
- Expiry reminders
- Payment gateways and methods
- WhatsApp templates
- User groups
- Change history
- Statistics
- Activity Summary
- Groups
- Users
- Share Access
- SMS
- Mobile Application
- Developers
- Enable the API
- Rest API
- Authentication
- Devices API
- GET /api/devices
- GET /api/devices/{deviceId}
- POST /api/devices
- GET /api/devices/{deviceId}/lastLocation
- PUT /api/devices/{deviceId}
- POST /api/devices/{deviceId}/locations
- DELETE /api/devices/{deviceId}
- POST /api/devices/{deviceId}/alerts
- GET /api/devices/deleted
- POST /api/devices/{deviceId}/restore
- POST /api/devices/{deviceId}/sendCommand
- Groups API
- GET /api/groups
- POST /api/groups
- GET /api/groups/{groupId}
- PUT /api/groups/{groupId}
- PATCH /api/groups/{groupId}
- DELETE /api/groups/{groupId}
- Users API
- GET /api/users
- POST /api/users
- GET /api/users/countries
- GET /api/users/timeZones
- GET /api/users/{userId}
- PUT /api/users/{userId}
- PATCH /api/users/{userId}
- DELETE /api/users/{userId}
- Alerts API
- GET /api/alerts/types
- GET /api/alerts/{deviceId}
- PUT /api/alerts/{deviceId}
- POST /api/alerts/add
- POST /api/alerts/copy
- Reports API
- GET /api/reports
- POST /api/reports/{reportId}/run
- Scheduled reports API
- GET /api/scheduledReports
- POST /api/scheduledReports
- GET /api/scheduledReports/{reportId}
- PUT /api/scheduledReports/{reportId}
- DELETE /api/scheduledReports/{reportId}
- Shared access API
- GET /api/shares
- POST /api/shares
- POST /api/shares/link
- GET /api/shares/{shareId}
- PUT /api/shares/{shareId}
- DELETE /api/shares/{shareId}
- SMS API
- GET /api/sms
- POST /api/sms
- GET /api/sms/balance
- GET /api/sms/settings
- PUT /api/sms/settings
- Zones API
- GET /api/zones
- PUT /api/zones
- DELETE /api/zones/{zoneId}
- Account settings API
- GET /api/settings
- PATCH /api/settings
- Embed login on my website
- Embed the map on my website
- AI assistants (MCP)
- What an assistant can do
- Connect an assistant
- Permissions and security
- Tools by module
- Example requests
- Connected apps
- Limits, usage and errors
- Frequently asked questions about assistants
We answer all support request within 24 business hours approximately, If you have a question that needs an immediate resolution, please contact us by other way.
We answer you in business hours, as soon as possible. We are located in Bogotá, Colombia, time zone (GMT-5).