Audit
Chaque action sur le registre (création, modification, suppression, changement de statut) est automatiquement tracée dans un journal d'audit. Cela garantit la conformité et la traçabilité exigées pour le livre de police.
Les actions effectuées via l'API sont auditées de la même manière que celles réalisées depuis l'interface Registéo.
Consulter l'historique d'audit
GET /audit-log/{entityType}/{entityId}
Paramètres de chemin
| Paramètre | Type | Description |
|---|---|---|
entityType | string | Type d'entité : objet-mobilier, vendeur, profil-entreprise |
entityId | string | Identifiant de l'entité |
Réponse 200
[
{
"id": "uuid",
"action": "create",
"entityType": "objet-mobilier",
"entityId": "uuid",
"userId": "uuid",
"changes": {
"designation": { "from": null, "to": "Montre ancienne en or" },
"prixAchat": { "from": null, "to": 150 }
},
"createdAt": "2025-03-01T10:00:00Z"
},
{
"id": "uuid",
"action": "status_change",
"entityType": "objet-mobilier",
"entityId": "uuid",
"userId": "uuid",
"changes": {
"statut": { "from": "en_stock", "to": "vendu" },
"prixVente": { "from": null, "to": 280 }
},
"createdAt": "2025-06-15T14:30:00Z"
}
]
Champs de réponse
| Champ | Type | Description |
|---|---|---|
id | string | Identifiant de l'entrée d'audit |
action | string | create, update, delete, status_change |
entityType | string | Type d'entité concernée |
entityId | string | Identifiant de l'entité |
userId | string | Identifiant de l'opérateur ayant effectué l'action |
changes | object | Diff des champs modifiés (from → to) |
createdAt | string | Date et heure de l'action (ISO 8601) |