• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Setting up the API Client
  • Using the API Client
    • Getting started
  • Customers
    • Adding a customer
  • Branch Users
    • Managing branch users
  • List data
    • Getting list data
  • Properties
    • Referring a property
    • Searching for properties
    • Getting property details
  • Property Images
    • Listing property images
    • Adding property images
    • Removing property images
  • Property Notes
    • Listing property notes
  • Viewings
    • Listing property viewings
    • Creating a viewing
    • Rescheduling a viewing
    • Cancelling a viewing
    • Adding viewing feedback

Creating a viewing

In order to create a viewing, you need to call the Viewings.CreateViewingAsync method on the API client:

var response = await apiClient.Viewings.CreateViewingAsync(new CreateViewingRequest
{
    PropertyId = 300038,
    CustomerId = 874427,
    ReferrerUserId = 874429,
    // tomorrow 
    Date = DateTime.UtcNow.AddDays(1).Date,
    // 10am
    From = new TimeSpan(10, 0, 0),
    // 11am
    To = new TimeSpan(11, 0, 0),
    Notes = "Test notes"
});

The response variable will contain a CreateViewingResponse object, which will indicate whether the viewing was created successfully or not. If it was, there will be a ViewingDetails object in the Viewing property, which will contain the information about the viewing that was created.

Validation

Name Type Required Max Length Other Rules
PropertyId int Yes - Must be greater than 0 and must be valid for the agent
Date DateTime Yes - Must be greater than or equal to today's date
From TimeSpan Yes - Must be a valid time (i.e. 00:00 to 23:59)
To TimeSpan Yes - Must be greater than From and must be a valid time
ReferrerUserId int Yes - Must be a valid referrer user ID
CustomerId int Yes - Must be a valid customer ID
Notes string (nullable) No -
In This Article
Back to top Generated by DocFX