Get Location By Coordinates
Gets the location for the given coordinates. Returns the location if successful, otherwise returns an error.
Permissions Required: Location::Coord
Headers
-
x-coordpair string
The coordinates to get the location for
GET
/location/coords
curl \
-X GET https://thefemdevs.com/api/location/coords \
-H "x-coordpair: 38.8976633,-77.0365739"
Response examples (200)
{
"coords": {
"lat": 38.8976633,
"lng": -77.0365739
},
"address": {
"city": "Washington",
"state": "District of Columbia",
"street": "Pennsylvania Avenue Northwest",
"country": "United States",
"postalCode": "20500",
"houseNumber": "1600"
},
"pluscode": "87G8P9CJ+XQ"
}
Response examples (400)
Missing coordinates
{
"code": 8,
"message": "Missing Header Parameter(s)"
}
{
"code": 9,
"message": "Invalid Header Parameter(s)"
}
Response examples (401)
Missing API Token
{
"code": 3,
"message": "No API key provided"
}
{
"code": 4,
"message": "Invalid API key provided"
}
Response examples (403)
Missing permissions
{
"code": 1,
"message": "You are not authorized to access this resource"
}
{
"code": 2,
"message": "You are blacklisted from accessing this resource"
}
Response examples (404)
{
"code": 22,
"message": "Unable to retrieve requested information"
}