Yellow Shipping CFC

Use Yellow for shipping? I'm working with a client who wants to use Yellow for shipping. They were interested in cutting costs a bit - so I wrote the Yellow integration for free in exchange for being able to open source it. Personally I've never even heard of Yellow before this project, so I don't think many people will use this, but I've attached the CFC I created to this blog entry. No docs or anything fancy like that. The CFC basically just pings their service and parses the response into a simple structure.

There was one interesting tidbit to this code. When I hit their service I get a nice XML packet back. In some cases the zip you send may not be enough. Their service will respond by asking you to pick a particular city to narrow down the request. What is odd is that their response - in XML - is a set of HTML. For example:

<INPUT%20TYPE=HIDDEN%20NAME="shprZipForCities"%20VALUE="05495"%20>Origin%20City<select%20name="shprCities"%20size="1"><option%20value="ST%20GEORGE">ST%20GEORGE</option><option%20value="WILLISTON">WILLISTON</option></select>

I look for this response and parse out the cities so the error message can be checked. Probably not the most elegant solution, but it works.

Download attached file.

I write these posts for free — if they're useful to you, you can buy me a coffee. It helps more than you'd think.

Archived Comments

Comment 1 by Ian posted on 11/27/2007 at 10:43 AM

We get shipments from Yellow Freight occasionally but never ship enough back out to use them otherwise.

Comment 2 by bob posted on 11/27/2007 at 5:13 PM

so now for shipping you can go brown or yellow. There is a joke in there somewhere....

Comment 3 by Ben B posted on 11/27/2007 at 6:29 PM

I've never sent or received anything via Yellow; but I've seen their trucks and have always wondered why they are painted ORANGE!