Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Sample Script: How to make an external call (REST interface)
Background
This example uses the StrikeIron Address Verification REST interface to validate an address.
The URL request corresponding to this service call is constructed in JavaScript. nlapiRequestURL is used
to make the external callout and the return values are extracted from the REST-formatted XML response using some
of the built-in XPath SuiteScript functions.
REST Protocol
Sample Request (REST Interface)
Address: 2955 Campus Dr, Suite 175, San Mateo, CA, 94403
URL used: http://ws.strikeiron.com/StrikeIron/USAddressVerification4_0/USAddressVerification/VerifyAddressUSA?LicenseInfo.RegisteredUser.UserID=USER_NAME_HERE&LicenseInfo.RegisteredUser.Password=*****&VerifyAddressUSA.addressLine1=2955%20Campus%20Drive&VerifyAddressUSA.addressLine2=Suite%20175&VerifyAddressUSA.city_state_zip=San%20Mateo%2C%20CA%2C%2094403