> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wizcommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Rate limits

> This API uses a rate-limiting mechanism based on a **sliding window** strategy. Each API key is allowed up to **500 requests per minute**. When an API key exceeds this limit, further requests will be denied until the rate limit resets.

## Rate Limiting Headers

In every API response, the following rate-limiting headers will be included to inform you of your current usage:

| **Header**              | **Description**                                                                               |
| ----------------------- | --------------------------------------------------------------------------------------------- |
| `X-Ratelimit-Limit`     | The maximum number of requests allowed in a given time window (120 requests).                 |
| `X-Ratelimit-Remaining` | The number of requests remaining in the current time window.                                  |
| `X-Ratelimit-Reset`     | The time (in seconds) until the rate limit resets, indicating when the counter will be reset. |

### Example Response Headers:

For example, after making 50 requests in the current time window, the headers would look like this:

```http theme={null}
X-Ratelimit-Limit: 120
X-Ratelimit-Remaining: 70
X-Ratelimit-Reset: 45
```

* **X-Ratelimit-Limit:** 120 — You can make up to 120 requests per minute.
* **X-Ratelimit-Remaining:** 70 — You have 70 requests left in the current minute.
* **X-Ratelimit-Reset:** 45 — The rate limit will reset in 45 seconds.

## Rate Limiting - What You Receive When Hitting the Limit

When you exceed the allowed rate limit for your API key (120 requests per minute), the API will respond with a **429 Too Many Requests** HTTP status code. In addition to the status code, the response will contain the following information:

## HTTP Response

```http theme={null}
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
```

## Best practices

### Handling Rate Limiting

To handle rate limiting gracefully:

* Always check the X-Ratelimit-Remaining header to determine how many requests are left before you hit the limit.
* Use the X-Ratelimit-Reset header to determine when your limit will reset and plan accordingly.
* Implement retries with backoff strategies if you hit the rate limit. For example, retry after the reset time specified in X-Ratelimit-Reset.
