Wake up, USPS
Our latest shipping integration at work is near nirvana: you place a package on a scale, scan the barcode (the shipping program itself doesn’t even need to be focused!), choose the box type, and press enter. Then a label comes shooting out of the label printer, and maybe some customs forms documents, too.
Behind that magic <ENTER> press, though, a lot of magic is happening behind the scenes:
- I call our payment processing service to cleanse the address into a format suitable for mailing.
- I call the FedEx Web service to determine if the address is residential or commercial.
- If standard shipping, I call the USPS XML API, FedEx SOAP API, and UPS XML APIs simultaneously to find the cheapest rate and best transit time.
- I call the FedEx or UPS API directly to print a shipping label immediately OR invoke a Stamps.com COM object to pop up an extra dialog, which the user then presses enter to spit out the label interminably slowly.
It’s the last part that has been the bane of my existence. USPS does not offer any online mechanism to print postage-paid shipping labels in an automated fashion. You get to choose between Endicia and Stamps.com. While Endicia has an XML API that functions nearly identically to those offered by UPS and FedEx, it’s ridiculously expensive, and Stamps.com has no such API. Instead, I have to interact with a COM object that is popping up dialogs and forcing the warehouse worker to worry about buying postage when it runs low.
To add insult to injury, Stamps.com doesn’t understand EPL2 and instead sends its labels as gigantic GDI documents to the label printer, giving us print times of nearly 15 seconds for a 4″ x 6″ label when going over parallel. Compare to less than 2 seconds for a label sent as an EPL2 document. But Stamps.com is cheap.
And there are no alternatives.
Sure, FedEx has SmartPost and FIMS and UPS has Mail Innovations. These are services where we would put our non-postage paid parcels into a trash bag that FedEx or UPS would pick up, sort, route through their system to a post office near the parcel’s final destination, and affix postage there and let it enter the USPS system by mailing it for us at the “last mile post office.” But Mail Innovations is worthless (a statistically significant number of our packages shipped through Mail Innovations to Canada were tampered with), FIMS is mind-boggingly slow (up to 60 days to send a package to Finland, and FedEx reps seem to have no idea that it is actually taking that long for their service to actually work), and SmartPost is expensive unless you’re talking enterprise-level volumes, which I am not. Plus, if a package disappears, there’s plenty of finger pointing, trust me.
And sure, there’s Click-N-Ship at the USPS’s Web site. But Click-N-Ship provides zero integration capabilities and as such is useless when you’re talking more than, say, 3 packages per day. It prints lots of instructions that you just end up throwing away, uses PDF for label output (so you can’t really automate printing unless you want to rig up a harebrained routing-through-Ghostscript scheme), and is really intended for home users.
There’s permit imprint, which would work if we were mailing 200 identically weighted parcel post packages, but that is never going to happen. Some widgets are bigger than others.
And sure, there’s that moronic new commercial where they show the USPS employees touting the simplicity of the new priority mail flat-rate boxes for businesses. You still have to stamp them–that’s half my problem. And using a flat rate box means that you’re throwing money away a good 50% of the time. We’re not stupid. It does not cost $9.85 to send a 12″ x 9″ x 6″ box from Virginia to North Carolina. And where’s my delivery confirmation barcode? I’ll have to affix that too and record the number–how is this saving me any time? I want to throw my remote at the TV every time this commercial comes on.
So, I don’t understand why the post office doesn’t offer a postage Web service like UPS’s or FedEx’s XML shipping services, unless it’s just too much competition with their own licensees. The Visa business model does not make sense for everyone.
I don’t understand why the post office doesn’t sell laser printer versions of its CN-22 and CP-72 customs forms. We had to have our own specially made, and use the USPS’s API to generate the actual form. (More on this later.)
I don’t understand why the USPS has an address verification API available through their Web tools but doesn’t let anybody use it. (By anybody, I mean that only non-profits can use it. Not even local governments can use it.) Shouldn’t it be an obvious service to help customers verify that they’re shipping to a valid address? Well, perhaps I do understand, because there’s lots of money to be made selling CASS certification to vendors who then can charge ridiculously high fees for what is, at its core, just a giant database table that gets updated once a month. By giant, I mean it fits on a CD-ROM. CASS is beyond stupid.
I don’t understand why the USPS doesn’t get its act together and offer business accounts for its Priority mail and higher services. With the USPS, indicia is like currency: a misprinted label means you lose money, whereas with FedEx and UPS, a misprinted label means you throw it in the trash. But far, far more importantly, this means that businesses can’t leverage the “float” when using USPS: the shipping cost is incurred immediately instead of on net 30 terms.
I don’t understand why the USPS doesn’t allow scheduling a daily pickup for businesses. Sure, there’s the insane carrier request API, which we use, and have to remember to update every few months until we max out the pickup requests again. But it’s particularly insane that it requests the number of packages that will be picked up and that mail carriers treat this as some sort of contractual obligation. I am setting a date in the future–I can give you an estimated average, but please don’t complain when I have 90 packages instead of 50. I can’t see the future to know how many orders we will have to process that morning.
I don’t understand why the ICCC is staffed by weasels. When an API is not on your test server but you require us to test against the requested API on the test server before getting access to the production server, then something is really wrong, and someone at the USPS needs to be fired. Right now.
If anyone at the post office is listening, one of the greatest barriers to using the post office directly is a lack of integration points. Quit moaning about the number of parcels dropping and make it easier to actually ship packages, and maybe we’ll be more apt to use it.
Update 11/11/2009: See my comment below for more detailed information since this post was written.
Right on!
p.s. I use Endicia. :-)
We’re moving to DHL global mail, which is kind of like the other options you mentioned, but UPS’s option ends at 15.99 oz, whereas you can use DHL global mail’s up to 15 lbs (though its more expensive than priority mail over 4 lbs). We still have to use stamps.com for priority mail stuff (though DHL offers an expedited service, which seems to be speed comparable so we may phase this out). I totally agree with you though, I think the USPS is really shooting themselves in the foot over this. My guess is that pitney bowes has some semi-exclusive contract. I have heard that stamps.com uses pitney-bowes behind the scenes so that seems to back up that premise. Anyway if you ship at least $100/day in postage check out DHL global mail (if you do less than $100/day they still charge you $100!).
Maybe, I’m not understanding exactly what you mean, but it appears to me that USPS does offer an online mechanism for printing postage paid shipping labels in an automated fashion. I just finished implementing it for my company. The way it works is you build an XML request document containing the To and From address information, send it via HTTPS to USPS’s secure server. The server then responds with an XML document that contains a tracking number and a base64 encoded PDF label which contains a barcode and the “cleansed” To and From addresses. This can just be printed and stuck onto the package.
Here is a page on the USPS website describing it:
http://www.usps.com/webtools/htm/Delivery-Confirmation1.htm#_Toc82941504
@Ken
That label doesn’t have postage on it; it’s everything but the indicia, the 95% solution.
I think I get it. It is the postage-paid part I missed. That IS a problem if you are trying to find the cheapest carrier. It doesn’t seem like a problem if you don’t mind being charged on delivery. Am I missing something?
@Ken
I would respectfully submit that it would be fairly insane for an e-commerce store to send all of its hundreds of parcels to its customers as collect on delivery. Additionally, COD has a significant added cost, starting at $5.50 on top of the computed postage amount.
Just dropping a parcel with the delivery confirmation barcode on it simply would not work: the parcel would be returned to you for insufficient postage, or the customer would have to pay for the postage to retrieve the parcel.
You just made me realize that I have wasted my time with USPS. We can’t make our dropshippers do the footwork of dealing with postage…. Ugh.
@Ken
Welcome to my world :)
Wow, that is a depressing state of affairs…
What is even more depressing is that the USPS can’t go out of business for sucking so bad… even if people switch in droves to FedEx or UPS.
I’m in the same boat as you now, working for a client that wishes to streamline their shipping operations. UPS and FedEx offer an excellent API for generating “real” labels ready for pickup, but the USPS API is sorely lacking the critical part of the label — the “postage” section.
I am considering several possibilities:
1) Getting a developer account with Endicia to use their Label Server XML API. If the cost is minimal for this, I plan to extract just the “postage” portion of the label and merge this with the TIFF image of the label from the USPS API, thus allowing me to generate the complete label.
2) Writing some scripts to utilize the USPS “Click-N-Ship” service behind the scenes. I believe some careful use of cURL and similar HTTP libraries can allow my PHP script to log into their service, generate a label, then grab the resulting image and funnel it back to my own server for processing/printing.
3) Seeing what licensing agreements are needed to become a USPS partner, similar to an Endicia or Pitney Bowes. I have a sneaking suspicion this is going to be either a) cost prohibitive, or b) too much hassle with forms and agreements and such to make it worthwhile.
Has anyone found a better way since the original post was written?
@Jason
I kept meaning to type a follow-up post to this. I suppose it will have to be a long follow-up comment!
Since I wrote the post, I ended up going with the Endicia Label Server. After some negotiations, we got the price down to a reasonable monthly fee. Unfortunately, the rather Byzantine terms of their partner agreement prevents me from disclosing the exact costs, but trust me, it is on par with some of their premium Dazzle offerings.
For me, the API was worth its weight in gold for the ability to print the FCMI-2976 form, which combines postage and a CN-22 into one label for First Class Mail International shipments. It also gave us the ability to maintain multiple postage accounts, one provided by each of the merchants that we ship for, so we are no longer footing the bill for their postage.
The Endicia “please contact us so we can figure out how much you are worth so we can charge you a rate accordingly” sales model is annoying, and there was a long term commitment involved, but it was essentially my only alternative at the time. And this path is still my recommended route for people to take.
(Note that if you go with the Endicia Label Server, there is no need to use any USPS API–the label server returns a complete EPL2 or PNG document. I spit it out of the label printer, slap it on the package, and I’m done.)
Supposedly, since this transpired, Stamps.com is currently beta testing a SOAP API that is similar to the Endicia API. I’ve just heard this through the grapevine from a previous commenter a few weeks ago. With Stamps.com, however, I’ll believe it when I see it. Still, it might be worth a shot to contact their team.
Sometime last week, an employee at a new API division at the USPS called me to tell me how true my little rant here was, and he did mention that there is a way to print postage-paid labels with the USPS delivery confirmation API, so I must correct my comments that appear above.
The mechanism involves what the USPS refers to as “manifest mailing.” You would use the USPS Delivery Confirmation API, supposedly with some special parameter, and the label would print out with a “Permit Paid” indicator where the indicia would typically go. You would also supply a manifest with each pickup that details the exact weight and postage amount for each parcel in the shipping bag that you give to your postal carrier.
The reason you didn’t know about this option is because it appears nowhere in the online USPS documentation. The USPS representative admitted that was a bit of problem but seemed resigned that it was something that could not be fixed in the short term.
Manifest mailing does require special permission from your local postmaster. The problem is that the people at the ICCC (the API people) don’t know what manifest mailing is and your local postmaster doesn’t know what the ICCC and an API are. You also have to be committed to generating and tracking these manifest documents with each pickup. It’s an intriguing solution, but I would be hesitant to try it.
As an aside, the USPS representative also indicated the address verification API provided by USPS was, for a time, provided free of charge to everyone. Unfortunately, several companies in the address verification / CASS-certified software industry threw a hissy fit, and, being a quasi-government-run monopoly, the USPS was forced to allow competition and restrict the use of its API. Why they don’t actually say this directly on the USPS Web site instead of making you answer a questionnaire that is always denied three days later no matter which option you choose, well, I don’t know.
Another option is to re-explore FedEx SmartPost. FedEx has finally started integrating SmartPost into the Ground network, so if you have a regular Ground pickup, you may be able to start using SmartPost as a viable USPS alternative for small businesses. The SmartPost/Ground integration is not available for everybody, however, and requires special permission from your FedEx account representative, so give them a call.
So, there you have it. (1) Talk to Endicia, they’re desperate for business in this economy and are giving good rates. (2) Don’t like that? See if Stamps.com has finished their API yet. (3) No luck there? Explore the manifest mailing option.
Good luck!
Nicholas,
Thanks for the excellent info. The Endicia solution is looking better now, especially since my client is already a customer. I just hate having to involve a 3rd party like that when the direct connection to the USPS _almost_ works.
I just checked and apparently Stamps.com has an API available here:
http://www.stamps.com/pdk/
@Jason
The PDK is the COM object referenced above. We used it for years and it is fine for low volume, but it tosses up UI and does not work for APO or FCMI. I needed a solution that I could use without any user input.
@Nicholas Piasecki
I looked into the manifest mailing aka permit imprint. Looks like you must have at least 200 identically weighted items or 50lbs to use this system. You are also required to keep a debit style account continually funded with the USPS. It also has a $185, one time fee… *sigh*
@Jeff
Yeah, the guy made it sound like manifest mailing was different from permit imprint, but they sure sounded the same to me, too. Give Endicia or Stamps (now that they have a Web-based API, though I haven’t used it so I can’t vouch for it) a call.
The Endicia API is a little strange in spots, particularly for international shipments, but that seems to more a result of the USPS than anything that Endicia has done wrong.
@Nicholas
Thanks for the insightful work on this subject. You’ve confirmed what I’ve been nervously thinking. I’m guessing Endicia or possibly Stamps.com is the only way to go.
I had a nightmare last Christmas using their software with a printer that wouldn’t print right and it took me until March to get the “Balance” of my account (which I had cancelled after the free trial) returned. Not to mention they put me on “auto-dial” for another 3 months after that with all sorts of great offers to come back…Gag.
I had called USPS’s API support (if you can call it that) and after explaining: I understood I wasn’t going to be able “pay” for label using web tools, I asked how I would become an “provider” like Endicia or Stamps.com, he said he had no idea how that happened.
Asking if he knew anyone to call or email with that sort of information he said: “Nope”.
No wonder they loose $8,000,000,000 a year…
I like some of the ideas people have had about using their service (Web tools) combined with a little pulling and mashing of postage from another service like “Click-and-Ship”, I’ll keep watching the conversation and report any new findings.
Oh P.S., forgot to mention, add “Pitney Bowes” the “Meter/scale” maker to your list of racket members, for their Paypal integration, which produces postage paid labels.
I mean, USPS is a private corporation (cough cough), I guess they can sell to whomever they want right? And tell the rest of people to go buy it from them!
Hi Nicholas,
Great post! We deal with many of the same issues. For our Dazzle integration, we built a client that constructs shipping xml and opens a shell to feed the xml into Dazzle. The tricky part is the recording of the response xml into our system. Would love to use the Label Server, which should be a lot faster than our way, but as far as I know it’s quite expensive. You had mentioned that it’s on par with the cost of Dazzle. The most expensive version of Dazzle is $34.95 a month, and I don’t think the Label Server is anywhere as low as that unless you have very low volume.
I am wondering however, how do you print the customs forms for International Priority / Express Mail with the Label Server? Can you print to thermal printers, or do you still need to use regular paper and regular laser jet?
Also, I am curious as to why you use your payment processor to verify mailing addresses (I didn’t even know that there are payment processors that can do that) if you are already using Fedex WebService to check for residential / business address. Don’t you already get the ‘verified address’ returned from Fedex?
Thanks.
We’re moving from Dazzle to Endicia Rate Server for our back-end shipping application, and looked into Stamps.com to compare. Turns out they don’t charge per label, plus you can fund your account via credit card (and take advantage of rewards).
Haven’t tested their API yet, though the documentation is good.
“We’re the government. We don’t have to give a shit if our services suck and our APIs don’t work. Don’t like it? Sit down and shut the fuck up!”
I’m currently using stamps.com to do all of what you’re having problems with.
We do automated APO shipments, it returns 6 images (most of that is the CP-72) in PNGs format that I print on 4 8.5×11 pages. This covers APO, Puerto Rico & Guam for us, along with light packages. They also support outputting in ZPL, which works fine for our thermal label printers. You can buy cheap zebra 450′s from ebay, and buy a few spares, and they’ll print labels in bulk at roughly 1 a second. There are other output formats available, but that worked out perfectly for me.
My only problem is their server relibility has been a little off. About 1% of the time I have problems with it, and it spits back an error about their servers being down. If I make the same request a few seconds later, it magically works.