The REST API that Dolibarr should ship with
32 core domains with Dolibarr's native permissions, real idempotency and bulk operations. With an MCP server to connect AI agents.
|
32
core domains
|
697
operations
|
3,849
tests
|
V15–V23
PHP 7.0 to 8.3
|
The problem it solves
It is not that Dolibarr's native API falls short: it is that every quirk costs you hours. These are the ones that come up in every single integration.
| What you run into |
What it costs you |
| One POST returns an integer, another one the object |
A different parser for each endpoint, and not one of them reusable |
| The sales rep join uses t.rowid = sc.fk_soc |
Thirdparty records that user should never see slip through |
| A 401 arrives where a 403 belonged |
Your retry logic keeps hammering something that will never work |
| accountancy only exposes exportData |
Accounting stays outside your integration |
| There is no idempotency on any write |
One timeout plus one retry and you have charged twice |
EasyAPI is not a layer on top of the native API: it is a complete reimplementation with a uniform declarative contract.
NEW IN 2.1
Native MCP server for AI agents
Connect Claude, Cursor or any AI agent to your Dolibarr in a minute: the module URL and your DOLAPIKEY as a Bearer token.
Instead of dumping hundreds of tools on the agent, it exposes three meta-tools —search, describe and invoke— over the 697 operations, with schemas and examples ready to run. The agent chains multi-step operations, writes with idempotency and gets self-correcting errors: a 422 tells it the exact field it has to fix.
It inherits your native Dolibarr permissions and ACL, so it cannot see or touch anything the user could not. It includes an "MCP / AI" admin tab and a connection guide inside the module itself.
Embedded documentation
The OpenAPI specification generates itself from the resources and is served inside the module, filtered by the permissions of the user requesting it. You pick the viewer: Scalar, Swagger UI or Redoc, all three included.
All 32 domains browsable, with a server selector and DOLAPIKEY authentication. Every operation comes with its schema and an example ready to run.
Compared with the native API
| Dimension |
Dolibarr native API |
EasyAPI |
| Coverage |
~25 classes with uneven coverage; methods commented out or missing |
32 complete core domains + sub-resources |
| Responses |
Heterogeneous: one POST returns an int, another the object |
Uniform {success, data} envelope, with meta.pagination on lists · POST → 201 + object · DELETE → 204 |
| Errors |
Mismatched codes and messages, no taxonomy, no request_id |
Full catalogue (422, 409, 410, 412, 413, 415, 428, 429, 503…) with request_id and doc_url |
| Security |
Native rights, but with real ACL bugs and wrong status codes |
Same native rights, per-record ACL fixed and uniform, no leaks between entities |
| Idempotency |
Does not exist |
Idempotency-Key with atomic reservation and replay on every write |
| Validation |
400 with "missing field" |
Declarative 422 with error.fields per rule |
| Queries |
sqlfilters + limit/page |
JSON:API filters, sorting, search, sparse fields, include, offset and cursor pagination |
| Bulk |
Do not exist |
207 Multi-Status on create, update and delete (100 per batch) |
| Resilience |
Does not exist |
Rate limit, deadlock retry, ETag / If-Match, maintenance mode, /health |
| Documentation |
Basic Swagger explorer |
Full OpenAPI with Scalar, Swagger UI and Redoc embedded |
| Extensibility |
You have to touch or fork the core |
Resource auto-discovery from your own module |
| AI agents |
Not considered |
Native MCP server included |
This is how you use it
Authentication with your Dolibarr DOLAPIKEY. Every response arrives with the same envelope, so you write your client once and it works for all 32 domains.
CREATE AN INVOICE, NO DUPLICATES EVEN IF YOU RETRY
curl -X POST https://your-dolibarr.com/custom/easyapi/api/invoices \
-H "DOLAPIKEY: your_key" \
-H "Idempotency-Key: order-4417" \
-H "Content-Type: application/json" \
-d '{"socid": 128, "lines": [{"fk_product": 55, "qty": 2}]}'
The base path is custom/easyapi/api on a standard install. If you keep the module in another modules folder registered in your conf.php, replace custom with yours: EasyAPI has no hardcoded paths, it adapts to wherever you install it.
201 CREATED
{
"success": true,
"data": {
"id": 902,
"ref": "FA2607-0043"
}
}
422 — IT TELLS YOU WHAT TO FIX
{
"success": false,
"error": {
"type": "validation_error",
"code": 422,
"message": "Validation failed",
"fields": {
"socid": "does not exist"
},
"request_id": "req_a1b2",
"doc_url": "…#validation_error"
}
}
Lists add a meta.pagination block with the mode (offset or cursor), the total and the page. And every response, successful or failed, carries the X-Request-Id header: if something goes wrong, that identifier lets us trace your specific request.
What it includes
You extend the API without touching the core
Auto-discovered resources with JSON:API filters, sorting, search, sparse fields, include and offset or cursor pagination. You extend the API from your own module without touching the core.
Safe writes and errors that explain themselves
Idempotency through Idempotency-Key, declarative 422 validation, structured errors with request_id, 207 bulk operations and per-record ACL.
It holds up under spikes, outages and retries
Configurable rate limit, automatic deadlock retry, ETag and If-Match for optimistic concurrency, maintenance mode and /status and /health endpoints.
Documentation that never goes stale
Full OpenAPI with Scalar, Swagger UI and Redoc embedded, grouped by domain and with automatic examples. Module interface in 8 languages.
What it is used for
- Integrating Dolibarr with e-commerce, mobile apps or external ERPs through modern REST.
- Bulk synchronisation of products, thirdparties and orders in batches of 100.
- Headless automations with an exactly-once execution guarantee.
- Feeding BI and dashboards with real filtering and pagination.
- Giving an AI agent safe, audited access to your ERP.
- Building your own domain API by extending resources, without forking Dolibarr.
Getting started
1
Install and enable EasyAPI, then run composer install in the module folder.
2
Configure resilience and CORS in the "API" tab: rate limit, retries, ETag and maintenance mode.
3
Authenticate with your DOLAPIKEY and consume the 32 domains with Idempotency-Key and If-Match.
4
Open /docs to explore the API, and the "MCP / AI" tab to connect your agent.
Requirements
| Dolibarr |
V15 to V23 |
| PHP |
7.0 to 8.3 |
| Database |
MySQL 5.7+ · MariaDB 10.2+ · PostgreSQL 10+ |
| Web server |
Apache with mod_rewrite, or Nginx |
| Dependencies |
Composer, to install the module libraries |
Before you buy
Can I adapt it to my case?
Yes. EasyAPI ships under GNU GPL v3: you get the whole source code and you can read it, modify it and adapt it to your install without asking anyone. On top of that the framework auto-discovers resources, so the usual path is adding your own endpoints from your module instead of touching ours.
How do I try it without risking my data?
Install it on a copy of your Dolibarr and call GET /status: it answers without touching a single record. From there on every read (the 32 domains with filters and pagination) is harmless. Writes do create real data, so try those on that copy; what Idempotency-Key guarantees is that a retry after a dropped connection will not duplicate the record, not that the operation can be undone.
What if something does not fit my install?
Write to us at
info@easysoft.es before buying and we will go through it with you: Dolibarr version, PHP, hosting and what you need to integrate. We would rather tell you it does not fit than sell you something that will not work for you.
What if I upgrade? Will my integration break?
No. EasyAPI is a stable API v1 and every response declares it in the X-EasyAPI-Version header. Only backwards-compatible changes go into v1: new optional fields, new endpoints, new headers. A change that breaks the contract —renaming a field, changing a type— does not land in v1: it would ship as v2, and your integration would keep pointing at v1 while you migrate whenever it suits you.
What does the purchase include?
The complete module with its source code and 365 days of access to updates and downloads from Dolistore, plus email support for installation, integration and connecting AI agents.
Actively maintained
EasyAPI is not a publish-it-and-forget-it module. The current version is 2.13 and every release goes through the 4,110-test suite plus live QA. The latest round turned the specification into a real contract and removed the N+1 from list endpoints, without breaking compatibility:
- Codegen-ready OpenAPI contract: typed list responses with their real pagination and honest required, nullable and enum. Your client generates its types instead of hand-writing them.
- No more N+1: the document's thirdparty comes in the same call across 13 resources, and so do its lines and payments — and you can now sort and filter by thirdparty fields.
- New domain endpoints: invoicing KPIs, valued stock per warehouse, extrafield definitions for dynamic forms, bank movements across every account, and ticket dictionaries.
- MCP server compliant with the 2025-11-25 specification, with STDIO transport and multilingual search for AI agents.
The version-by-version detail is in the ChangeLog, reachable from the module's own admin tab.
|
24
modules published on Dolistore
|
GPLv3
complete source code
|
8
interface languages
|
365
days of updates
|
Is it a fit for what you need to integrate?
Tell us about your case and we will tell you whether EasyAPI works for you — and if it does not, we will tell you that too. We answer on installation, integration and connecting AI agents.
info@easysoft.es www.easysoft.es