« Back to Documentation Overviewget_contact_geoip
Section: Contacts
Version: 1.5.0
Get contact geo location based on IP address from which the subscription was processed.
Warning: Geo location data is based on the IP address from which a contact subscribed, so not every contact has it (for example imported contacts do not have this information) and for some ISPs it points to where the gateway of this ISP is.
Parameters
|
---|
string | API_KEY |
object | |
Return Value
|
---|
string | latitude | 54.35 |
string | longitude | 18.6667 |
string | country | Poland |
string | region | 82 |
string | city | Gdańsk |
string | country_code | PL |
string | postal_code | get_contact_geoip_postal_code__string |
string | dma_code | get_contact_geoip_dma_code_0_string |
string | continent_code | EU |
string | time_zone | Europe/Warsaw |
Example Request JSON
[
"API_KEY",
{
"contact": "CONTACT_ID"
}
]
Example Response JSON
{
"latitude": "54.35",
"longitude": "18.6667",
"country": "Poland",
"region": "82",
"city": "Gda\u0144sk",
"country_code": "PL",
"postal_code": null,
"dma_code": "0",
"continent_code": "EU",
"time_zone": "Europe\/Warsaw"
}
Example Error Response JSON
{
"code": -1,
"message": "Missing contact"
}
Method-specific Errors
|
---|
Missing contact |
API-wide Errors
|
---|
API key verification failed
| API key verification failed |
API client IP not allowed
| API client IP not allowed |
Invalid params
| Attribute params must be reference to hash |