Rate Limits

All ComToHome API services have specific rate limits per request to protect system resources and ensure fair usage policy.

Rate Limit Policies

The following limits apply to API requests based on different endpoints:

Category Limit Duration Description
API Key 300 requests 1 minute Default limit for general API requests
Consignment Query Services 6,000 requests 1 minute Consignment query endpoints

Sliding Window: All rate limits are applied using a "sliding window" policy. This means the total number of requests within the last 1 minute is continuously calculated.


Exceeding Limits

When the specified limit is exceeded:

  • API returns 429 Too Many Requests response
  • Client must wait until the rate limit resets
  • X-RateLimit-Reset header indicates how many seconds until requests can be made again

Limit Tracking

Information about request limits can be accessed through HTTP response headers:

Header Name Description
X-RateLimit-Limit Indicates the maximum number of requests allowed
X-RateLimit-Remaining Number of remaining requests available in the current time window
X-RateLimit-Reset Time to wait until rate limit resets (seconds). 0 if limit is not exceeded

Example Header Values

Normal Status

X-RateLimit-Limit: 300
X-RateLimit-Remaining: 298
X-RateLimit-Reset: 0

Limit Exceeded Status

HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 45

In this example, the user has exceeded their limit and can make requests again after 45 seconds.