Registers a new webhook subscription for specific events.
Webhooks allow your application to receive real-time notifications when events occur in Immofacile (e.g. a customer is created, a product is updated).
- Register a webhook by providing a target URL and the event types you want to subscribe to.
- When a subscribed event occurs, Immofacile sends an HTTP
POSTrequest to your URL with the event payload.
Each webhook payload contains:
event_type— the event that triggered the notificationresource_id— the ID of the affected resourcetimestamp— when the event occurred
- If your endpoint returns a 422, the resource is marked as errored with the reason from your response body (useful for rejecting invalid data).
- If your endpoint returns any other error (4xx/5xx or timeout), Immofacile retries up to 3 times with exponentially increasing delay.
- After 3 failed retries, the webhook is suspended and an internal log is created.
- A suspended webhook stops receiving events until it is manually reactivated (via
PUT /hooks/{id}).
- Respond with HTTP 200 within 10 seconds to acknowledge receipt.
- Process the payload asynchronously on your side if business logic is heavy.
- Return 422 with a descriptive body only when the data is intentionally rejected (e.g. duplicate detection, invalid state for your system).
- Use the
headersfield to include an API key for authenticating incoming requests on your server.
Event types follow the pattern RESOURCE_ACTION. Common examples:
CUSTOMER_CREATE— New customer createdCUSTOMER_UPDATE— Customer modifiedPRODUCT_CREATE— New product createdPRODUCT_UPDATE— Product modifiedPRODUCT_DELETE— Product deleted
The full list of available events is validated server-side. Invalid event types will be rejected with a 422.
HTTPS URL that will receive webhook payloads via POST. Must be publicly accessible and respond within 10 seconds.
Event types to subscribe to. Each value is validated against the list of available hook origins for the site. Invalid values return 422.
[ "CUSTOMER_CREATE", "CUSTOMER_UPDATE", "PRODUCT_CREATE", "PRODUCT_UPDATE" ]
Custom key-value headers to include in every webhook HTTP request. Useful for authentication (e.g. API keys).
{ "X-Api-Key": "secret" }
- Mock serverhttps://api-doc.immo-facile.com/_mock/openapi/hooks
- https://v2.immo-facile.com/api/v2/sitehttps://v2.immo-facile.com/api/v2/site/hooks
curl -i -X POST \
https://api-doc.immo-facile.com/_mock/openapi/hooks \
-H 'Authorization: Bearer <YOUR_opaque_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://portail.example.com/webhook",
"origines": [
"CUSTOMER_CREATE",
"CUSTOMER_UPDATE",
"PRODUCT_CREATE",
"PRODUCT_UPDATE"
],
"headers": {
"X-Api-Key": "my-secret-key"
}
}'