Add 'aktivierungsstatus' field to CAIKnowledge and CAdvowareAkten entities; update API documentation and configuration timestamps
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
# REST API Endpunkte - EspoCRM Custom Entities
|
||||
|
||||
**Version:** 1.0
|
||||
**Version:** 1.1
|
||||
**Datum:** 11. März 2026
|
||||
**Base URL:** `https://your-crm.com/api/v1`
|
||||
|
||||
**Changelog:**
|
||||
- v1.1 (11. März 2026): Aktivierungsstatus-Feld hinzugefügt (new, active, paused, deactivated)
|
||||
- v1.0 (11. März 2026): Initiale Version
|
||||
|
||||
---
|
||||
|
||||
## 🔐 Authentifizierung
|
||||
@@ -63,6 +67,7 @@ GET /api/v1/CAdvowareAkten
|
||||
"aktenzeichen": "123/2026",
|
||||
"aktennummer": 123,
|
||||
"aktenpfad": "/advoware/2026/001",
|
||||
"aktivierungsstatus": "new",
|
||||
"syncStatus": "unclean",
|
||||
"lastSync": null,
|
||||
"createdAt": "2026-03-11 10:00:00",
|
||||
@@ -85,6 +90,7 @@ GET /api/v1/CAdvowareAkten/{id}
|
||||
"aktenzeichen": "123/2026",
|
||||
"aktennummer": 123,
|
||||
"aktenpfad": "/advoware/2026/001",
|
||||
"aktivierungsstatus": "new",
|
||||
"syncStatus": "unclean",
|
||||
"lastSync": null,
|
||||
"vmhRumungsklageId": "64e3f8a1234ab",
|
||||
@@ -104,6 +110,7 @@ Content-Type: application/json
|
||||
"aktenzeichen": "124/2026",
|
||||
"aktennummer": 124,
|
||||
"aktenpfad": "/advoware/2026/002",
|
||||
"aktivierungsstatus": "new",
|
||||
"syncStatus": "unclean"
|
||||
}
|
||||
```
|
||||
@@ -121,6 +128,7 @@ PUT /api/v1/CAdvowareAkten/{id}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"aktivierungsstatus": "active",
|
||||
"syncStatus": "synced",
|
||||
"lastSync": "2026-03-11T20:00:00+00:00"
|
||||
}
|
||||
@@ -211,6 +219,17 @@ GET /api/v1/CAdvowareAkten/{id}/mietinkasso
|
||||
|
||||
### Filterung & Suche
|
||||
|
||||
#### Nach aktivierungsstatus filtern
|
||||
```http
|
||||
GET /api/v1/CAdvowareAkten?where[0][type]=equals&where[0][attribute]=aktivierungsstatus&where[0][value]=new
|
||||
```
|
||||
|
||||
**Verfügbare Werte:**
|
||||
- `new` - Neu angelegt (Standard, blaue Badge)
|
||||
- `active` - Aktiv synchronisiert (grüne Badge)
|
||||
- `paused` - Synchronisation pausiert (gelbe Badge)
|
||||
- `deactivated` - Synchronisation deaktiviert (rote Badge)
|
||||
|
||||
#### Nach syncStatus filtern
|
||||
```http
|
||||
GET /api/v1/CAdvowareAkten?where[0][type]=equals&where[0][attribute]=syncStatus&where[0][value]=unclean
|
||||
@@ -228,7 +247,7 @@ GET /api/v1/CAdvowareAkten?where[0][type]=equals&where[0][attribute]=syncStatus&
|
||||
|
||||
#### Nur bestimmte Felder
|
||||
```http
|
||||
GET /api/v1/CAdvowareAkten?select=name,aktenzeichen,syncStatus,lastSync
|
||||
GET /api/v1/CAdvowareAkten?select=id,name,aktivierungsstatus,syncStatus,lastSync
|
||||
```
|
||||
|
||||
#### Mit Sortierung
|
||||
@@ -258,6 +277,7 @@ GET /api/v1/CAIKnowledge
|
||||
"id": "kb-123",
|
||||
"name": "Knowledge Base 2026-001",
|
||||
"datenbankId": "kb-external-123",
|
||||
"aktivierungsstatus": "active",
|
||||
"syncStatus": "synced",
|
||||
"lastSync": "2026-03-11 19:00:00",
|
||||
"createdAt": "2026-03-10 10:00:00"
|
||||
@@ -279,6 +299,7 @@ Content-Type: application/json
|
||||
{
|
||||
"name": "Knowledge Base 2026-002",
|
||||
"datenbankId": "kb-external-456",
|
||||
"aktivierungsstatus": "new",
|
||||
"syncStatus": "unclean"
|
||||
}
|
||||
```
|
||||
@@ -289,6 +310,7 @@ PUT /api/v1/CAIKnowledge/{id}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"aktivierungsstatus": "active",
|
||||
"syncStatus": "synced",
|
||||
"lastSync": "2026-03-11T20:00:00+00:00"
|
||||
}
|
||||
@@ -330,6 +352,17 @@ DELETE /api/v1/CAIKnowledge/{id}/dokumentes/{dokumentId}
|
||||
|
||||
### Filterung & Suche
|
||||
|
||||
#### Nach aktivierungsstatus filtern
|
||||
```http
|
||||
GET /api/v1/CAIKnowledge?where[0][type]=equals&where[0][attribute]=aktivierungsstatus&where[0][value]=active
|
||||
```
|
||||
|
||||
**Verfügbare Werte:**
|
||||
- `new` - Neu angelegt (Standard, blaue Badge)
|
||||
- `active` - Aktiv synchronisiert (grüne Badge)
|
||||
- `paused` - Synchronisation pausiert (gelbe Badge)
|
||||
- `deactivated` - Synchronisation deaktiviert (rote Badge)
|
||||
|
||||
#### Nach datenbankId suchen
|
||||
```http
|
||||
GET /api/v1/CAIKnowledge?where[0][type]=equals&where[0][attribute]=datenbankId&where[0][value]=kb-123
|
||||
@@ -648,7 +681,7 @@ GET /api/v1/CAdvowareAkten?select=id,name,syncStatus,lastSync
|
||||
### Beispiel 1: Alle unsynchronisierten Akten mit Details
|
||||
|
||||
```bash
|
||||
curl -X GET "https://crm.example.com/api/v1/CAdvowareAkten?where[0][type]=equals&where[0][attribute]=syncStatus&where[0][value]=unclean&select=id,name,aktenzeichen,syncStatus&orderBy=createdAt&order=desc" \
|
||||
curl -X GET "https://crm.example.com/api/v1/CAdvowareAkten?where[0][type]=equals&where[0][attribute]=syncStatus&where[0][value]=unclean&select=id,name,aktenzeichen,aktivierungsstatus,syncStatus&orderBy=createdAt&order=desc" \
|
||||
-H "X-Api-Key: your-api-key"
|
||||
```
|
||||
|
||||
@@ -699,6 +732,7 @@ curl -X PUT "https://crm.example.com/api/v1/CAdvowareAkten/akte-123" \
|
||||
-H "X-Api-Key: your-api-key" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"aktivierungsstatus": "active",
|
||||
"syncStatus": "synced",
|
||||
"lastSync": "2026-03-11T20:00:00+00:00"
|
||||
}'
|
||||
@@ -722,10 +756,64 @@ curl -X GET "https://crm.example.com/api/v1/CAdvowareAktenCDokumente?where[0][ty
|
||||
-H "X-Api-Key: your-api-key"
|
||||
```
|
||||
|
||||
### Beispiel 7: Alle aktiven Akten abrufen
|
||||
|
||||
```bash
|
||||
# Finde alle Akten die aktiv synchronisiert werden
|
||||
curl -X GET "https://crm.example.com/api/v1/CAdvowareAkten?where[0][type]=equals&where[0][attribute]=aktivierungsstatus&where[0][value]=active&select=id,name,aktenzeichen,aktivierungsstatus,syncStatus" \
|
||||
-H "X-Api-Key: your-api-key"
|
||||
```
|
||||
|
||||
### Beispiel 8: Akte von "new" auf "active" setzen
|
||||
|
||||
```bash
|
||||
# Aktiviere eine neu angelegte Akte
|
||||
curl -X PUT "https://crm.example.com/api/v1/CAdvowareAkten/akte-123" \
|
||||
-H "X-Api-Key: your-api-key" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"aktivierungsstatus": "active"
|
||||
}'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Wichtige Hinweise
|
||||
|
||||
### Aktivierungsstatus
|
||||
|
||||
**Zweck:** Steuerung der Synchronisations-Aktivität für Akten und AI Knowledge Entries
|
||||
|
||||
**Verfügbare Status:**
|
||||
- `new` (Standard) - Neu angelegte Einträge, noch nicht für Sync aktiviert
|
||||
- `active` - Aktiv synchronisiert, alle Sync-Prozesse laufen
|
||||
- `paused` - Synchronisation temporär pausiert, kann wieder aktiviert werden
|
||||
- `deactivated` - Synchronisation dauerhaft deaktiviert
|
||||
|
||||
**Anwendungsfälle:**
|
||||
```bash
|
||||
# Neue Akte anlegen (automatisch status="new")
|
||||
POST /api/v1/CAdvowareAkten { "name": "...", "aktivierungsstatus": "new" }
|
||||
|
||||
# Akte für Sync aktivieren
|
||||
PUT /api/v1/CAdvowareAkten/{id} { "aktivierungsstatus": "active" }
|
||||
|
||||
# Sync temporär pausieren (z.B. während Wartung)
|
||||
PUT /api/v1/CAdvowareAkten/{id} { "aktivierungsstatus": "paused" }
|
||||
|
||||
# Sync permanent deaktivieren
|
||||
PUT /api/v1/CAdvowareAkten/{id} { "aktivierungsstatus": "deactivated" }
|
||||
```
|
||||
|
||||
**Filterung:**
|
||||
```bash
|
||||
# Nur aktive Einträge für Sync-Job
|
||||
GET /api/v1/CAdvowareAkten?where[0][type]=equals&where[0][attribute]=aktivierungsstatus&where[0][value]=active
|
||||
|
||||
# Alle pausierte oder deaktivierte
|
||||
GET /api/v1/CAdvowareAkten?where[0][type]=in&where[0][attribute]=aktivierungsstatus&where[0][value][0]=paused&where[0][value][1]=deactivated
|
||||
```
|
||||
|
||||
### Junction-Spalten via REST API
|
||||
|
||||
**✅ RICHTIG:** Nutze Junction-Entity-APIs
|
||||
@@ -780,6 +868,6 @@ WHERE name = 'Your Role Name';
|
||||
---
|
||||
|
||||
**Letzte Aktualisierung:** 11. März 2026
|
||||
**Version:** 1.0
|
||||
**Version:** 1.1
|
||||
|
||||
Für weitere Fragen: Siehe `custom/docs/ESPOCRM_BEST_PRACTICES.md`
|
||||
|
||||
Reference in New Issue
Block a user