Limitations

Rate Limiting

The Fenerum API uses rate limiting to ensure fair usage and maintain service quality for all users.

Rate Limits

The default rate limit is 60 requests per minute per API user.

Rate limits may vary based on your plan:

  • Default: 60 requests per minute
  • Custom: Higher limits available on request

Rate Limit Headers

When you exceed the rate limit, you'll receive a 429 Too Many Requests response with a Retry-After header:

HTTP/1.1 429 Too Many Requests
Retry-After: 42
HeaderDescription
Retry-AfterNumber of seconds to wait before making another request

The response body will include details about the throttling:

{
  "detail": "Request was throttled. Expected available in 42 seconds."
}

Best Practices

1. Respect Retry-After Header

When you receive a 429 response, use the Retry-After header value and add a small buffer:

import time

def make_request_with_retry(url, max_retries=3):
    for attempt in range(max_retries):
        response = requests.get(url, headers=headers)

        if response.status_code != 429:
            return response

        # Use Retry-After header value + 1 second buffer
        retry_after = int(response.headers.get('Retry-After', 60))
        time.sleep(retry_after + 1)

    return response

2. Batch Operations

Where possible, use batch endpoints to reduce the number of requests:

  • Create multiple draft invoice lines in a single request
  • Use filtering to retrieve only needed data

3. Cache Responses

Cache API responses when data doesn't change frequently:

  • Organization settings
  • Plan definitions
  • Product catalogs

Need Higher Limits?

Contact our support team if you need higher rate limits for your integration.

background logo

Vi fakturerer for mere end 2 millarder årligt for vores kunder. Skal vi hjælpe dig med at sætte din fakturering på autopilot?