× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Apologies to the USPS--I not longer can find any error in their examples. Likely old eyes and fat fingers on my part.

For the record, here's an example of what I have found works (formatted for hopefully better readability):

values QSYS2.HTTP_GET('http://production.shippingapis.com/ShippingAPI.dll'
concat '?API=Verify&XML=' concat
url_encode(
'<AddressValidateRequest USERID="126NONE03897">' concat
'<Revision>1</Revision>' concat
'<Address ID="0">' concat
'<Address1>Suite 2</Address1>' concat
'<Address2>8 Wildwood Drive</Address2>' concat
'<City>Old Lyme</City>' concat
'<State>CT</State>' concat
'<Zip5/>' concat
'<Zip4/>' concat
'</Address>' concat
'</AddressValidateRequest>')
)
;

It returns an XML string like this (again formatted for hopefully better readability):

<?xml version="1.0" encoding="UTF-8"?>
<AddressValidateResponse>
<Address ID="0">
<Address1>STE 2</Address1>
<Address2>8 WILDWOOD DR</Address2>
<City>OLD LYME</City>
<State>CT</State>
<Zip5>06371</Zip5>
<Zip4>1844</Zip4>
<DeliveryPoint>08</DeliveryPoint>
<CarrierRoute>R010</CarrierRoute>
<Footnotes>N</Footnotes>
<DPVConfirmation>S</DPVConfirmation>
<DPVCMRA>N</DPVCMRA>
<DPVFootnotes>AACC</DPVFootnotes>
<Business>N</Business>
<CentralDeliveryPoint>N</CentralDeliveryPoint>
<Vacant>N</Vacant>
</Address>
</AddressValidateResponse>

Note that it has standardized the address and filled in the ZIP and ZIP+4.

You could also omit the city name but provided the zip and it will figure out the city name.

Sam

On 1/5/2022 2:08 PM, Jack Woehr via MIDRANGE-L wrote:

Now I've got to figure out why some of the USPS examples, which I
copied, don't seem to work.


Um, Sam, I assume that you've, like, visited the Post Office before ... :)



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.