Rate Limits and API Usage Guidelines

Introduction

The Ordermentum API enforces rate limits to ensure fair usage and maintain server performance. Understanding and managing these limits is essential to prevent disruptions to your integration. This guide outlines the rate limits for key endpoints, how to handle rate limit errors, and best practices for optimizing your API usage.

Rate Limits for Key Endpoints

Each API endpoint has specific rate limits defined by the number of requests allowed within a time period (in seconds). If you exceed these limits, the API will return a 429 Too Many Requests error.

Endpoint Limits

EndpointLimitPeriod (s)
Individual Order Fetch2460
ordersSearchV24060
ordersCreate1260
purchasersRead4060
purchasersUpdate2060
productSearch4060
productDestroy2060
productUpdate2060
productRead4060

Handling Rate Limit Errors

If your integration exceeds the rate limit, the API will return a 429 Too Many Requests response with a Retry-After header indicating how long to wait before making another request.

Example Response:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 60

What to Do When You Hit a Rate Limit

Check the Retry-After Header:
Pause your requests for the duration specified in the Retry-After header.

Implement Exponential Backoff:
If you hit rate limits repeatedly, implement an exponential backoff strategy where the wait time increases with each subsequent error.

Best Practices for Managing Rate Limits

Use Webhooks Where Possible
Instead of polling the API for updates, register for webhooks to receive real-time event notifications (such as order creation or updates).

👉 See Registering Webhooks for Order Events for more details.

Optimize Your Queries

Use the /v2/orders endpoint for bulk retrieval of summary data.
Only call /v1/orders/{id} for detailed order information when necessary.

Batch Your API Calls
If you need to make multiple updates or queries, batch them into fewer API calls where possible.

Cache Frequent Responses
Avoid repetitive API calls by caching data where possible. For example, cache product or purchaser details that don't change frequently.

Monitor Your API Usage
Regularly monitor your API usage patterns to ensure you're staying within rate limits. Adjust your integration if you notice high volumes of unnecessary requests.