Promotions

New products

EasyAPI - Professional REST API for Dolibarr (32 core domains) + MCP

mp23914d20260607102352

Professional REST API for Dolibarr: 32 core domains with native permissions, idempotency, resilience, Scalar docs and an MCP server for AI agents.

290.00 €
Excl. tax

  • Author EasySoft Tech SL
  • Module version 2.11.0
  • Release date 06/07/2026
  • Access to download and updates 1 year
  • How to contact support info@easysoft.es
  • Compatibility Dolibarr V15+   -   PHP7.0 - 8.3
  • Last update 07/08/2026 01:44 PM

More info...

EasyAPI for Dolibarr — the professional REST API + MCP that reimplements the whole core

EasyAPI gives Dolibarr a professional REST API that fully reimplements the core API (32 domains: sales, purchasing, stock, projects, accounting, HR, membership…) on top of an auto-discovered Resources framework, with NATIVE Dolibarr permissions, idempotency, configurable resilience and embedded Scalar/Swagger/Redoc documentation.

🛡️ What's new 2.7.4 → 2.7.12 — robustness & contract-fidelity audit

An exhaustive multi-agent audit of the whole module (every domain) has hardened EasyAPI without breaking compatibility. Highlights:

  • Data integrity: optional foreign keys sent as 0/"" are normalised to NULL instead of failing; consistent VAT (vatrate) and boolean-flag validation across every resource.
  • Transactionality: multi-step operations (shipments, receptions, accounting export, bank accounts) wrapped in a single transaction — no half-written states.
  • Security & ACL: per-record access control hardened on gateways, categories, stock movements and expense lines; no cross-entity reads.
  • No data leaks: nested document lines (lines[]) no longer expose internal metadata.
  • Faithful OpenAPI: bodyless 204/304, correct oneOf/array bulk shape, per-status headers (ETag, Allow, Retry-After) and the spec filtered by the user's permissions.
  • Sturdier MCP: deterministic idempotency only where appropriate (naturally repeatable creates —stock movements, agenda events— are no longer wrongly de-duplicated) plus If-Match support on conditional writes.
  • Consistent status codes: no-op transitions (e.g. validating an already-validated member) return an idempotent 304 instead of 409.

All changes verified with the PHPUnit suite and live QA. See ChangeLog.md for the per-version detail.

🤖 New in 2.1.0 — Native MCP server for AI agents

EasyAPI now ships a self-contained MCP (Model Context Protocol) server in PHP: connect Claude, Cursor or any AI agent to your Dolibarr in a minute (the module URL + your DOLAPIKEY as a Bearer token). Instead of hundreds of tools it exposes 3 meta-tools (search / describe / invoke) over the ~697 operations, with schemas and ready-to-invoke examples, multi-step operation chaining, idempotent writes and self-correcting errors (422 with the exact field to fix). The agent inherits your native Dolibarr permissions and ACL and even auto-discovers third-party modules' resources. Ships with an "MCP / AI" admin tab and an in-module connection guide.

⚖️ Comparison: native Dolibarr API vs EasyAPI

