Yesterday I complained about how much of a pain it was to get access to UPS's API service. Once I did get in - the docs weren't terribly helpful either. I was able to eventually find what I needed though early this morning. With that I'm happy to announce the initial release of the UPS Package (get it, UPS Package! I kill me).

Right now there are no docs and the only service I support is Address Verification. Obviously I will add to this. In order to use the code though you will need to go through the painful process I had to go through. I can say that once you do get your XML key and login info, it should work pretty easily. Here is a simple example:

<cfset av = createObject("component", "org.camden.ups.addressverification").init(application.key, application.username, application.password)>

<cfset results = av.addressVerification(city="Lafayette", state="LA",postalcode="70508")> <cfdump var="#results#">

By the way - the UPS documentation had a wonderful little gem about displaying a disclaimer in your code "from time to time". I kid you not. They want you to do it every now and then. Ahem. Well, I added a getDisclaimer() service to the CFC. Use it - um - from time to time.

You can download the zip by clicking Download below. As I said, you must have your own login and key. The avtest1.cfm file is not going to run out of the box until you set up the right application variables.

Download attached file.