There are all kinds of web services out there. Most have abandoned the troublesome SOAP, but the REST-like API world remains a little bit of a "wild west" and each one may require different fiddling.
Lob.com
This company has a core mission they tag as "Programmatically send physical mail at scale." See Lob.com Inc.
However they do offer one service you might find useful: Easily verify domestic and international mailing addresses.
Validate & correct customer addresses
Using Lob's address verification API, you can instantly validate and standardize mailing addresses to help ensure your mail reaches your customers. The API attempts to correct any missing information with data directly from the USPS.
Free. How's that for a price?
Reaching your customers by mail can be a crucial part of your business. That's why the Lob address verification API is free for all addresses within the United States. International mail addresses cost $0.15 per verification.
Free?
Well, free for U.S. addresses.
How long this remains free, or what volume might trigger them to ask you to pay I can't say. As always "modern web sites" can be frustrating wumpus hunts because they tend to be driven by marketing types and built by liberal arts students with secretarial level technical skills and no knack for organization or taste. The good news is that they probably aren't really as juiced up on meth as their output might make you think.
So you may have to make a fresh pot of coffee, put on your "lawyer hat," and go spelunking for an hour or so to satisfy yourself and compile a set of page links and text to pass on to your company's legal team for analysis. But it really does seem free as far as I can determine.
Requirements
To use this particular service from a VB6 program you need a couple of things:
The demo uses WinHttp for the first bullet, and provides code for the other two.
You need VB6 of course. Then you need an OS that has WinHttp 5.1, such as Windows Vista or later. If you have Win2K SP3 or WinXP SP1 and have installed the updates that added WinHttp 5.1 to those OSs then that works too. However Microsoft Downloads no longer hosts those updates. If desperate enough you might consider using MSXML.XmlHttpRequest instead. Version 3.0 of MSXML is available all the way back to Windows 95, and should be good enough for this.
You also need an account at Lob.com, but you do not need to associate a payment method with your account if you are just going to use Address Verification. I suspect they are fine with this because they already need the database to support their paid services, so providing this "for free" only imposes minimal costs and serves to drive more buisiness to their paid services. Most people needing Address Verification would be likely enough to benefit from those other services anyway.
So "Thanks Lob.com!"
Testing VerifyAddr.vbp
This is a simple VB6 project. Just unzip the attached archive into a folder.
Then you must apply for an account at Lob.com and get your "Test API Key" which you should put into a test file named Creds.txt which VerifyAddr will open and read the Key from as the first line of text.
As far as I can tell these "Test Keys" are all that are ever used to perform Address Verification unless you apply for what Lob.com calls "reserved pricing."
![Name: sshot.png
Views: 54
Size: 25.2 KB]()
Test run
Here I put in an address for a street that I know got renamed within the last 20 years or so. Sure enough Lob.com corrected it.
This demo program accepts input fields, makes the request, then it dumps the raw (ok, slightly cooked) JSON text for viewing and also parses the JSON and extracts data elements for viewing.
Obviously a real program would be doing something else such as pulling addresses from a database and updating them with the verified results if successful - and logging problems encountered when not successful so that a human could take action.
If there is only a partial match and more information is required (e.g. Apt#, etc), a message string with more information will also be returned.
Lob.com
This company has a core mission they tag as "Programmatically send physical mail at scale." See Lob.com Inc.
However they do offer one service you might find useful: Easily verify domestic and international mailing addresses.
Quote:
Validate & correct customer addresses
Using Lob's address verification API, you can instantly validate and standardize mailing addresses to help ensure your mail reaches your customers. The API attempts to correct any missing information with data directly from the USPS.
Free. How's that for a price?
Reaching your customers by mail can be a crucial part of your business. That's why the Lob address verification API is free for all addresses within the United States. International mail addresses cost $0.15 per verification.
Free?
Well, free for U.S. addresses.
How long this remains free, or what volume might trigger them to ask you to pay I can't say. As always "modern web sites" can be frustrating wumpus hunts because they tend to be driven by marketing types and built by liberal arts students with secretarial level technical skills and no knack for organization or taste. The good news is that they probably aren't really as juiced up on meth as their output might make you think.
So you may have to make a fresh pot of coffee, put on your "lawyer hat," and go spelunking for an hour or so to satisfy yourself and compile a set of page links and text to pass on to your company's legal team for analysis. But it really does seem free as far as I can determine.
Requirements
To use this particular service from a VB6 program you need a couple of things:
- The ability to make HTTPS POST requests.
- The ability to encode your inputs in application/x-www-form-urlencoded format.
- The ability to parse and use JSON responses.
The demo uses WinHttp for the first bullet, and provides code for the other two.
You need VB6 of course. Then you need an OS that has WinHttp 5.1, such as Windows Vista or later. If you have Win2K SP3 or WinXP SP1 and have installed the updates that added WinHttp 5.1 to those OSs then that works too. However Microsoft Downloads no longer hosts those updates. If desperate enough you might consider using MSXML.XmlHttpRequest instead. Version 3.0 of MSXML is available all the way back to Windows 95, and should be good enough for this.
You also need an account at Lob.com, but you do not need to associate a payment method with your account if you are just going to use Address Verification. I suspect they are fine with this because they already need the database to support their paid services, so providing this "for free" only imposes minimal costs and serves to drive more buisiness to their paid services. Most people needing Address Verification would be likely enough to benefit from those other services anyway.
So "Thanks Lob.com!"
Testing VerifyAddr.vbp
This is a simple VB6 project. Just unzip the attached archive into a folder.
Then you must apply for an account at Lob.com and get your "Test API Key" which you should put into a test file named Creds.txt which VerifyAddr will open and read the Key from as the first line of text.
As far as I can tell these "Test Keys" are all that are ever used to perform Address Verification unless you apply for what Lob.com calls "reserved pricing."
Test run
Here I put in an address for a street that I know got renamed within the last 20 years or so. Sure enough Lob.com corrected it.
This demo program accepts input fields, makes the request, then it dumps the raw (ok, slightly cooked) JSON text for viewing and also parses the JSON and extracts data elements for viewing.
Obviously a real program would be doing something else such as pulling addresses from a database and updating them with the verified results if successful - and logging problems encountered when not successful so that a human could take action.
Quote:
If there is only a partial match and more information is required (e.g. Apt#, etc), a message string with more information will also be returned.