Skip to content

Commit e1114b2

Browse files
authored
Pdc rate limiting docs (#303)
* Update rate_limiting.md Include details about the spike limit and potential 503s * Update rate_limiting.md
1 parent e1a7d8c commit e1114b2

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

api_essentials/rate_limiting.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,21 @@ X-Rate-Limit-Remaining: 3599
3535
X-Rate-Limit-Reset: 1466182244
3636
```
3737

38-
If you exceed a rate limit, you’ll receive a 429 status code. The headers will still be present, and the response body will include a message like this:
38+
### Types of Rate Limit Responses
39+
To ensure platform stability, we manage API traffic in three primary ways. When you are rate-limited, it's crucial to inspect the HTTP response code and headers to determine the correct course of action.
40+
41+
#### Hourly and Spike Limits (`429 Too Many Requests`)
42+
You will receive a `429 Too Many Requests` status code if you exceed either your **hourly request limit** or a shorter-term **spike limit** designed to prevent sudden bursts of traffic.
43+
44+
While the response body for both may state, *"You have surpassed the max number of requests for an hour. Please wait until your limit resets."*, this message can be triggered by either limit type.
45+
46+
**Best Practice:** To properly handle a `429` response, your application should inspect the **`X-Rate-Limit-Reset`** header. This header contains a UTC epoch timestamp indicating the exact time when your request allowance will be reset. You should pause making requests until after this time.
47+
48+
#### Heavy Load Throttling (`503 Service Unavailable`)
49+
In rare instances when the Procore platform is experiencing exceptionally heavy load, we may temporarily throttle traffic to maintain overall system health. In these situations, you will receive a `503 Service Unavailable` response.
50+
51+
This response indicates that while your request is valid, the service is currently unable to process it. To handle this, inspect the **`Retry-After`** header, which will specify the number of seconds you should wait before retrying the request.
3952

40-
```
41-
You have surpassed the max number of requests for an hour. Please wait until your limit resets.
42-
```
4353
<div class="details-bottom-spacing"></div>
4454
<div class="details-bottom-spacing"></div>
4555

0 commit comments

Comments
 (0)