• 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

Managing branch users

In order to refer a property, you will need to state which agent has referred it. This is done by using a branch user ID from the Pattinson system.

Getting a list of all users

To get a list of all users, you can use the Users.GetAllAsync method on the API client:

var users = await client.Users.GetAllAsync();

This will return an IReadOnlyList<T> of UserDetails objects, from which you can determine if the user you're using already exists in our system.

If they do, you're ready to refer a property. If not, you'll need to create a new user.

Creating a new user

To create a new user, you'll need to assign them to a branch within the Pattinson system. You can get a list of all the branches you have available to you by using the Branches.GetAllAsync method on the API client:

var branches = await client.Branches.GetAllAsync();

This will return an IReadOnlyList<T> of BranchDetails objects, from which you can determine which branch you want to assign the user to.

Once you've decided which branch to assign the user to, you can create a new user by using the Users.CreateAsync method on the API client:

var result = await apiClient.Users.CreateUserAsync(new CreateUserRequest
{
    BranchId = 123,
    Email = "test-partner-agent-user@example.com",
    FirstName = "Test",
    LastName = "Partner Agent User"
});

The branch ID used here must be one of the IDs returned from the Branches.GetAllAsync method.

This will return a CreateUserResponse object, from which you can determine if the user was created successfully. If it was, you're ready to refer a property.

Validation

Name Type Required Max Length Other Rules
BranchId int Yes - Valid for current agent
Email string Yes 255 Format: Email, Unique
FirstName string Yes 100
LastName string Yes 100
In This Article
Back to top Generated by DocFX