REST-API
Jede Aktion in der Celerp-Oberfläche ist ein REST-Endpunkt – dieselbe API, die die Oberfläche intern nutzt. Automatisieren Sie Abläufe, binden Sie andere Systeme an oder bauen Sie eigene Werkzeuge. Die API läuft lokal mit Ihren Daten; nichts geht in die Cloud.
🔗 Basis-URL
http://localhost:8000 bei einer pip-Installation. Die Desktop-App wählt ihren Port selbst: siehe celerp-data/api-port.
🔑 Authentifizierung
Bearer JWT von /auth/login
📦 Format
JSON rein, JSON raus
📖 Spezifikation
GET /openapi.json (OpenAPI 3.1)
Welcher Port? Bei einer Installation mit pip install celerp läuft der API-Server auf localhost:8000 (änderbar mit --api-port), und Port 8080 ist die Weboberfläche für Menschen, nicht die API. Die Desktop-App wählt bei jedem Start freie Ports und schreibt den API-Port in die Datei api-port in ihrem Ordner celerp-data. Um den Port festzulegen, setzen Sie CELERP_API_PORT vor dem Start.
Authentifizierung
Celerp verwendet kurzlebige JSON Web Tokens. Melden Sie sich mit Ihrer Celerp-E-Mail-Adresse und Ihrem Passwort an, um ein Zugriffstoken zu erhalten, und schicken Sie es dann bei jeder Anfrage als Bearer-Header mit.
1. Anmelden
curl -X POST http://localhost:8000/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "your-password"}'
Die Antwort enthält zwei Token:
{
"access_token": "eyJhbGciOiJI...",
"refresh_token": "eyJhbGciOiJI..."
}
2. Die API mit dem Token aufrufen
curl http://localhost:8000/items \
-H "Authorization: Bearer eyJhbGciOiJI..."
- Das Token weist Nutzerkonto, Rolle und Unternehmen aus; Anfragen sind damit automatisch auf dieses Unternehmen begrenzt – ein zusätzlicher Header ist nicht nötig.
- Zugriffstoken sind bis zu 24 Stunden gültig. Wenn eines abläuft, erhalten Sie ein neues Paar, indem Sie Ihr
refresh_tokenper POST an/auth/token/refreshsenden. - Sie gehören zu mehreren Unternehmen? Listen Sie sie mit
GET /auth/my-companiesauf und holen Sie sich mitPOST /auth/switch-company/{company_id}ein Token für ein anderes.
Token tragen Ihre Berechtigungen. Ein viewer-Token darf lesen, aber nicht schreiben; Kostenangaben erfordern mindestens die Rolle manager. Behandeln Sie Token wie Passwörter – wer eines hat, kann in Ihrem Namen handeln.
Anfragen stellen
Alle Endpunkte liegen unter der Adresse Ihres API-Servers (http://localhost:8000 bei einer pip-Installation, wie in den Beispielen unten) und liefern JSON. Endpunkte für Listen geben ein items-Array und die Gesamtzahl total zurück:
curl "http://localhost:8000/items?limit=20&offset=0" \
-H "Authorization: Bearer $TOKEN"
{
"items": [
{ "id": "item:...", "sku": "WIDGET-001", "name": "Widget", "quantity": 42 }
],
"total": 142
}
Paginierung: Übergeben Sie ?limit= (Standard 50) und ?offset=. Die meisten Listenendpunkte nehmen zusätzlich einen Suchbegriff q= und Spaltenfilter entgegen (z. B. ?status=available).
Daten erstellen
Legen Sie Datensätze per POST mit JSON an. Schreibvorgänge liefern die id der neuen Entität zurück, dazu die zugrunde liegende event_id – jede Änderung in Celerp ist ein Ereignis.
curl -X POST http://localhost:8000/crm/contacts \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"email": "[email protected]",
"contact_type": "customer",
"idempotency_key": "acme-2026-06-21"
}'
Idempotenz: Fügen Sie bei jedem Schreibvorgang einen idempotency_key ein. Eine erneute Anfrage mit demselben Schlüssel erstellt kein Duplikat – sicher für instabile Netzwerke und Batch-Jobs.
Konventionen
- Fehler Nicht-2xx-Antworten geben
{"detail": "..."}mit einem Standard-HTTP-Statuscode zurück. - Anfragelimits Standardmäßig 60 Anfragen pro Minute und IP; die Anmeldung ist auf 10 pro Minute begrenzt. Wird ein Limit überschritten, kommt
429zurück. - Berechtigungen Endpunkte sind an Ihre Rolle gebunden:
viewer → operator → manager → admin → owner. - Mandantenbezug Jede Anfrage wirkt auf das Unternehmen im Token; wechseln Sie das Unternehmen, um in einem anderen zu arbeiten.
Häufige Endpunkte
Ein kleiner Ausschnitt für den Einstieg. Jedes Modul bringt eigene Endpunkte mit – die vollständige Liste steht im OpenAPI-Schema weiter unten.
| Methode | Pfad | Beschreibung |
|---|---|---|
POST | /auth/login | Zugriffstoken abrufen (keine Authentifizierung erforderlich) |
GET | /health | Dienststatus (keine Authentifizierung erforderlich) |
GET | /items | Lagerartikel auflisten |
POST | /items | Artikel anlegen |
GET | /docs | Belege auflisten (Rechnungen, Bestellungen, Eingangsrechnungen, …) |
POST | /docs | Beleg anlegen |
GET | /crm/contacts | Kunden und Lieferanten auflisten |
POST | /crm/contacts | Kontakt anlegen |
GET | /dashboard/kpis | Unternehmens-KPIs |
Vollständige Referenz nach Bereich
Jeder Endpunkt der laufenden API, nach Bereich gruppiert. Jede Seite listet Methode, Pfad, Parameter, Anfrage- und Antwortschema sowie einen Beispielaufruf auf.
Auth
Authentication API for Celerp users, login, logout, password recovery, company switching, and API access. (13 endpoints)
Companies
Company settings and administration API for users, roles, locations, taxes, payment terms, price lists, modules, and company preferences. (70 endpoints)
Items
Inventory API for products and stock items, quantities, pricing, locations, barcodes, valuation, imports, reservations, transfers, transformations, and stock status. (39 endpoints)
Docs
Business document API for invoices, bills, purchase orders, quotations, credit notes, shipping documents, payments, fulfillment, PDF output, and document lifecycle operations. (52 endpoints)
Lists
Inventory list API for stock audits, transfers, write-offs, manifests, scans, reservations, notes, exports, and list lifecycle operations. (38 endpoints)
Accounting
Celerp accounting REST API for the chart of accounts, journal entries, general ledger, bank reconciliation, financial statements, transfers, and fiscal period controls. (59 endpoints)
Ledger
Event ledger API for reading Celerp business events and rebuilding derived application data. (3 endpoints)
Reports
ERP reporting API for accounts receivable and payable aging, sales, purchases, and expiring inventory. (5 endpoints)
Manufacturing
Manufacturing API for production orders, recipes, work centers, workflows, material requirements, costing, scheduling, component issue, and finished-goods receipt. (32 endpoints)
Labels
Inventory label and barcode API for label templates, single-item labels, bulk label sheets, and printable PDFs. (7 endpoints)
Crm
CRM REST API for customers, suppliers, contacts, addresses, people, notes, tags, files, imports, exports, and contact management. (25 endpoints)
Subscriptions
Recurring document and subscription API for invoice and purchase-order templates, scheduling, activation, pausing, resuming, cancellation, and on-demand generation. (6 endpoints)
Connectors
Integration API for connecting Celerp ERP to external commerce and business platforms, managing connector credentials, and running data synchronization. (9 endpoints)
Payments
Payment integration API for connecting payment processing, checking payment availability, and reading connection status. (7 endpoints)
Backup
Backup and restore API for exporting, importing, listing, creating, and restoring Celerp ERP backups. (8 endpoints)
Notifications
User notification API for listing notifications and marking individual or all notifications as read. (3 endpoints)
Events
Real-time server-sent events API for Celerp notifications and live application events. (1 endpoint)
System
System health, readiness, restart, and factory reset endpoints for a Celerp ERP installation. (10 endpoints)
Admin
Administrative diagnostics and system status endpoints for maintaining a Celerp ERP installation. (2 endpoints)
Ai
Celerp AI API for ERP assistant conversations, document extraction, batch jobs, memory, usage, and user-confirmed business actions. (22 endpoints)
Attachments
Inventory attachment API for uploading, downloading, tagging, previewing, and deleting item files and product images. (12 endpoints)
Dashboard
Dashboard API for ERP KPIs, recent business activity, and searchable activity history. (3 endpoints)
Payments Public
Public payment endpoints for customer payment links and payment-provider return handling. (2 endpoints)
Received
Received documents API for documents other Celerp users shared with you: list and review them, book one as your own draft, and bring a booked draft up to date with the sender's latest revision. (5 endpoints)
Search
Global Celerp ERP search API for finding permitted records across modules from a single query. (1 endpoint)
Settings
System settings and Celerp Connect API for account setup, cloud connection state, billing, backups, connectors, and partner configuration. (17 endpoints)
Share
Document sharing API for creating, inspecting, updating, and revoking public share links for Celerp documents and lists. (4 endpoints)
Share Public
Public document sharing and import endpoints for viewing shared Celerp documents and downloading or importing portable document bundles. (4 endpoints)
Stars
Supporter badge and Celerp community recognition API for badge verification, display, opt-out, and prompts. (6 endpoints)
Verticals
Industry preset and category schema API for configuring Celerp ERP fields and defaults by business vertical. (5 endpoints)
Company Backups
16 endpoints
Migrations
22 endpoints
Die vollständige API erkunden
Die vollständige, stets aktuelle Referenz ist das OpenAPI-3.1-Schema, das Ihre eigene Instanz erzeugt:
GET http://localhost:8000/openapi.json
Laden Sie es in ein beliebiges OpenAPI-Werkzeug – Postman, Insomnia, Swagger UI oder einen Client-Generator –, um jeden Endpunkt und jedes Modell zu durchsuchen, Anfragen auszuprobieren und einen typisierten Client in Ihrer Sprache zu erzeugen. Celerp liefert das Schema selbst statt einer gehosteten Doku-Seite; so bleibt Ihre API-Oberfläche auf Ihre Instanz beschränkt.
Lieber in normaler Sprache? Der KI-Assistent (Connect) ruft für Sie dieselbe API auf – bitten Sie ihn einfach in normaler Sprache um einen Bericht oder einen Beleg. Und denken Sie daran: Alles, was die API tut, tut sie ohne Sonderrechte – genau das, was auch ein angemeldeter Mensch dürfte.