Buy Stamps from Your Command Line
blog.geteasypost.com
blog.geteasypost.com
Thanks for the awesome work, Nick!
Also - shameless plug - I myself am working on an actually-usable python UPS library (with a real quickstart and example code and everything!) It is surprising how weak open-source library support is for this kind of thing, which is tedious, but not alltogether insurmountable. https://github.com/classicspecs/ClassicUPS
Is the rate you're basing the ~5% on commercial base, commercial plus, GEPS? There are other consolidators that will offer those prices (Express1 for example). And while they are more work to integrate, the long term savings can be enormous.
check it out here https://geteasypost.com/docs
Your service is doing more than simple verification. Verification by its nature would result in a boolean. Your service is suggesting a better address (which is what I'd call normalization). e.g.
curl https://www.geteasypost.com/api/address/verify \
-u cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi: \
-d 'address[street1]=388 Townshende Ave' \
-d 'address[street2]=Unit 20' \
-d 'address[city]=San Francisco' \
-d 'address[state]=CA' \
-d 'address[zip]=94107'
yields: {"address":{"street1":"388 TOWNSEND ST APT 20","city":"SAN FRANCISCO","state":"CA","zip":"94107"}}
Anyhow, semantics aside, are you going to make it fuzzier or this is based entirely on USPS' api? "388 Townsend San Fran"
Would yield the same as above. Addresses are inherently dirty data and there aren't any decent/affordable/legal services that offer this. You can use Google Maps Geocoder or Yahoo Placefinder but both have fairly strict quotas and are only intended (legally speaking) for use with their mapping products. USPS/FedEx/UPS are also restricted unless you're shipping with them.Edit - Yahoo is actually letting people pay very respectable rates for their PlaceFinder service now. This is great: http://developer.yahoo.com/boss/geo/
1) They are abusing the USPS api and charging access for it.
2) The USPS resolver sucks anyhow. "388 Townsend San Fran" yields an error. Google & Yahoo both correctly match it.
3) Their pricing is pretty expensive, imo.
Just got the email from your blog post. What's the preferred method of printing first class labels/postage generated via your API?
http://www.amazon.com/DYMO-LabelWriter-4XL-Label-Printer/dp/...
UPS and Fedex's APIs allow you to specify a label size as input, and they return a base64-encoded EPL file as output. You can then take that file and send it to your printer.
This works fairly well with CUPS, which is how I've automated our shipping (just make sure you use `lpr -o raw` so that it treats that EPL file as raw input. Otherwise, the printer sometimes prints the label as an ASCII file.)
I'm unsure about the USPS api - but I would argue that most high-volume shippers do not use the USPS, due to lower-quality detailed tracking info.
When you print out the shipping label on paper and tape it to the box, you are using the courier's api's "GIF" or "PDF" feature, where it returns the label in one of those formats. This is great, but in my experience, it is pretty hard getting them to print properly on your label printer.
Finally - and not a lot of people know this - UPS and Fedex will give you a label printer, and labels, for free! If you have high volume (unsure of the threshold) then you should call to negotiate your rate and have them bring you hardware (and set up your computer) for shipping.
[1] http://en.wikipedia.org/wiki/Eltron_Programming_Language
And Dwolla already has one: https://www.dwolla.com/developers