As part of the open source address validation project for Infor M3, I just uploaded to the GitHub repository a sample script for Infor Smart Office to validate an address in the US using the United States Postal Service USPS Web Tools API. I provide the script as proof-of-concept for the interested reader to complete to suit their needs.
USPS Web Tools API
Here is a sample XML request and the URL:
<AddressValidateRequest USERID="************"> <Address> <FirmName>Ciber</FirmName> <Address1>6363 South Fiddlers Green</Address1> <Address2></Address2> <City>Greenwood Village</City> <State>CO</State> <Zip5></Zip5> <Zip4></Zip4> </Address> </AddressValidateRequest>
Here is the XML response:
<?xml version="1.0" encoding="UTF-8"?> <AddressValidateResponse> <Address> <FirmName>CIBER</FirmName> <Address1>STE 1400</Address1> <Address2>6363 S FIDDLERS GREEN CIR</Address2> <City>GREENWOOD VLG</City> <State>CO</State> <Zip5>80111</Zip5> <Zip4>5024</Zip4> </Address> </AddressValidateResponse>
Here is the sample script TestUSPS.js in Smart Office:
That was how to do address validation for M3 in Infor Smart Office for US addresses using USPS Web Tools.
If you like this, please comment, subscribe, share, contribute to the project, donate your code. Thank you.
UPDATE: I would like to specially acknowledge the contribution of William Dale at Augusta Sportswear for allowing me to use his UPS and USPS accounts so I can do my tests and write the scripts. Thank you William!