Concepts
Alert
Recherche sauvegardée avec livraison email et/ou webhook
Une Alert est une recherche sauvegardée qui produit des AlertEvents quand de nouveaux listings correspondent. Les événements sont livrés via EventDestinations (email ou webhook) selon les rules configurées.
Schéma Alert
| Champ | Type | Description |
|---|---|---|
id | string (uuid) | Lecture seule |
name | string | null | Nom de l'alerte |
active | boolean | Statut actif |
searchMode | enum | CLASSIC ou ADVANCED |
criteria | CriteriaNodeDTO | null | Arbre récursif de critères |
notificationConfig | AlertNotificationConfigDTO | null | Règles de notification |
eventDestinationId | string | null | UUID de l'EventDestination liée (read-only) |
signingKey | string | null | Clé HMAC pour signer les webhooks (présent dans la réponse POST uniquement) |
destinationWebhookUrl | string | null | URL webhook (pour créer/mettre à jour la destination) |
destinationEmail | string | null | Email (pour créer/mettre à jour la destination) |
createdAt / updatedAt | string | null | ISO 8601 |
Règles de notification (AlertNotificationRuleDTO)
Chaque règle cible un eventType et peut être conditionnée par un seuil :
eventType | Déclencheur |
|---|---|
NEW_MATCH | Une property correspond pour la première fois |
ADDITIONAL_LISTING | Un listing supplémentaire s'ajoute sur une property déjà matchée |
PRICE_CHANGED | Le prix change (voir seuils ci-dessous) |
ANY_ATTRIBUTE_CHANGED | Un attribut quelconque change |
LISTING_EXPIRED | Un listing expire |
Seuils pour PRICE_CHANGED :
thresholdPercentage— déclenche si la variation dépasse X%thresholdMinPercentage/thresholdMaxPercentage— plage de variationthresholdDirection—INCREASEouDECREASEenabled— boolean
Endpoints
POST /alerts— créer (réponse contientsigningKeysi webhook)GET /alerts— listerGET /alerts/{uuid}— détailPUT /alerts/{uuid}— mettre à jourDELETE /alerts/{uuid}— supprimerGET /alerts/{alertUuid}/events— AlertEvents produits par cette alerteGET /alerts/{alertUuid}/events/{uuid}— détail d'un event
Voir aussi : Notifications pour EventDestination et la livraison.