Skip to navigation

Refactor examples

View as Markdown

Compare field differences between validateAddress (RESTv1) and ResolveAddress (RESTv2) and learn how to migrate.

The table below shows the differences in the fields between validateAddress (RESTv1) and ResolveAddress (RESTv2). The example below the table shows how to migrate from RESTv1 to RESTv2.

RESTv1

RESTv2

TextCase

textCase

Line1

line1

Line2

line2

Line3

line3

City

city

Region

region

Country

country

PostalCode

postalCode

Latitude

latitude

Longitude

longitude

Examples

RESTv1 example

curl
  -X GET
  -H 'Accept: application/json'
  -H' Authorization: Basic ${btoa(`:`)}'
  'https://development.avalara.net/1.0/address/validate?Line1&Line2&Line3&City&Region&Country&PostalCode'

RESTv2 example

curl
  -X GET
  -H 'Accept: application/json'
  -H 'Authorization: Basic ${btoa(`:`)}'
  -H 'Content-Type: application/json'
  'https://sandbox-rest.avatax.com/api/v2/addresses/resolve?line1=255 S King St&city=Seattle®ion=WA&country=US&postalCode=98104'

Part of the RESTV1 To RESTV2 Refactor Guide. Open the full “Refactor examples” section on Avalara.