Is there anyway in NetSuite given a US Zip to get ...
# suitescript
j
Is there anyway in NetSuite given a US Zip to get the county? I was able to find a CSV of counties by ZIP which I could turn into a custom record but hoping for something native or perhaps an API I could use on the server side.
m
We've been using zip-codes.com's API for a similar purpose and it's worked well for us - https://www.zip-codes.com/zip-code-api.asp. It'll give you way more info than you probably need but it's pretty solid/reliable in our experience.
j
Thanks @MTNathan that's close the only issue I see with this API, is this is for tax purposes and based on NetSuites tax codes for a given state a given zip can belong to multiple county's while it's great I can get a county I'd be worried it's not the right county.
m
Ah sure, that's fair - we're using it to determine 'markets' (essentially Metropolitan Statistical Area') so it's both broader than county and less consequential if it's not 100% accurate. We use Google's Geocoding API (https://developers.google.com/maps/documentation/geocoding/start) for other purposes and I think they send county back if you send a street address (along with city, state, and zip). That also has the added benefit of skewing towards free if you're not using it too heavily.