Properties
// TODO need a description for properties
Object Definition
| Field | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the object |
created_at | string | ISO 8601 datetime when the property was originally created |
updated_at | string | ISO 8601 datetime when the property was last updated |
address | string | Line 1 of the property address |
address2 | string / null | Line 2 of the property address |
city | string / null | |
county | string / null | |
postcode | string / null | |
type | string / null | Type of property (e.g House, Appartment, Commercial, etc) |
bedrooms | integer | Number of bedrooms the property has |
bathrooms | integer | Number of bathrooms the property has |
has_garage | boolean | If the property has a garage |
has_garden | boolean | If the property has a garden |
has_parking | boolean | If the property has parking |
num_attachments | integer | Number of attachments associated with the property |
num_notes | integer | Number of notes associated with the property |
Embeddable Entities
You may embed the following entities with a property, for more information see our embed docs
List all properties
Retrieve a paginated list of all the accounts Properties. GET /properties
Filters
You may filter the results from the list endpoint using the following query parameters
| Field | Type | Description |
|---|---|---|
uuid | string | Exact match for the property's uuid |
created_at | Datetime | Exact datetime or date range |
updated_at | Datetime | Exact datetime or date range |
address | string | Fuzzy search for the property's address line 1 |
address2 | string | Fuzzy search for the property's address line 2 |
city | string | Fuzzy search for the property's city |
county | string | Fuzzy search for the property's county |
postcode | string | Fuzzy search for the property's postcode |
type | string | Fuzzy search for the property's type |
bedrooms | integer | |
bathrooms | integer | |
has_garage | boolean | |
has_garden | boolean | |
has_parking | boolean |
Example Response
{
"data": [
{
"uuid": "01bbd14f-0ee8-4393-ac18-518023574abb",
"created_at": "2018-08-02T10:50:40+01:00",
"updated_at": "2018-08-02T10:50:44+01:00",
"address": "1400 Blueprint",
"address2": "Dundas Spur",
"city": "Portsmouth",
"county": "Hampshire",
"postcode": "PO3 5RW",
"type": "Office",
"bedrooms": 0,
"bathrooms": 4,
"has_garage": false,
"has_garden": false,
"has_parking": true,
"num_attachments": 0,
"num_notes": 0
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
}
Get a single Property
Retrieve a single property by it's uuid. GET /properties/:uuid.
Example Response
{
"data": {
"uuid": "01bbd14f-0ee8-4393-ac18-518023574abb",
"created_at": "2018-08-02T10:50:40+01:00",
"updated_at": "2018-08-02T10:50:44+01:00",
"address": "1400 Blueprint",
"address2": "Dundas Spur",
"city": "Portsmouth",
"county": "Hampshire",
"postcode": "PO3 5RW",
"type": "Office",
"bedrooms": 0,
"bathrooms": 4,
"has_garage": false,
"has_garden": false,
"has_parking": true,
"num_attachments": 0,
"num_notes": 0
}
}
Creating a Property
Perform a POST request to the /properties endpoint. This endpoint will return a HTTP 201 status code on success.
Input
| Field | Type | Description |
|---|---|---|
address | string | Line 1 of the property's address Required |
address2 | string / null | Line 2 of the property's address |
city | string / null | City of the property |
county | string / null | County of the property |
postcode | string | Postcode of the property Required |
type | string / null | Type of property (e.g House, Appartment, Commercial, etc) |
bedrooms | integer / null | Number of bedrooms (Defaults to 0) |
bathrooms | integer / null | Number of bathrooms (Defaults to 0) |
has_garage | boolean / null | If the property has a garage (Defaults to false) |
has_garden | boolean / null | If the property has a garden (Defaults to false) |
has_parking | boolean / null | If the property has parking (Defaults to false) |
contact | Relational Filter | Filter using contact attributes |
custom_fields | Relational Filter | Filter using custom field attributes |
Updating a Property
Perform a PUT request to the /properties/:uuid endpoint. This endpoint will return a HTTP 200 status code on success.
Input
| Field | Type | Description |
|---|---|---|
address | string | Line 1 of the property's address Required |
address2 | string / null | Line 2 of the property's address |
city | string / null | City of the property |
county | string / null | County of the property |
postcode | string | Postcode of the property Required |
type | string / null | Type of property (e.g House, Appartment, Commercial, etc) |
bedrooms | integer | Number of bedrooms |
bathrooms | integer | Number of bathrooms |
has_garage | boolean | If the property has a garage |
has_garden | boolean | If the property has a garden |
has_parking | boolean | If the property has parking |
Deleting a Property
Perform a DELETE request to the /properties/:uuid endpoint. This endpoint will return a HTTP 204 status code on success.
