« Back to Documentation Overview

get_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
stringAPI_KEY
object
stringcontactCONTACT_ID
Return Value
stringlatitude54.35
stringlongitude18.6667
stringcountryPoland
stringregion82
stringcityGdańsk
stringcountry_codePL
stringpostal_codeget_contact_geoip_postal_code__string
stringdma_codeget_contact_geoip_dma_code_0_string
stringcontinent_codeEU
stringtime_zoneEurope/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