Using the listing.updated Webhook for Saved Searches and Favorite Listings
Our real estate APIs offer a variety of features for developers, one of which is the webhook functionality. In particular, the listing.updated webhook can be very useful for keeping users informed about updates to their favorite listings and saved searches that aren't supported by Repliers' integrating messaging and notifications. This article will guide you through the process of using the listing.updated webhook to notify users about specific changes to their favorite listings and saved searches.
Using our APIs, you can create saved searches for users and specify that you want them to be notified of new listings, price changes, and sold listings that meet their search criteria. Our platform supports extended messaging for saved searches, enabling automatic email and/or text message notifications for these events.
However, if you wish to notify users about other events related to their saved search matches or favorite listings—such as updates to the listing description, changes to photos, or other relevant changes—you will need to subscribe to the listing.updated event using our webhook feature.
To subscribe to the listing.updated event, follow these steps:
Subscribe to the Webhook: Register your webhook endpoint with our API to start receiving listing.updated notifications.
Parse the Payload: When a listing is updated, the webhook payload will include a previous object that identifies the values that have changed.
For more information on webhook subscriptions please refer to our Webhooks API Reference.
Here is an example of a previous object:
In this example, the daysOnMarket value for the listing has changed.
The webhook payload will also contain arrays of favorites and/or searches to help you determine if the update is relevant to any saved searches or favorite listings:
Searches Array: Indicates the saved searches that have a match with the updated listing.
Favorites Array: Lists the favorite listings that have been updated.
Upon receiving the webhook, you can parse the previous object and determine if any of the fields are important for your users.
You can use the searches and favorites arrays to identify which users should be notified about updates and send the appropriate notifications via our messaging feature if you wish or you can carry out any other actions as necessary.
By subscribing to the listing.updated webhook and parsing its payload, you can keep your users informed about important changes to their favorite listings and saved searches.
For further assistance, please contact our support team.
Setting Up Saved Searches and Notifications
Using our APIs, you can create saved searches for users and specify that you want them to be notified of new listings, price changes, and sold listings that meet their search criteria. Our platform supports extended messaging for saved searches, enabling automatic email and/or text message notifications for these events.
However, if you wish to notify users about other events related to their saved search matches or favorite listings—such as updates to the listing description, changes to photos, or other relevant changes—you will need to subscribe to the listing.updated event using our webhook feature.
Subscribing to the listing.updated Webhook
To subscribe to the listing.updated event, follow these steps:
Subscribe to the Webhook: Register your webhook endpoint with our API to start receiving listing.updated notifications.
Parse the Payload: When a listing is updated, the webhook payload will include a previous object that identifies the values that have changed.
For more information on webhook subscriptions please refer to our Webhooks API Reference.
Here is an example of a previous object:
"previous": {
"updatedOn": "2024-07-15T10:54:30.000Z",
"timestamps": {
"listingUpdated": "2024-07-15T10:54:30.000Z",
"repliersUpdatedOn": "2024-07-15T15:12:33.789Z"
},
"daysOnMarket": "5"
}
In this example, the daysOnMarket value for the listing has changed.
Identifying Relevant Updates
The webhook payload will also contain arrays of favorites and/or searches to help you determine if the update is relevant to any saved searches or favorite listings:
"searches": [{"matchId": 15768227, "searchId": 53353}],
"favorites": [1232112, 32433232, 234322332, 2342323]
Searches Array: Indicates the saved searches that have a match with the updated listing.
Favorites Array: Lists the favorite listings that have been updated.
Taking Action
Upon receiving the webhook, you can parse the previous object and determine if any of the fields are important for your users.
You can use the searches and favorites arrays to identify which users should be notified about updates and send the appropriate notifications via our messaging feature if you wish or you can carry out any other actions as necessary.
Conclusion
By subscribing to the listing.updated webhook and parsing its payload, you can keep your users informed about important changes to their favorite listings and saved searches.
For further assistance, please contact our support team.
Updated on: 29/11/2024
Thank you!