Statuses
Statuses are used to identify the current status of a Contact or Property
Object Definition
| Field | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the object |
created_at | string | ISO 8601 datetime when the status was originally created |
updated_at | string | ISO 8601 datetime when the status was last updated |
label | string | Label for the status (e.g Pending, Active, For Sale, For Let, etc) |
type | object | Identifies which entity the status belongs to (Either a Contact or Property) |
type.code | integer | Machine identifiable code to identify the type of status (1 for Contact, 2 for Property) |
type.name | string | Human readable label to identify the type of status (Either Contact or Property) |
List all Statuses
Retrieve a paginated list of all the accounts Statuses. GET /statuses.
Filters
You may filter the results from the list endpoint using the following query parameters
| Field | Type | Description |
|---|---|---|
uuid | string | Exact match for the status' uuid |
Example Response
{
"data": [
{
"uuid": "37540be9-6499-45c8-a224-69c8d692758c",
"created_at": "2018-08-02T16:01:43+01:00",
"updated_at": "2018-08-02T16:01:47+01:00",
"label": "For Sale",
"type": {
"code": 2,
"name": "Property"
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
}
Get a single Status
Retrieve a single status by it's uuid. GET /statuses/:uuid.
Example Response
{
"data": {
"uuid": "37540be9-6499-45c8-a224-69c8d692758c",
"created_at": "2018-08-02T16:01:43+01:00",
"updated_at": "2018-08-02T16:01:47+01:00",
"label": "For Sale",
"type": {
"code": 2,
"name": "Property"
}
}
}
Creating a Status
Perform a POST request to the /statuses endpoint. This endpoint will return a HTTP 201 status code on success.
Input
| Field | Type | Description |
|---|---|---|
label | string | Human readable label for the status |
type | object | Identifies which entity the status belongs to (Either a Contact or Property) |
type.code | integer | Machine identifiable code to identify the type of status (1 for Contact, 2 for Property) |
Updating a Status
Perform a PUT request to the /statuses/:uuid endpoint. This endpoint will return a HTTP 200 status code on success.
Input
| Field | Type | Description |
|---|---|---|
label | string | Human readable label for the status |
Deleting a Status
Perform a DELETE request to the /statuses/:uuid endpoint. This endpoint will return a HTTP 204 status code on success.
This endpoint will automatically remove the Status from any Contacts or Properties.
