
Developer Guide: Integrating API Rate Limiting into Your E-commerce Stack
Build a more robust shipping workflow. A technical deep dive into implementing API Rate Limiting for high-performance logistics.

Shipping API Rate Limits: What Every Developer Hits (and How to Fix It)
You've built your multi-carrier integration, it works great in testing, and then Black Friday hits. Suddenly UPS returns 429 errors, FedEx throttles your label generation, and your rate shopping takes 12 seconds instead of 2. Every major carrier API has rate limits — and they're all different.
Carrier Rate Limits You Need to Know
| Carrier | Rate Limit | Window | Burst Allowed |
|---|---|---|---|
| USPS (Web Tools) | 5 requests/second | Per API key | No |
| FedEx REST | 500 requests/second | Per account | Yes (short bursts) |
| UPS | 20 requests/second | Per access key | No |
| EasyPost | Varies by plan | Per API key | Yes |
| Shippo | 100 requests/second | Per token | Yes |
The Token Bucket Pattern
Don't just catch 429 errors and retry. Implement client-side rate limiting so you never hit the wall. Create a rate limiter class that tracks available tokens, refills them at the carrier's allowed rate, and makes callers wait when tokens run out. For USPS, set 5 tokens refilling at 5 per second. For UPS, 20 tokens at 20 per second.
Batch Label Generation
Instead of creating labels one-by-one (which burns rate limit fast), batch them:
This turns 200 individual API calls into 3-4 batch requests.
Handling 429 Responses
When you do get rate-limited, respect the Retry-After header. Some carriers include it, others don't. If present, wait that many seconds. If not, use exponential backoff capped at 30 seconds.
Peak Season Strategy
During November-December, carrier APIs get slower and stricter. Pre-generate labels during off-peak hours (2-6 AM EST), cache rate quotes for 15-minute windows, and have a fallback carrier ready if your primary throttles you.
Compare USPS, UPS & FedEx rates instantly with atoship — 100% free.
Try FreeSave up to 89% on shipping labels
Compare USPS, UPS, and FedEx rates side by side. Get commercial pricing with no monthly fees, no contracts, and no markup.




