MyGate

Geofence

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.

Base URLs

API Endpoints & Summary

TypeEndpointDescription
GET/partner/geofencesFetch 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/partner/geofences?cityName=XxXxXx&validated=XxXxXx' \
--header 'x-api-key: XxXxXx'

Request Headers

NameValueMandatoryDescription
x-api-keyXxXxXxYesPartner access API key.

Query Parameters

NameTypeMandatoryDescription
cityNameStringNoFetch geofences for a particular city.
validatedStringNoFetches only communities which have greater than 3 geo-points. Possible values are "yes" and "no.

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"
}
],
"societyName": "String",
"cityName": "String",
"gateLatLong": [
{
"latitude": "Double",
"longitude": "Double"
}
],
"societyId": "String"
}
]
}

Response Attributes

NameTypeDescription
esIntegerDenotes error status.
messageStringSuccess or failure message.
dataArrayContains list of partner enabled MyGate community geofences.
geofenceArrayGeofence of a MyGate community in the form of a closed polygon.
societyNameStringName of MyGate community.
cityNameStringCity in which the MyGate community is located in.
gateLatLongArrayArray of the MyGate community gate locations.
societyIdStringUnique identifier for each MyGate community. If required, need to be communicated to the team.
latitudeDoubleLatitude as part of geofence or gateLatLong array.
longitudeDoubleLongitude as part of geofence or gateLatLong array.

Possible Combinations of Error State and Message

esmessage
1Resource access denied.
1Reason for exception
0Success
0No Society Enabled
Suggestions, contact, support and error reporting: [email protected]