• 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

Adding a Customer

To add a customer to the system, you need to create a CreateCustomerRequest object and pass it to the Customers.CreateCustomerAsync method on the API client.

var request = new CreateCustomerRequest
{
    Address = new CustomerAddress
    {
        HouseNameNumber = "1",
        Street = "Test Street",
        Locality = "Test Locality",
        City = "Test City",
        County = "Test County",
        Postcode = "TE1 1ST",
        Country = "GB"
    },
    Email = "test@example.com",
    Title = "Mr",
    FirstName = "Test",
    LastName = "User",
    Mobile = "01234567890"
};

var response = await client.Customers.CreateCustomerAsync(request);

In the above example, we are creating a new customer with the following details:

  • Title: Mr
  • First Name: Test
  • Last Name: User
  • Email: test@example.com
  • Mobile: 01234567890
  • Address:
    • House Name/Number: 1
    • Street: Test Street
    • Locality: Test Locality
    • City: Test City
    • County: Test County
    • Postcode: TE1 1ST
    • Country: GB

The response object will contain the following properties:

  • IsSuccess: true if the customer was created successfully, false otherwise.
  • CustomerId: The ID of the customer that was created.
  • ErrorResponse: An ErrorResponse object containing details of any errors that occurred during the operation.

Validation

Request

Name Type Required Max Length Other Rules
Email string Yes 255
Mobile string No 100
Title string No -
FirstName string Yes 100
LastName string Yes 100
Address CustomerAddress Yes - Validated by Address rules as outlined below

Address

Name Type Required Max Length Other Rules
HouseNameNumber string Yes 200
Street string Yes 200
Locality string No 50
City string Yes 50
County string Yes 50
Postcode string Yes 10
Country string Yes 2 Length: 2, Format: ISO 3166-1 alpha-2
In This Article
Back to top Generated by DocFX