Listing Detail
The Listing Detail view embeds a single listing, displaying all relevant property details for potential renters. This view allows users to submit enquiries and book viewings.
Usage
To embed a Listing Detail view, call:
residently.embedView("listing", options);
Example
residently.embedView("listing", {
container: html_element_to_render_into,
listingId: "id_from_page_url"
});
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
view | "listing" | ✅ Yes | Must be `"listing" to show the listing view. |
options | object | ✅ Yes | Configuration options for the embed view. |
options object
| Property | Type | Required | Description |
|---|---|---|---|
container | HTMLElement | ✅ Yes | The HTML element where the listing will be rendered. |
listingId | string | ✅ Yes | The unique identifier of the listing to display. |
Events
Events allow you to track key user interactions within the embedded listing.
enquirySubmitted
A user submits an enquiry for the property they are viewing.
Example usage
residently.on("enquirySubmitted", (enquiryDetails) => {
console.log("Enquiry submitted:", enquiryDetails);
});
enquiryDetails object schema:
| Property | Type | Description |
|---|---|---|
listingId | string | The unique identifier of the listing. |
renterName | string | The name of the renter. |
viewingBooked
A user books a viewing for the property.
Example usage
residently.on("viewingBooked", (viewingDetails) => {
console.log("Viewing booked:", viewingDetails);
});
viewingDetails object schema:
| Property | Type | Description |
|---|---|---|
listingId | string | The unique identifier of the listing. |
renterName | string | The name of the renter. |
viewingTime | string | The date and time of the viewing (ISO 8601 format). eg. 2025-03-10T10:20:00+00:00 |