ColdFusion UPS Package Released

I'm proud to announce the release of the ColdFusion UPS Package. This package will serve as a simple to use interface to the UPS services. Today the service includes address verification and shipment tracking.

Shipment tracking returns a lot of information. No, seriously, it returns everything you can imagine about a shipment. The API returns a pretty big struct, but it does make it easy to get the information at least. Here is an example:

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

<cfset results = st.getTrackingInformation('1Z12345E0291980793')> <cfdump var="#results#">

The package is 100% free and open source, so start hacking away at it and let me know if you find any bugs. (Please use the bug tracker at the RIAForge project.) As always - if you like it, visit my wishlist. (The poor thing has nothing purchased currently - so that can't be good!)

The next service I'll hit is the services and rates API.

Archived Comments

Comment 1 by Sami Hoda posted on 12/13/2006 at 8:03 AM

Does it check if the package tracking number is well formed?

Comment 2 by Raymond Camden posted on 12/13/2006 at 8:19 AM

Yes and no. It should return an error from the remote service that says the # isn't valid.

Comment 3 by shimju David posted on 12/13/2006 at 9:42 AM

Ray,

Can you please develop one for FedEx and another for USPS.
So our community have all the 3 most needed shipping solutions.

Comment 4 by Erwin Verdonk posted on 12/13/2006 at 10:25 AM

Ohh yeah Ray while you're add it, can you also add a DHL version? Free of charge of course! I mean you have nothing else to do with your life right? ;-)

Comment 5 by Jordan Clark posted on 12/13/2006 at 11:30 AM

Don't forget a Canada Post version for us up north 'eh!

Comment 6 by Jorrit Janszen posted on 12/13/2006 at 2:05 PM

Can I also track Santa's sleigh? ;-)

Comment 7 by Ben Forta posted on 12/13/2006 at 7:08 PM

Ray, careful with pricing info. Way back when I wrote a CFML custom tag that returned UPS pricing. It used an old API that UPS has exposed, and it worked very well. Then UPS created a new, far more powerful, XML based API. This one exposed way more information, and so I started to port my tag to use it. Then I received a rather nasty note from UPS saying that what I was doing was a violation of their rules for using the API, and to stop work on the tag. As per the rules back then, a developer could sign up to use the APIs, but was not allows to write codee that others could use to use their APIs. Each developer was required to obtain a license key that had to be embedded in API calls, and I was told that even if developers had to get their own key to put in there to use the tags that I'd still be in violation. My understanding is that what they did not want is to make it too easy to compare rates, or to easily access rate information. Regardless, I never updated that tag to use the new API. Things may have changed since then, but do look into this before proceeding.

--- Ben

Comment 8 by Raymond Camden posted on 12/13/2006 at 7:20 PM

Truly sad, Ben. Well, if I get a note, I'll remove it I guess. Seems rather silly if you ask me. Folks, download now while you can. I'm still going to build the code to get rate info. Even if UPS tells me now to share it, I'll have it for my own projects.

Comment 9 by James Moore posted on 12/13/2006 at 7:42 PM

Well I have already created one for USPS. If folks ready to pay $9.99, I will be ready to share it:)

Comment 10 by igoldc posted on 12/14/2006 at 9:39 AM

Don't forget a Canada Post version for us up north 'eh!

Comment 11 by Will Tomlinson posted on 12/14/2006 at 12:02 PM

oooh ooooh ooooh! I've been waiting for the tracking part!

I get a big fat check from a project at the end of the week. Then I'm hittin' your wishlist dude.

Thanks!

Will

Comment 12 by Raymond Camden posted on 12/14/2006 at 4:27 PM

igold - point me to an API and I'll consider it. :)

Comment 13 by Boyan Kostadinov posted on 12/14/2006 at 10:12 PM

I found a rather nifty tracking tool that you can use with ColdFusion through its RSS feed:

http://isnoop.net/tracking/
Details are here http://isnoop.net/blog/?p=19

I also wrote a quick implementation of it for a local user group. If anybody is interested, I would post it here.

Comment 14 by jason posted on 12/3/2008 at 4:50 AM

I know this is an old post, but does anyone know of a DHL rates script/tag for CF?

This whole DHL restructuring this has thrown us for a loop.

Thanks.

Comment 15 by Matthew Koch posted on 7/10/2010 at 10:33 PM

Hi Raymond

This package works great, even here in 2010. I am trying to add the <DeclaredValue> to the PackageServiceOptions and it does not thrown any errors, but it does not return a higher rate. Do you or anyone know why that is and/or is there an updated script that has this functionality working?

Thanks,
Matt

Comment 16 by Raymond Camden posted on 7/11/2010 at 2:31 AM

No idea. I'm actually working on the package now to improve the address verification process. The "support" from UPS is... not optimal and a bit frustrating. If I get through that I can try to look at this as well. (Do me a favor and remind me though - I promise you I will forget.)

Comment 17 by Matt posted on 7/23/2010 at 7:16 PM

So it may be early but it is 2 weeks later and I am doing you the favor of reminding you to check out the Declared Value tag while you are working on address verification in the UPS CFC!

Thanks
Matt

Comment 18 by Raymond Camden posted on 7/27/2010 at 8:33 PM

Got it working - will push today - if not - post CFUNITED.

Comment 19 by Raymond Camden posted on 7/27/2010 at 8:46 PM

Done and released: http://cfups.riaforge.org