OS1 Services
Location Service
6 min
introduction the location service is responsible for the management of locations and addresses this service provides storage of locations and country/city specific data (such as country name, city name, zip code, etc ) which can be used to validate whether info provided in location is valid or not note that, location or static data is tenant specific location a location is a particular place or position to represent it as an address is not enough it can be represented by a geopoint or a combination of address and geopoint thus, a location could be an address and/or a geocode create a location to add a location, call the https //docs getos1 com/reference/create location endpoint to update a location, call the https //docs getos1 com/reference/update location endpoint the following table shows the parameters that are passed to the create location endpoint the update location endpoint takes a subset of these parameters as necessary for the update true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type request bodies are specified in json format the following examples show a request body for creating a location and a request body for updating a location create location { "tags" { "timezone" "utc 5 eastern standard time (est)", }, "address" { "buildingnumber" "123", "addressline1" "main street anytown", "addressline2" "sample road", "city" "queens", "state" "new york", "country" { "code" "+1", "name" "united states" }, "zipcode" "10001" }, "geolocation" { "lat" "40 674778", "long" " 73 800629" } } update location { "tags" { "timezone" "utc 8 pacific standard time (pst)", }, "address" { "buildingnumber" "58 e", "addressline1" "4842 horizon circle", "addressline3" "marylebone, nw1 6xe, uk", "city" "tacoma", "state" "washington", "zipcode" "98402" }, "geolocation" { "lat" "47 215637", "long" " 122 491043" } } location models the location is considered as an aggregation of address and geocode with that, an apartment in a building has an address and geocode the apartment number is identified by the buildingnumber in the address thus two apartments in a building will be distinguished by different addresses location, geocode, and address is defined in location service as location address address geocode geocode locationinfo object geocode longitude (double) the range of longitude is 180 to 180 and can be up to 6 decimal places latitude (double) the range of latitude is 90 to 90 and can be up to 6 decimal places address buildingnumber (string) building number of the address addressline1 (string) the street information of the address addressline2 (string) an optional additional field for the street address addressline3 (string) another optional additional field for the street address of the billing address county (string) county of the address city (string) the city, town, or village of the address state (string) state of the address zipcode (string) postal code of the address country (country) country consists of code and name