Overview
Terminal49 API implements rate limiting to ensure fair usage and maintain service quality for all users.Rate Limit Details
- Limit: 100 requests per minute per account
- Scope: Applied per API key/account
- Window: Rolling 60-second window
Rate Limit Response
When you exceed the rate limit, the API will return: HTTP Status Code:429 Too Many Requests
Response Headers:
Retry-After: Number of seconds to wait before making another request
Best Practices
1. Use Webhooks Instead of Polling
The most effective way to avoid rate limits is to use webhooks for real-time updates instead of repeatedly polling the API:- Configure webhooks to receive push notifications when shipment data changes
- Eliminates the need for frequent polling
- Provides instant updates without consuming your rate limit
- See the Webhooks section for setup instructions
2. Implement Exponential Backoff
If you receive a429 response:
- Check the
Retry-Afterheader - Wait for the specified number of seconds
- Implement exponential backoff for subsequent failures
- Don’t retry immediately, as this will consume your limit further
3. Batch Your Requests
- Use list endpoints with filtering instead of multiple individual requests
- Leverage the
includeparameter to fetch related resources in a single request - Cache responses when appropriate to reduce redundant calls
4. Monitor Your Usage
- Track your request patterns
- Identify and optimize high-frequency operations
- Consider spreading requests over time rather than bursting
Need a Higher Limit?
If your use case requires a higher rate limit:- Evaluate webhook usage first - Most polling use cases can be replaced with webhooks
- Contact support at support@terminal49.com
- Provide details about your use case and expected request volume
- Our team will work with you to find an appropriate solution
Example: Handling Rate Limits
Here’s an example of how to properly handle rate limit responses in Python:Tips for High-Volume Applications
If you’re building a high-volume application:- Design for webhooks from the start: Don’t rely on polling for data updates
- Implement request queuing: Spread your requests evenly across the rate limit window
- Use pagination efficiently: Fetch larger pages less frequently rather than small pages frequently
- Cache aggressively: Store and reuse data that doesn’t change frequently
- Monitor rate limit headers: Some APIs provide headers indicating remaining quota (check our response headers)