Dolibarr already ships a REST API… but it leaves you halfway there: no idempotency, no structured errors, real permission bugs, no bulk operations or resilience, and uneven coverage. EasyAPI is the API Dolibarr should have
Dimension Native Dolibarr API ⭐ EasyAPI
Coverage ~25 API classes with UNEVEN coverage (e.g. accountancy = only exportData; several methods commented out/non-existent) 32 COMPLETE core domains + sub-resources (lines, contacts, payments, etc.)
Response model Heterogeneous (one POST returns a raw int, another the object; _cleanObjectDatas inconsistent across domains) UNIFORM envelope {success,data,meta}; POST→201+clean object; DELETE→204
Errors RestException with disparate codes/messages, no taxonomy, no request_id ErrorCatalog: full taxonomy (422 validation_error+error.fields, 409, 410, 412, 413, 415, 428, 429, 503…) + request_id + doc_url on every error
Security / ACL Native rights + _checkAccessToResource but WITH real BUGS (sales-rep join t.rowid=sc.fk_soc, returns 401 where 403 is due, mis-whitelisted features) SAME native rights + per-record ACL FIXED and uniform (fk_soc/entity), correct 403, no cross-socid/entity leaks
Idempotency ✅ Idempotency-Key (atomic reservation, replay, 422 conflict) on EVERY write, including state transitions
Validation Basic 400 «<field> field missing» Declarative 422 with error.fields per rule (required/numeric/enum/exists/date-ordering…)
Filters / sort / pagination sqlfilters (powerful but raw) + limit/page + JSON:API ?filter/?sort/?q/?fields/?include, offset+cursor pagination, X-Total-Count, deterministic tie-breaking
Bulk operations ✅ 207 Multi-Status on create/update/delete (up to 100 per batch)
Resilience ✅ configurable rate-limit, DB deadlock retry, ETag/If-None-Match (304) + If-Match (optimistic concurrency, 412), maintenance mode, /status and /health endpoints
Documentation Basic Swagger explorer Full OpenAPI + embedded Scalar/Swagger/Redoc, grouped by domain, auto examples
Extensibility Must touch/fork the core to add endpoints Resources auto-discovery from your module
Quality / consistency Inherited inconsistencies and bugs Uniform declarative contract + 3,849 tests + cross adversarial audit
Portability / config Standard Portable (custom/ or any registered root) + everything configurable via EASYAPI_* constants

📦 Common use cases

  • Integrate Dolibarr with e-commerce, mobile apps or external ERPs via a modern REST API.
  • Bulk synchronization of products, third parties and orders.
  • Headless automations with an "exactly once" guarantee (idempotency).
  • Expose data to BI/dashboards with powerful filtering and pagination.
  • Build your own domain API by extending Resources, without forking Dolibarr.

✨ Features

  • 🧩 32 core domains reimplemented (sales, purchasing, stock, projects, accounting, HR, membership…) with filtering, pagination, sorting and bulk operations (bulk 207).
  • 🔐 Security based on Dolibarr's NATIVE per-domain permissions + per-record ACL (fk_soc/entity).
  • ⭐ Pro layer: idempotency (Idempotency-Key), 422 validation, structured errors, OpenAPI with embedded Scalar/Swagger/Redoc docs.
  • 🛡️ Configurable resilience: rate-limit, deadlock retry, ETag/If-Match (optimistic concurrency) and maintenance mode.
  • 🔌 Extensible: auto-discovers Resources — extend the API from your own module without touching the core.

📋 How it works

  1. Install and enable EasyAPI; run composer install in the module folder.
  2. Configure resilience (rate-limit, retry, ETag, body size, maintenance) plus CORS/logging on the "API" tab.
  3. Authenticate with your DOLAPIKEY and consume the 32 domains; use Idempotency-Key and If-Match for safe writes.
  4. Open /docs to explore the API with Scalar/Swagger/Redoc; extend it with your own Resources.

🧩 What's included in the module

  • EAPI framework with auto-discovery + the 32 Dolibarr core domains.
  • Pro layer: idempotency, 422 validation, structured errors, bulk 207, per-record ACL.
  • Resilience: configurable rate-limit, deadlock retry, ETag/If-Match and maintenance mode.
  • Embedded OpenAPI documentation with Scalar, Swagger UI and Redoc; guides and examples.
  • Interface in 8 languages.

⚙️ Compatibility & requirements

  • 📦 Dolibarr V15+ (compatible up to V22+)
  • ⚙️ PHP 7.0 – 8.3+
  • 🗄️ MySQL 5.7+ / MariaDB 10.2+ / PostgreSQL 10+
  • 🌐 Apache with mod_rewrite or Nginx; Composer to install dependencies

💰 Pricing & license

EasyAPI: €330. Distributed under the GNU General Public License v3.0. Includes 365 days of update access.

✉️ Support

✉️ info@easysoft.es | 🌐 www.easysoft.es




If you think this module is a fork of another one (published after the first one) or violates some terms or conditions of use (for users or vendors), you can make a report at dolistore@dolibarr.org