It may be infeasible at massive scale, but many systems do it right now with approximation algorithms, heuristics, and integer programming. Fedex, Walmart, Amazon, and most other industrial or logistics corporations have teams of people with a background in discrete optimization or operations research building and improving similar systems.
I'm not aware of any public APIs for this at present.
I'm not aware of any public APIs for this at present.