How to use the API with an address as input - geotax_sdk - 2.2

GeoTAX SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Geo Addressing
Product
GeoTAX SDK
Version
2.2
ft:locale
en-US
Product name
GeoTAX SDK
ft:title
GeoTAX SDK Developer Guide
Copyright
2024
First publish date
2023
ft:lastEdition
2024-08-30
ft:lastPublication
2024-08-30T02:47:25.239000

This code sample shows how to set an address as an input to receive the details such as latitude and longitude, jurisdiction type, or district.

TaxRateLookupConfiguration configuration  
  = new TaxRateLookupConfigurationBuilder().withData(dataSourceList) 
                                           .withResources(Paths.get("/resources/taxing-resources"))
                                           .build();
TaxRateLookup lookup
  = new TaxRateLookupBuilder().withConfiguration(configuration) 
      .register(new SDKTaxLookupFactory()) 
      .build();

OutputPreference outputPreference = new OutputPreference(); 
outputPreference.setOutputCasing("upper"); 
outputPreference.setTaxDistrict("Spd");

Preferences preferences = new PreferencesBuilder().withOutputPreferences(outputPreference) 
                                                  .build(); 
TaxRateAddress address = new TaxRateAddress(); 
address.setAddressLines(Arrays.asList("25 Boyce Ln,Fort Rucker, AL  36362"));

TaxResponse response = lookup.lookupByAddress(address, preferences); 

try {
  lookup.close();
} catch (Exception e) {
  e.printStackTrace(); 
}