Feature: Enquiry
The enquiry feature handles property enquiry form submissions.
Directory Structure
src/features/enquiry/
api/
enquiry.ts # Submit enquiry server actionAPI Function
submitEnquiry(enquiryData)
Defined in src/features/enquiry/api/enquiry.ts. Submits a property enquiry to the v2 API via POST /properties/enquiry.
Parameters:
{
house_id: number; // Property ID
name: string; // Enquirer's name
email: string; // Enquirer's email
contact_no: string; // Phone number
viewing_time?: string; // Preferred viewing time (optional)
message?: string; // Additional message (optional)
timezone?: string; // User's timezone (optional)
}Response:
Returns the API response on success (which may include existingUser: boolean), or null on error.
Usage
The enquiry form is used on property detail pages to allow prospective tenants to express interest in a property or request a viewing. The house_id links the enquiry to a specific property listing.
The response’s existingUser field can be used to show different confirmation messaging depending on whether the enquirer is already a Housr user.
Last updated on