Biteship provides a reliable and flexible API service for managing shipments. To maintain the performance and stability of the service, Biteship enforces rate limits on API usage in both production and sandbox environments. Rate limits refer to the maximum number of requests that can be sent within a specific time frame. Understanding these limits is important to ensure your application functions smoothly without interruptions while optimizing the user experience.
What Is Rate Limit?
Rate limit is a restriction on the number of API requests that can be sent within a certain period. This limitation is applied to prevent server overload, ensure stable response times, and maintain service quality.
Rate Limits on Biteship API
Production Environment
| API | Production |
| Maps | 50 requests per second |
| Rates | 20 requests per second |
| Location | 10 requests per second |
| Order | 20 requests per second |
| Tracking | 50 requests per second |
| Draft Order | 20 requests per second |
| Courier | 10 requests per second |
Sandbox Environment
| API | Sandbox |
| Maps | 5 requests per second |
| Rates | 5 requests per second |
| Location | 5 requests per second |
| Order | 5 requests per second |
| Tracking | 5 requests per second |
| Draft Order | 5 requests per second |
| Courier | 5 requests per second |
API Rate Limit in the Sandbox Environment
The sandbox environment is a place for developers to test API features and integrations before launching them in the production environment. The sandbox provides a safe space for simulations without affecting production data.
• Purpose: API integration testing, data verification, and shipment flow simulation.
• Sandbox Rate Limit: Rate limits in the sandbox environment are usually stricter than in production to reduce load on test servers and monitor uncontrolled testing.
• Example Limit: 100 requests per minute.
• Note: These rate limits may vary depending on testing needs and current policies. Users exceeding the rate limit will receive a 429 Too Many Requests response.
Tips for Optimal Usage in Sandbox:
• Batch Requests: Try sending requests gradually rather than in large bursts.
• Log Testing Activities: Keep a record of your testing activities to avoid unnecessary repeated requests.
• Optimize Testing: Focus testing on important endpoints and simulate real-world scenarios.
API Rate Limit in the Production Environment
The production environment is where you run real operations with live data. Here, you manage shipments, orders, tracking, and other features to serve your customers.
• Purpose: Managing actual shipments, tracking, and other operational services.
• Production Rate Limit: Rate limits in production are generally more lenient than in sandbox to support higher transaction volumes.
• Example Limit: 1000 requests per minute.
• 429 Response: If you exceed the limit, you will receive a 429 Too Many Requests response. To avoid this error, consider implementing retry mechanisms or resend logic.
Tips for Optimal Usage in Production:
• Cache Frequently Used Data: Reducing repeated requests for data that does not change often can help avoid excessive rate limit usage.
• Use Retry Logic: Implement retry mechanisms with delay if you receive a 429 response to ensure smooth operations.
• Monitor API Usage: Use logs or monitoring tools to track API usage in real-time.
Managing and Optimizing Rate Limits
1. Optimize Requests: Only send requests that are truly necessary and combine requests when possible.
2. Use Webhooks for Notifications: Instead of relying on continuous data polling, use Biteship’s webhook feature to receive real-time notifications when there are status changes.
3. Consult Support: If you frequently encounter rate limit restrictions, contact Biteship support at support@biteship.com to discuss your specific needs.
Frequently Asked Questions
• What Happens If I Exceed the Rate Limit?
If you exceed the rate limit, the server will return a 429 Too Many Requests response. Wait a moment before resending your request.
• Is the Rate Limit Different for Each User?
Rate limits may vary depending on account type or specific agreements with Biteship.
• How Can I Monitor API Usage?
You can monitor API usage through request logs in your application or use third-party API monitoring tools for more detailed analysis.
If you have further questions, please contact support@biteship.com.