Geolocation
Geolocation, in the context of personalization, is about using a user's geographic location to tailor the experience, making services or content more relevant to their specific physical location. Geolocation APIs in Personalize allow you to access the underlying dataset of Countries, Regions and Cities that you can target.
This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.
Get all Regions
https://personalize-api.contentstack.com/geolocation/regionsThe Get all Regions request fetches all the region-based information based on the provided search query. Regions are administrative divisions of a country, such as states or provinces, defined according to ISO 3166-2 (https://en.wikipedia.org/wiki/ISO_3166-2) standard. You can also filter the list by name and region codes.
To configure the permissions for your application via OAuth, include the personalize:read or personalize:manage scope.
[
{
"code": "US-TX",
"name": "Texas",
"parent": "US",
"displayName": "Texas, United States of America"
}
]Get all Countries
https://personalize-api.contentstack.com/geolocation/countriesThe Get all Countries request fetches all the country-based information based on the provided search query. The country list is based on the current ISO 3166-1 (https://en.wikipedia.org/wiki/ISO_3166-1) standard.
To configure the permissions for your application via OAuth, include the personalize:read or personalize:manage scope.
[
{
"name": "United States of America",
"code": "US"
}
]Get all Cities
https://personalize-api.contentstack.com/geolocation/citiesThe Get all Cities request fetches all the city-based information based on the provided search query. You can also filter the list by name and city codes.
To configure the permissions for your application via OAuth, include the personalize:read or personalize:manage scope.
[
{
"code": "austin,TX,US",
"displayName": "Austin, Texas, United States"
}
]