Ask HN: Automated shipping calculations for a shopping cart

https://news.ycombinator.com/item?id=800927
by MicahWedemeyer • 17 years ago
5 2 17 years ago

I'm working on a marketplace app ( http://doleaf.com ) and we'd like to offer automated shipping quotes and shipping label printing, via the Fedex, UPS, and USPS web service APIs. It seems like a pretty simple requirement, and the APIs definitely support it, but I'm stumped. My source of confusion comes from algorithmically figuring out how many shipments/boxes will need to go out for each order, and calculating the correct shipping for each shipment.

For the most part, our sellers will be shipping plants. Only so many will fit in a single box, and for many, like trees, it's pretty much 1-1. So, if a buyer can order any number of plants in any combination, how do we calculate the correct number of boxes, the weight of each one, and so forth? There might be a way to do it, given a lot of info up front, but we're also trying to minimize the amount of work for sellers when they're adding a new item. Shipping weight might be reasonable to ask, but complicated dimensions and questions like "How big is the box you use to ship?" are probably asking for too much.

Am I making this a much harder problem than it actually is? I looked over the Fedex API docs and was instantly confused by the 1000s of different options and parameters. So, I'm coming here in the hopes that a fellow HN'er has dealt with this before. If there are any resources or howtos that you know of, please send them my way.

Related Stories

Loading related stories...

Source preview

news.ycombinator.com