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
Does it check if the package tracking number is well formed?
Yes and no. It should return an error from the remote service that says the # isn't valid.
Ray,
Can you please develop one for FedEx and another for USPS.
So our community have all the 3 most needed shipping solutions.
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? ;-)
Don't forget a Canada Post version for us up north 'eh!
Can I also track Santa's sleigh? ;-)
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
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.
Well I have already created one for USPS. If folks ready to pay $9.99, I will be ready to share it:)
Don't forget a Canada Post version for us up north 'eh!
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
igold - point me to an API and I'll consider it. :)
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.
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.
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
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.)
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
Got it working - will push today - if not - post CFUNITED.
Done and released: http://cfups.riaforge.org