Parseo

Rate Limit Exceeded

How to handle 429 Too Many Requests responses.

Overview

The Parseo API enforces per-API-key rate limits. When a limit is exceeded, the API returns:

HTTP/1.1 429 Too Many Requests
Retry-After: 42
Content-Type: application/problem+json
{
  "code": "rate_limit.exceeded",
  "message": "Rate limit exceeded. Please retry after the indicated period.",
  "statusCode": 429
}

Limits

WindowLimit
Per minute60 requests
Per hour1 000 requests

Handling 429 responses

Read the Retry-After header (value in seconds) and wait before retrying:

async function callWithRetry(requestFn, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await requestFn();
    if (response.status !== 429) return response;

    const retryAfter = parseInt(response.headers.get('Retry-After') ?? '60', 10);
    await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
  }
  throw new Error('Max retries exceeded');
}

Best practices

  • Use idempotency keys when uploading invoices — safe retries without creating duplicates.
  • Process files serially or with low concurrency during bulk uploads to stay within the per-minute limit.
  • Cache GET responses where freshness allows — especially for invoices in terminal states (completed, failed), which never change.

On this page