We use UPS shipping in our netsuite. But my boss r...
# suitescript
t
We use UPS shipping in our netsuite. But my boss request is to create a script that will determine if the UPS integration gets a Private or Buss Address. Is there a way on doing this?
m
UPS has an address validation API that returns a flag if it's a residential address, it's not too hard to integrate once you get set up with the creds and whatnot through UPS.
t
so is this API can be call using the suitescript and also affect change the shipping cost?
m
You can definitely call the API in SuiteScript (that's we we're doing now) but I can't say whether or not it will affect the shipping cost with the standard UPS shipping (we do our shipping through a custom integration that uses UPS's shipping API). If you're just looking for a way to know if an address is commercial or residential prior to shipping though, the address validation API should get you what you need.
t
Ok, thanks @MTNathan. Wil you have a sample code for this. This is my first time doing something with API 😐
m
I can't share my code but the UPS API documentation has examples for the request payload, and the rest is pretty straightforward (simple authentication, etc.). I'd suggest talking to your UPS account rep to get connected to a technical person to get started.
thumbs up 1
t
thanks for the tip Nathan, I will do this 🙂
👍 1
Hi @MTNathan, I was just reviewing the API while waiting for my access. May I ask which api you use on determining if address is commercial or residential? TIA
message has been deleted
m
@Tyn Guardian We use the
Address Validation - Street Level
API for that purpose. I'm not sure why it's not showing in your list, it should be a separate option from
Address Validation - City, State, ZIP
. Maybe once your access is approved the documentation will show up? Otherwise I'd ask whoever your technical contact ends up being if they have documentation for the
Address Validation - Street Level
API.
t
Thanks for the response, I read those with "address" api and it seems their return is not on what we discuss. I'll ask the tech support for this if that option still wont show up
👍 1