Skip to main content

PDF Tools API

Rechnung PDF API

Bauen Sie Rechnungs-PDFs erzeugen in Backend, Stapelverarbeitung oder Produktabläufe ein, ohne eigene PDF-Infrastruktur zu betreiben.

Credits

1 Credit / call

1 Credit per successful API request. Failed processing attempts are refunded automatically.

Pricing

1,000 Credits = $1

Every signed-in user receives 100 free API Credits each month.

Endpoint

/api/external/invoice-generator/pdf

Use your API Key in the x-api-key header.

Use case

Geeignet für Rechnungsdaten aus Backoffice oder Abrechnungssystem in PDFs umzuwandeln. Das Web-Tool passt zur manuellen Prüfung, die API zu wiederholbarer serverseitig ausgeführter Automatisierung.

cURL example

curl -X POST https://itextmaster.com/api/external/invoice-generator/pdf \
  -H 'x-api-key: YOUR_API_KEY' \
  -F 'invoiceNumber=INV-001' \
  -F 'fromName=Your Company' \
  -F 'billToName=Client Name' \
  -F 'items=[{"description":"Consulting","quantity":10,"rate":150}]' \
  --output invoice.pdf

Multipart example

curl -X POST https://itextmaster.com/api/external/invoice-generator/pdf \
  -H 'x-api-key: YOUR_API_KEY' \
  -F 'invoiceNumber=INV-001' \
  -F 'fromName=Your Company' \
  -F 'billToName=Client Name' \
  -F 'items=[{"description":"Consulting","quantity":10,"rate":150}]' \
  --output invoice.pdf

JSON base64 example

curl -X POST https://itextmaster.com/api/external/invoice-generator/pdf \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "invoiceNumber": "INV-001",
    "from": { "name": "Your Company", "email": "you@example.com" },
    "billTo": { "name": "Client Name", "email": "client@example.com" },
    "items": [{ "description": "Consulting", "quantity": 10, "rate": 150 }]
  }' \
  --output invoice.pdf

Node.js example

import { writeFile } from 'node:fs/promises';

const response = await fetch('https://itextmaster.com/api/external/invoice-generator/pdf', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': process.env.ITEXTMASTER_API_KEY
  },
  body: JSON.stringify({
  invoiceNumber: 'INV-001',
  from: { name: 'Your Company', email: 'you@example.com' },
  billTo: { name: 'Client Name', email: 'client@example.com' },
  items: [{ description: 'Consulting', quantity: 10, rate: 150 }]
})
});

if (!response.ok) {
  throw new Error(await response.text());
}

await writeFile('invoice.pdf', Buffer.from(await response.arrayBuffer()));

Python example

import os
import requests

response = requests.post(
    'https://itextmaster.com/api/external/invoice-generator/pdf',
    headers={
        'Content-Type': 'application/json',
        'x-api-key': os.environ['ITEXTMASTER_API_KEY'],
    },
    json={
        'invoiceNumber': 'INV-001',
        'from': {'name': 'Your Company', 'email': 'you@example.com'},
        'billTo': {'name': 'Client Name', 'email': 'client@example.com'},
        'items': [{'description': 'Consulting', 'quantity': 10, 'rate': 150}],
    },
)
response.raise_for_status()

with open('invoice.pdf', 'wb') as f:
    f.write(response.content)

Error codes

400invalid_invoice_payload

Das Rechnungs-JSON ist fehlerhaft oder unvollständig.

401invalid_api_key

Der x-api-key fehlt, ist ungültig oder wurde rotiert.

402insufficient_credits

Das Konto hat nicht genug API Credits.

500invoice_pdf_generation_failed

Die PDF-Rechnung konnte nicht erzeugt werden. Credits werden bei Fehlschlag automatisch erstattet.

Limits

  • Benötigt ein gültiges PDF oder gültige Eingabedaten.
  • Rufen Sie die API serverseitig auf, damit der API Key nicht im Browser erscheint.
  • Testen Sie repräsentative Dateien vor großen Stapeln.

Response headers

invoice.pdf mit Response-Headern für verbrauchte Credits und verbleibendes Guthaben.

Content-Type
MIME-Typ der erzeugten Datei, meistens application/pdf oder application/zip.
Content-Disposition
Dateiname für den Download der Ausgabe.
X-Credits-Charged
Credits, die für die erfolgreiche Anfrage berechnet wurden.
X-Credit-Balance
Verbleibendes API-Credits-Guthaben nach der Anfrage.

FAQ

Was kostet die Rechnung PDF API?

Erfolgreiche Anfragen nutzen API Credits; fehlgeschlagene Verarbeitung wird automatisch erstattet. Angemeldete Nutzer erhalten monatlich 100 free API Credits, 1,000 Credits = $1.

Nutzen Web-Tools API Credits?

Nein. Browserlokale Web-Tools verbrauchen keine API Credits. Nur Anfragen mit API Key werden berechnet.

Kann ich die API aus dem Browser aufrufen?

Das sollten Sie nicht tun. Speichern Sie den API Key im Backend, in Queues oder serverseitigen Jobs.

Start with 100 free API Credits

Create an API Key, test Rechnung PDF API, and buy more Credits only when automation volume grows.