REST API
Every action in the Celerp interface is a REST endpoint - the same API the UI uses internally. Automate workflows, connect other systems, or build your own tools. The API runs locally with your data; nothing is sent to the cloud.
🔗 Base URL
http://localhost:8000 on a pip install. The desktop app picks its own port: see celerp-data/api-port.
🔑 Auth
Bearer JWT from /auth/login
📦 Format
JSON in, JSON out
📖 Spec
GET /openapi.json (OpenAPI 3.1)
Which port? With pip install celerp, the API server runs on localhost:8000 (change it with --api-port) and port 8080 is the web UI for people, not the API. The desktop app picks free ports each time it starts and writes the API port to the api-port file in its celerp-data folder. Set CELERP_API_PORT before launching it to pin the port.
Authentication
Celerp uses short-lived JSON Web Tokens. Log in with your Celerp email and password to get an access token, then send it as a Bearer header on every request.
1. Log in
curl -X POST http://localhost:8000/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "your-password"}'
The response contains two tokens:
{
"access_token": "eyJhbGciOiJI...",
"refresh_token": "eyJhbGciOiJI..."
}
2. Call the API with the token
curl http://localhost:8000/items \
-H "Authorization: Bearer eyJhbGciOiJI..."
- The token identifies your user, role and company, so requests are automatically scoped to that company - no extra header needed.
- Access tokens last up to 24 hours. When one expires, get a fresh pair by POSTing your
refresh_tokento/auth/token/refresh. - Belong to more than one company? List them with
GET /auth/my-companies, then get a token scoped to another withPOST /auth/switch-company/{company_id}.
Tokens carry your permissions. A viewer token can read but not write; cost figures need manager role or higher. Treat tokens like passwords - anyone holding one can act as you.
Making requests
All endpoints live under your API server's address (http://localhost:8000 on a pip install, as in the examples below) and return JSON. List endpoints return an items array and a total count:
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
}
Pagination: pass ?limit= (default 50) and ?offset=. Most list endpoints also accept a q= search term and column filters (e.g. ?status=available).
Creating data
POST JSON to create records. Writes return the new entity's id (and the underlying event_id - every change in Celerp is an event).
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"
}'
Idempotency: include an idempotency_key on any write. A retried request with the same key won't create a duplicate - safe for flaky networks and batch jobs.
Conventions
- Errors non-2xx responses return
{"detail": "..."}with a standard HTTP status code. - Rate limits 60 requests/minute per IP by default; login is capped at 10/minute. Exceeding a limit returns
429. - Permissions endpoints are gated by your role:
viewer → operator → manager → admin → owner. - Company scope every request acts on the company in your token; switch companies to act on another.
Common endpoints
A small slice to get you started. Every module adds its own - the full list is in the OpenAPI schema below.
| Method | Path | Description |
|---|---|---|
POST | /auth/login | Get an access token (no auth required) |
GET | /health | Service status (no auth required) |
GET | /items | List inventory items |
POST | /items | Create an item |
GET | /docs | List documents (invoices, POs, bills, …) |
POST | /docs | Create a document |
GET | /crm/contacts | List customers & suppliers |
POST | /crm/contacts | Create a contact |
GET | /dashboard/kpis | Business KPIs |
Full reference by area
Every endpoint the running API serves, grouped by area. Each page lists the method, path, parameters, request and response shapes, and an example call.
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
Explore the full API
The complete, always-current reference is the OpenAPI 3.1 schema your own instance generates:
GET http://localhost:8000/openapi.json
Load it into any OpenAPI tool - Postman, Insomnia, Swagger UI, or a client generator - to browse every endpoint and model, try requests, and generate a typed client in your language. Celerp ships the schema itself rather than a hosted docs page, so your API surface stays private to your instance.
Prefer plain English? The AI assistant (Connect) calls this same API for you - ask it to pull a report or create a document in natural language. And remember: anything the API can do, it does with no special access - exactly what a signed-in user could do.