Fetch User Location

Purpose

To fetch the location details (latitude, longitude) of a user. The location data will be returned as follows:

  • If the user’s location was updated within the last 15 minutes, the latitude, longitude, and the time the location was last updated will be returned.

  • If the location was last updated more than 15 minutes ago, an error will be returned indicating that no recent location was found, along with the time the location was last updated.

  • If you need the last available location even when it is older than 15 minutes, pass the parameter fetchLastKnownLocation = true. This will return the latitude, longitude, and the time the location was last updated.

Request URL

https://fsm.zoho.com/fsm/v1/users/<user_id>/location

user_id - The ID (the value of User in the Service_Resources key present in the List Users API response) of the user.

Request Method

GET

Scope

scope=ZohoFSM.users.READ

Query Parameter

NameData TypeDescription
fetchLastKnownLocationBoolean

Pass true if you want to fetch the location data even if it is older than 15 minutes.

Sample Request

Copiedcurl --request GET 'https://fsm.zoho.com/fsm/v1/users/1003XXXX8001/location' \
--header 'Authorization: Zoho-oauthtoken 1000.xxxx.xxxxxe'

Sample Response

Copied{
    "last_sync_time": "06 May 2026, 01:53 PM",
    "Latitude": "12.8310746",
    "Longitude": "80.0519468"
}

Sample Failure Response

Copied//Users location was updated more than 15 minutes ago
{
    "code": "NO_DATA",
    "details": {},
    "message": "No recent location available. Last synced at 06 Aug 2024, 05:34 PM",
    "status": "error"
}