Skip to main content

Rate Limit

Each endpoint at seller api have rate limit to ensure our system stability. User can navigate into header response to retrieve current rate limit that applied into endpoint. Our endpoint will show http status code 429 if user already reach rate limit.

Example request with header response

curl -I -X GET '' 
--header 'Authorization: Bearer c:zowIz-u4R26JRHVFdc72PQ'

Example header response

HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: sonic_access_token, sid_intools, Authorization, Origin, Referer, User-Agent, Content-Type
Access-Control-Allow-Methods: GET, POST, DELETE, PATCH, PUT, OPTIONS
Content-Type: application/json
X-Ratelimit-Full-Reset-After: 0.200000
X-Ratelimit-Limit: 5 req/s (burst 5)
X-Ratelimit-Remaining: 3
X-Ratelimit-Reset-After: -0.000000
Date: Tue, 23 Mar 2021 03:07:41 GMT
Transfer-Encoding: chunked

From above response, we can see all rate limit information with words begining with X-Ratelimit. Below are the detail explanation :

Current rate limit applied to the relevant endpoint
Remaining rate limit for the relevant endpoint that user can use to access our endpoint before get http status code 429
Time remaining to regain 1 request to access our endpoint without get http status code 429. If user still have remaining rate limit, this value will always show -0.000000. Time format are in seconds
Time remaining to regain full request to access our endpoint without get http status code 429. Time format are in seconds