Get Locations
Table of Contents
Overview
The zoho.one.getLocations task is used to fetch all locations from the specified organization.
Syntax
<response> = zoho.one.getLocations(<orgID>, <page>, <perPage>, <connectionName>);
Scope
ZohoOne.Orgs.READ
where:
Parameter | Description | Data type |
response | is the variable which will hold the details of the locations fetched from the organization. | KEY-VALUE |
<orgID> | is the ID of the organization from which the locations need to be fetched. | NUMBER |
<connectionName> | is the name of the Zoho One connection. | TEXT |
<page> | To get the list of records based on pages. | NUMBER |
<per_page> | Maximum number of records (1-200) in a single page. | NUMBER |
Example
The following script fetches the locations of the first 200 users from Zoho One organization:
response = zoho.one.getLocations(72XXXXXXX, "1", "200", "zoho_one_connection");
where:
response
72XXXXXXX
zoho_one_connection
1
200
{
"status_code": 200,
"locations": [
{
"street_address": "2***",
"country": "p*",
"location_name": "C*****",
"address_type": 1,
"is_primary": true,
"city": "***",
"timezone": "E**********",
"state": "*******",
"postal_code": "9******",
"location_id": "C*****"
},
{
"street_address": "n******",
"country": "i*",
"location_name": "D****",
"address_type": 1,
"is_primary": false,
"city": "****",
"timezone": "P*********",
"language": "a***",
"state": "******",
"postal_code": "*******",
"location_id": "d*******"
},....
],
"has_more": false,
"resource_name": "locations"
}