# Automating PDF-to-E-Invoice Conversion at Scale via API

Automate high-throughput PDF-to-e-invoice conversion, configure async polling, manage webhook events, and process multiple files programmatically.

## Key integration steps

- Acquire a production API key from the developer dashboard.
- Authenticate all requests using the Authorization header with a Bearer token.
- Send a POST request to /api/v1/convert with the PDF file and compliance profile parameters.
- Handle the asynchronous task response and poll for status or listen for webhooks.
- Retrieve the validated XRechnung, ZUGFeRD, or UBL XML output.

## Asynchronous polling and webhooks

Integrating e-invoicing compliance at scale requires migrating from manual file uploads to fully automated, asynchronous API workflows. Invoice Converter provides a high-performance backend optimized for high-throughput batch processing.

For high-throughput environments, we recommend an asynchronous integration. When you upload a PDF, the API immediately returns a 202 Accepted status with a unique task ID.

Your system can either query the task status endpoint at GET /api/v1/tasks/{id} every few seconds or register a webhook URL to receive an automatic POST notification as soon as the conversion is ready.

## Best practices for scale

- Always specify an explicit compliance profile, such as XRechnung or ZUGFeRD, to skip auto-detection delays.
- Implement exponential backoff when polling the task status to avoid unnecessary rate limits.
- Store the returned task UUIDs in your local database for easy tracing and audit logging.
- Enable webhook signature verification to ensure incoming events originate from Invoice Converter.
