Skip to main content
Avalara Help Center

What are the required fields in a GetTax call?

Overview

You want to know what to include in the required fields of a GetTax call.

Environment

API Integration

Resolution

  • GetTax Call
  • GetTaxRequest represents a request to calculate tax for the provided invoice line items.
FIELD DESCRIPTION TYPE REQUIRED
CustomerCode Client application customer reference code String Y
DocDate Date of invoice, sales order, purchase order, etc. Date in the form YYYY-MM-DD Y
CompanyCode Client application company reference code String N if default company is active. Recommended
DocCode Client application identifier describing this tax transaction (i.e. invoice number, sales order number, etc.) String N Defaults to a GUID. Best practice requires DocCode to be included.
Lines Collection of invoice lines requiring tax calculation Line[] Y see Lines
Addresses Collection of physical addresses that will be referred to as the destination or origination of 1 or more invoice line entries Address[] Y see Addresses 
  • Addresses 

  • Address represents the destination or origin shipping address of a line item. If longitude and latitude are defined all other fields except AddressCode is ignored.
FIELD DESCRIPTION TYPE REQUIRED
AddressCode Reference code uniquely identifying this address instance String Y
Line1

Address line 1 (usually street address)

To use the address of a LOCATION in the Admin Console, enter the location code here and leave all other address fields (other than AddressCode) blank

String Y if PostalCode isn't supplied or Latitude and Longitude aren't supplied
City City name String Y if PostalCode isn't supplied or Latitude and Longitude aren't supplied
Region State, province, or region name String Y if PostalCode isn't supplied or Latitude and Longitude aren't supplied
PostalCode Postal or ZIP code String Y if City and Region aren't supplied or Latitude and Longitude aren't supplied
Latitude Geographic latitude. If Latitude is defined, define longitude field Decimal Y if Line1 and City and Region aren't supplied or Line1 and PostalCode isn't supplied
Longitude Geographic longitude. If Longitude is defined, define latitude field Decimal Y if Line1 and City and Region are not supplied or Line1 and PostalCode is not supplied
  • Lines
  • Line represents an invoiced item requiring tax calculation.
FIELD DESCRIPTION TYPE REQUIRED
LineNo Line item identifier. LineNo uniquely identifies the line item row. String Y
DestinationCode Destination (ship-to) address code.DestinationCode references an address from the Addresses collection. String Y
OriginCode Origination (ship-from) address code.OriginCode references an address from the Addresses collection. String Y
ItemCode Item code (e.g. SKU) String N unless you're participating in SST
Description Item description String N unless you're participating in SST
Qty Item quantity. This is not a multiplier of line amount. See Amount. Decimal Y
Amount Total amount of item line (extended amount, qty * unit price). Multiply before populating this value. Decimal Y

Next steps

For more information, see our API documentation