Skip to main content

Webhooks

By using webhooks EstateSync can notify you about events that you would need to query the API for otherwise. Every webhook can be triggered by the events that you pass when creating the webhook (see section "Webhooks"). EstateSync attempts to POST with an application/json body to the URL you supply. The content has the form

{
"eventName": "[event_name]",
"eventPayload": {},
"eventTime": "[event_time_ISO_string]"
}

The request.created event#

To get notified about new requests EstateSync receives, you can create a webhook that reacts to the request.created event. The eventPayload field of the body will contain the request. It has the same structure as requests returned by GET /requests/{id}. For more information on how to get these notifications see the section "Configuring Contact Requests".

The request.parsing_failed event#

To get notified about requests that EstateSync receives but cannot parse, you can create a webhook that reacts to the request.parsing_failed event. The eventPayload field of the body will contain details of the received email and why it could not be parsed as a request.

This event can occur when you forward emails to EstateSync that are not real contact requests from a target platform and hence do not include an XML attachment. The best way to prevent this is to setup email forwarding based on the sender address as described in the "Configuring Contact Requests" section.

{
"targetId": "[id-of-the-email-target]",
"createdAt": "[ISO-datetime-of-failure]",
"failureCode": "[short-error-code]",
"failureMessage": "[readable-error-description]",
"sender": "[sender-address-of-the-email]",
"recipient": "[recipient-address-of-the-email]",
"subject": "[subject-of-the-email]",
"body": "[body-of-the-email]",
}

The publication.succeeded event#

To get notified about successful updates of listings, you can create a webhook that reacts to the publication.succeeded event. The eventPayload field contains an object with details of the publication:

{
"listingId": "[id-of-the-concerned-listing]",
"propertyId": "[id-of-property-of-the-listing]",
"targetId": "[id-of-the-target-of-the-listing]",
"type": "set" // or "delete"
}

The publication.failed event#

To get notified about failed updates of listings, you can create a webhook that reacts to the publication.failed event. The eventPayload field contains an object with the publication as well as details of the failure:

{
"failureCode": "[short-error-code]",
"failureMessage": "[readable-error-description]",
"listingId": "[id-of-the-concerned-listing]",
"propertyId": "[id-of-property-of-the-listing]",
"targetId": "[id-of-the-target-of-the-listing]",
"type": "set" // or "delete"
}

The property.processing_succeeded event#

To get notified about successfully finished processings of properties (e.g. when all attachments are fetched), you can create a webhook that reacts to the property.processing_succeeded event. The eventPayload field of the body will contain the processed property.

The property.processing_failed event#

To get notified about unsuccessful processings of properties (e.g. when an attachment could not be fetched due to a not-found response), you can create a webhook that reacts to the property.processing_failed event. The eventPayload field of the body will contain the processed property as well as details of the failure.

{
"failureCode": "[short-error-code]",
"failureMessage": "[readable-error-description]",
// ... all other attributes of the property
}