Referring a property
Referring a property is done by using one of two methods depending on the type of property you're referring.
Residential properties
To refer a residential property, you'll need to use the Properties.ReferResidentialPropertyAsync method on the API
client:
var response = await client.Properties.ReferResidentialPropertyAsync(new ReferResidentialPropertyRequest
{
Address = new PropertyAddress
{
HouseNameNumber = "123",
Street = "Test Street",
Locality = "Test Locality",
City = "Test City",
County = "Test County",
Postcode = "TE2 2ST",
Country = "GB"
},
PropertyType = propertyTypeId
CentralHeatingType = centralHeatingTypeId,
Bedrooms = 1,
Bathrooms = 2,
Receptions = 3,
Description = "Test description",
ParkingType = parkingTypeId,
ApproximateValuation = 300000,
VendorCustomerId = vendorCustomerId,
ReferrerUserId = referrerUserId,
};
The potential values for propertyTypeId, centralHeatingTypeId and parkingTypeId can be retrieved by getting the
collections of list data from the API client.
Commercial properties
To refer a commercial property, you'll need to use the Properties.ReferCommercialPropertyAsync method on the API
client:
var response = await client.Properties.ReferCommercialPropertyAsync(new ReferCommercialPropertyRequest
{
Address = new PropertyAddress
{
HouseNameNumber = "123",
Street = "Test Street",
Locality = "Test Locality",
City = "Test City",
County = "Test County",
Postcode = "TE2 2ST",
Country = "GB"
},
PropertyType = propertyTypeId
BusinessType = businessTypeId,
Description = "Test description",
ParkingType = parkingTypeId,
ApproximateValuation = 300000,
VendorCustomerId = vendorCustomerId,
ReferrerUserId = referrerUserId,
};
The potential values for propertyTypeId, businessTypeId and parkingTypeId can be retrieved by getting the
collections of list data from the API client.
Validation
ReferResidentialPropertyRequest
| Name | Type | Required | Max Length | Other Rules |
|---|---|---|---|---|
| VendorCustomerId | int | Yes | - | Must be a valid Pattinson customer id |
| ReferrerUserId | int | Yes | - | Must be a valid user for the partner agent |
| Address | PropertyAddress | Yes | - | Validated by AddressValidator |
| PropertyType | int | Yes | - | Must be a valid property type |
| CentralHeatingType | int | Yes | - | Must be a valid central heating type |
| Bedrooms | int | Yes | - | Must be greater than or equal to 0 |
| Bathrooms | int | Yes | - | Must be greater than or equal to 0 |
| Receptions | int | Yes | - | Must be greater than or equal to 0 |
| Description | string | No | 1000 | |
| ParkingType | int | Yes | - | Must be a valid parking type |
| ApproximateValuation | int | Yes | - | Must be greater than or equal to 0 |
ReferCommercialPropertyRequest
| Name | Type | Required | Max Length | Other Rules |
|---|---|---|---|---|
| VendorCustomerId | int | Yes | - | Must be a valid Pattinson customer id |
| ReferrerUserId | int | Yes | - | Must be a valid user for the partner agent |
| Address | PropertyAddress | Yes | - | Validated by AddressValidator |
| PropertyType | int | Yes | - | Must be a valid property type |
| BusinessType | int | Yes | - | Must be a valid business type |
| Description | string | No | 1000 | |
| ParkingType | int | Yes | - | Must be a valid parking type |
| ApproximateValuation | int | Yes | - | Must be greater than or equal to 0 |
Address (PropertyAddress)
| 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 |