Skip to main content
Avalara Help Center

How do I pass a latitude / longitude as an address into a java GetTax request?

Overview

In a java GetTax request you can pass a standard street address or if none exists (or is not in the United States Postal Service database) you can pass a latitude / longitude instead.

Environment

AvaTax API

Java

Resolution

Replace your address stub with the example below. don't forget to enter the latitude / longitude of the location you want to use.

 

      BaseAddress address = new BaseAddress();
      address.setAddressCode("Destination");
      address.setLatitude("47.627935");
      address.setLongitude("-122.51702");
      addresses.add(address);
      getTaxRequest.setAddresses(addresses);

 

You can view the entire java GetTaxTest Sample here: https://github.com/avadev/AvaTax-Calc-SOAP-java/blob/master/src/GetTaxTest.java  

 

  • Was this article helpful?