Get location data
POSThttps://api.foxentry.com/location/get
Foxentry allows you to get information about location based on the dataScope option. Country and ID parameters are required. You can either choose internal ID, which is assigned by Foxentry or external ID from the data source. CZ external = RUIAN, PL external = Gov data, SK external does not exist.
Headers
Api-VersionstringAuthorizationstringrequiredBody params
requestobjectrequiredCustom ID assigned by you if you need so.
queryobjectrequiredParameters you want to validate or search for.
Country code in format ISO-3166-1 alpha-2.
Location ID
optionsobjectOptions that change how the endpoint behaves.
Data scope of returned data.Default
basicArray of allowed data sources, which restricts countries the module searches. Although we use the request.client object to provide most relevant results, it is generally recommended to to limit this option to only the necessary sources - especially if you don't utilize the request.client object.Default
["AD", "AL", "AT", "BA", "BE", "BG", "CH", "CY", "CZ", "DE", "DK", "ES", "FR", "GB", "GR", "HR", "HU", "IS", "IT", "LI", "LU", "MC", "ME", "MK", "MT", "NL", "PL", "RO", "RS", "SI", "SK", "SM", "VA", "XK"]Whether to return locally formatted ZIP code or not. (130 00 vs 13000).Default
falseThis option determines the format in which the country is returned. Choices include local (Česká republika) and international (Czech republic) variants with their shortened counterparts (Česko, Czechia). You can use ISO 3166 alpha codes (CZ, CZE) as well.Default
alpha2This option determines the format in which the city is returned. Minimal = Praha, basic = Praha 8, extended = Praha 8 - Karlín.Default
basicInternal is assigned by Foxentry. External ID may vary for every supported country. CZ = RUIAN, PL = Government data, SK = no external ID.
clientobjectInformation about your user, to make results more relevant.
Country code in ISO-3166-1 alpha-2 format.
Client's latitude
Client's longitude
Empty fields use the example value shown in grey. Everything you type here is written into the request on the right, and the other way round.
Responses
Response body · application/json
statusintegerStatus of API response.
requestobjectendpointstringcodestringCode of request.
customIdstring | nullCustom ID assigned by you if you need so.
queryobjectcountrystringCountry code in format ISO-3166-1 alpha-2.
idstringLocation ID
optionsobjectQuery options.
dataScopestringData scope of returned data.
basicfulldataSourcearray[string]Array of allowed data sources, which restricts countries the module searches. Although we use the request.client object to provide most relevant results, it is generally recommended to to limit this option to only the necessary sources - especially if you don't utilize the request.client object.
zipFormatbooleanWhether to return locally formatted ZIP code or not. (130 00 vs 13000).
countryFormatstringThis option determines the format in which the country is returned. Choices include local (Česká republika) and international (Czech republic) variants with their shortened counterparts (Česko, Czechia). You can use ISO 3166 alpha codes (CZ, CZE) as well.
alpha2alpha3locallocalShortenedinternationalinternationalShortenedcityFormatstringThis option determines the format in which the city is returned. Minimal = Praha, basic = Praha 8, extended = Praha 8 - Karlín.
minimalbasicextendedidTypestringInternal is assigned by Foxentry. External ID may vary for every supported country. CZ = RUIAN, PL = Government data, SK = no external ID.
internalexternalclientobjectAdditional information about your user (from whom you've obtained the data sent in query) to increase relevance of the results. If you do not wish to provide this information, you can limit results to relevant countries using the dataSource parameter present in some modules.
ipstringcountrystringCountry code in ISO-3166-1 alpha-2 format.
locationobjectLatitude & longitude of the client's approximate location.
latnumberClient's latitude
lonnumberClient's longitude
responseobjectresultsarray[object]dataobjectcountrystring | nullCountry code in format ISO-3166-1 alpha-2.
statestring | nullFederal state
regionstring | nulldistrictstring | nullcityDistrictstring | nullcityDistrictSpecialstring | nullSpecial types of city districts. Used only in Prague at the moment.
cityPartstring | nullcityAdministrativestring | nullCity Administrative area.
cadastralAreastring | nullCity cadastral area.
idsobjectAddress internal & external ids.
internalstring | nullInternal address ID.
externalstring | nullExternal address ID. May vary for every supported country. CZ = RUIAN, PL = Government data, SK = no external ID.
regionstring | nullRegion ID.
districtstring | nullDistrict ID.
cityDistrictSpecialstring | nullCity district special ID.
cityDistrictstring | nullCity district ID.
cityPartstring | nullCity part ID.
cadastralAreastring | nullCadastral area ID.
citystring | nullCity ID.
streetstring | nullStreet ID.
streetstring | nullStreet.
numberobject | nullpart1string | nullFirst section of house number.
part1Numberstring | nullNumerical part of the first section.
part1Letterstring | nullTextual part of the first section.
part2string | nullSecond section of house number.
part2Numberstring | nullNumerical part of the second section.
part2Letterstring | nullTextual part of the second section.
fullstring | nullFull house number.
typestring | nullType of house number.
streetWithNumberstring | nullStreet with number.
citystring | nullLocation city.
zipstring | nullZIP code.
postOfficeobjectIn what post office jurisdiction the address falls under.
namestring | nullgeometryobjectgpsobjectcustomarray[object]Custom coordinate system. May vary for every country.
fullstring | nullerrorsarray[string]List of errors related to the request. Should be empty if the request finished successfully.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.