📖 Introduction
DoliPulse provides a REST API and webhook system that allows you to integrate Dolibarr ERP/CRM with external applications, services, and workflows.
🚀 Getting Started
🔗 Base URL
All API endpoints are relative to the base URL below.
🔒 Authentication
DoliPulse uses API key-based authentication.
Send your API key in the X-API-Key header with every request:
curl -X GET "https://your-dolibarr.com/dolipulse/api/thirdparties" \ -H "X-API-Key: dol-your-api-key-here" \ -H "Content-Type: application/json"
$ch = curl_init('https://your-dolibarr.com/dolipulse/api/thirdparties'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'X-API-Key: dol-your-api-key-here', 'Content-Type: application/json' ]); $response = curl_exec($ch);
fetch('https://your-dolibarr.com/dolipulse/api/thirdparties', { headers: { 'X-API-Key': 'dol-your-api-key-here', 'Content-Type': 'application/json' }})
import requests; headers = {'X-API-Key': 'dol-your-api-key-here', 'Content-Type': 'application/json'}; response = requests.get('https://your-dolibarr.com/dolipulse/api/thirdparties', headers=headers)
Permissions
API keys have granular permissions.
Rotate your API keys regularly.
📋 API Endpoints
The following tables list all available API endpoints organized by category.
🤖 AI Agent Rutinleri
Agent rutinleri, yapay zeka destekli işlemleri otomatikleştirmek ve akıllı iş akışları oluşturmak için kullanılan özel API uç noktalarıdır.
curl -X GET "https://dolibarr-adresiniz.com/dolipulse/api/agent/session" \
-H "X-API-Key: dol-api-anahtarınız"
// Başarılı yanıt
{"success":true,"data":{"session_id":"sess_abc123","created":"2026-06-20T10:00:00Z","expires":"2026-06-20T11:00:00Z"}}
curl -X POST "https://dolibarr-adresiniz.com/dolipulse/api/agent/chat" \
-H "X-API-Key: dol-api-anahtarınız" \
-H "Content-Type: application/json" \
-d '{"session_id":"sess_abc123","message":"Bu ayki ödenmemiş faturaları listele","context":{"module":"invoices","action":"list_unpaid"}}'
// Başarılı yanıt
{"success":true,"data":{"reply":"Bu ay toplam 23 adet ödenmemiş fatura bulunuyor.","action_taken":"query","results_count":23}}
curl -X POST "https://dolibarr-adresiniz.com/dolipulse/api/agent/memory" \
-H "X-API-Key: dol-api-anahtarınız" \
-d '{"session_id":"sess_abc123","action":"store","key":"last_report","value":"monthly_sales_2026_06","ttl":86400}'
// Başarılı yanıt
{"success":true,"data":{"stored":true,"key":"last_report","expires_at":"2026-06-21T10:00:00Z"}}
curl -X POST "https://dolibarr-adresiniz.com/dolipulse/api/agent/workflows" \
-H "X-API-Key: dol-api-anahtarınız" \
-d '{"session_id":"sess_abc123","trigger":"new_customer_onboarding","params":{"company_name":"Acme Corp"}}'
// Başarılı yanıt
{"success":true,"data":{"workflow_id":"wf_456","status":"started","steps":[{"step":1,"action":"create_thirdparty","status":"completed"},{"step":2,"action":"send_welcome_email","status":"pending"}]}}
curl -X POST "https://dolibarr-adresiniz.com/dolipulse/api/agent/delegation" \
-H "X-API-Key: dol-api-anahtarınız" \
-d '{"session_id":"sess_abc123","task":"approve_invoice_42","delegate_to":"user_admin","priority":"high"}'
// Başarılı yanıt
{"success":true,"data":{"delegation_id":"del_789","status":"pending","assigned_to":"user_admin","notified":true}}
curl -X GET "https://dolibarr-adresiniz.com/dolipulse/api/agent/recommendations" \
-H "X-API-Key: dol-api-anahtarınız" \
-d '{"session_id":"sess_abc123","context":"dashboard","limit":5}'
// Başarılı yanıt
{"success":true,"data":[{"type":"stock_alert","message":"Ürün #45 stokta sadece 12 adet kaldı.","priority":"high"},{"type":"cashflow","message":"Önümüzdeki 7 günde 45.000 TL tahsilat bekleniyor.","priority":"medium"}]}
💻 Code Examples
Practical examples showing how to use the API for common tasks.
📈 Response Format
All API responses follow a consistent JSON structure.
📄 Pagination & Filtering
List endpoints support pagination, sorting, and filtering through query parameters.
⚡ Webhooks
Real-time event notifications to your HTTP endpoints.
🔧 Overview
Webhooks provide real-time event-driven communication.
📄 Available Events
Subscribe to any combination of these events:
📦 Webhook Payload
All webhook deliveries follow this JSON structure:
🔒 Signature Verification
Every webhook includes an X-DoliPulse-Signature header. Verify it to ensure the request came from DoliPulse:
$secret = 'your-webhook-secret'; $payload = file_get_contents('php://input'); $signature = $_SERVER['HTTP_X_DOLIPULSE_SIGNATURE']; $expected = hash_hmac('sha256', $payload, $secret); if (hash_equals($expected, $signature)) { http_response_code(200); } else { http_response_code(403); }
const crypto = require('crypto'); const secret = 'your-webhook-secret'; const payload = JSON.stringify(req.body); const signature = req.headers['x-dolipulse-signature']; const expected = crypto.createHmac('sha256', secret).update(payload).digest('hex');
import hmac, hashlib; secret = b'your-webhook-secret'; payload = request.get_data(); signature = request.headers.get('X-DoliPulse-Signature'); expected = hmac.new(secret, payload, hashlib.sha256).hexdigest()
🔄 Retry Policy
If your endpoint does not respond with a 2xx status within 10 seconds, DoliPulse retries using exponential backoff:
After 3 consecutive failures, the event is moved to a Dead Letter Queue.
💡 Best Practices
🛠 Webhook Management via API
⚠ Error Handling
The API returns standard HTTP status codes with descriptive error messages.
⏱ Rate Limiting
API access is rate-limited to ensure fair usage and system stability.
Rate Limit: 300 requests per minute per API key
Rate limit information is included in response headers: