Skip to content

TaxQuery Docker Container

A Docker container is available which provides appropriate tax names for a given employee’s workplace and residence addresses. Once you have pulled and started this container, you can access the API and associated instructions manually using a browser.

TaxControls components also provide client access to the running container using the TaxQuery method. To use it, call TaxQuery with the work and home addresses and the container url. If successful, the service will return a list of taxnames for the employee. Otherwise it will throw a TaxControlException indicating the nature of the error. An optional parameter is provided for a list of states in which the company has legal nexus. If omitted, the default is the work address’s state.

Start a container on the local PC:

Terminal window
docker run -p 8000:80 calibertechnology/taxquery

Call TaxQuery:

// using TaxControls;
CTaxControl tc = new CTaxControl();
String taxes = tc.TaxQuery(
emp.work_address, // address or PlusCode
emp.home_address, // address or PlusCode
"http://localhost:8000", // TaxQuery Docker image url
emp.nexus_states); // e.g., "OH PA KY"

If successful, the taxes string will contain a comma-separated list of tax names, with jurisdiction rules and reciprocal agreements taken into account.

With the above container running on your PC, you can view the TaxQuery API by pointing your browser to http://localhost:8000.