Geofence API is used to obtain the geofence and name for all MyGate communities which are enabled for a specific partner and can be utilized by the partner for local filtering of EARs.
As new communities are onboarded on MyGate frequently, the partner needs to call this API on a daily basis to maintain data consistency.
Fetch geofence and society name enabled for Partner.
'x-api-key' is visible on Express Entry Dashboard.
Fetch Geofence
Sample cURL
curl --location --request GET 'https://ecom.kappa.mgmaglev.xyz/delivery/devops-intg/v2/partner/geofences?cityName=XxXxXx&validSocieties=XxXxXx&pageNumber=1'\
--header 'x-api-key: XxXxXx'
Request Headers
Name
Value
Mandatory
Description
x-api-key
XxXxXx
Yes
Partner access API key.
Query Parameters
Name
Type
Mandatory
Description
cityName
String
No
Fetch geofences for a particular city.
validSocieties
String
No
Fetches only communities which have greater than 3 geo-points. Possible values are "yes" and "no.
pageNumber
Integer
No
Page number for pagination using 1-based indexing (starts from 1). Defaults to page 1 if not specified. Each page contains a maximum of 2000 societies.
Response
{
"es":"Integer",
"message":"String",
"data":[
{
"geofence":[
{
"latitude":"Double",
"longitude":"Double"
},
{
"latitude":"Double",
"longitude":"Double"
},
{
"latitude":"Double",
"longitude":"Double"
},
{
"latitude":"Double",
"longitude":"Double"
},
{
"latitude":"Double",
"longitude":"Double"
}
],
"society_name":"String",
"city_name":"String",
"gate_lat_long":[
{
"latitude":"Double",
"longitude":"Double"
}
],
"society_id":"String"
}
],
"pagination_metadata":{
"current_page":"Integer",
"current_page_size":"Integer",
"total_pages":"Integer",
"has_next":"Boolean"
}
}
Response Attributes
Name
Type
Description
es
Integer
Denotes error status.
message
String
Success or failure message.
data
Array
Contains list of partner enabled MyGate community geofences.
geofence
Array
Geofence of a MyGate community in the form of a closed polygon.
society_name
String
Name of MyGate community.
city_name
String
City in which the MyGate community is located in.
gate_lat_long
Array
Array of the MyGate community gate locations.
society_id
String
Unique identifier for each MyGate community. If required, need to be communicated to the team.
latitude
Double
Latitude as part of geofence or gateLatLong array.
longitude
Double
Longitude as part of geofence or gateLatLong array.
pagination_metadata
Object
Contains metadata for paginating through results.
current_page
Integer
Current page number (1-based).
total_pages
Integer
Total number of available pages in the result set.
has_next
Boolean
Indicates whether additional pages are available.
current_page_size
Integer
Number of elements in the current page (maximum 2000 societies).