Contacts
// TODO need a description for contacts
Object Definition
| Field | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the object |
created_at | string | ISO 8601 datetime when the contact was originally created |
updated_at | string | ISO 8601 datetime when the contact was last updated |
name | string | Name of the contact |
email | string | Email of the contact |
contact_number | string / null | Contact number of the contact |
company | string / null | Name of the company the contact is associated with |
address | string / null | Line 1 of the contact's address |
address2 | string / null | Line 2 of the contact's address |
city | string / null | |
county | string / null | |
postcode | string / null | |
num_attachments | integer | Number of attachments associated with the contact |
num_notes | integer | Number of notes associated with the contact |
Embeddable Entities
You may embed the following entities with a contact, for more information see our embed docs
List all Contacts
Retrieve a paginated list of all the accounts Contacts. GET /contacts.
Filters
You may filter the results from the list endpoint using the following query parameters
| Field | Type | Description |
|---|---|---|
uuid | string | Exact match for the contact's uuid |
created_at | Datetime | Exact datetime or date range |
updated_at | Datetime | Exact datetime or date range |
name | string | Fuzzy search for the contact's name |
email | string | Fuzzy search for the contact's email |
contact_number | string | Fuzzy search for the contact's contact number |
company | string | Fuzzy search for the contact's company |
address | string | Fuzzy search for the contact's address line 1 |
address2 | string | Fuzzy search for the contact's address line 2 |
city | string | Fuzzy search for the contact's city |
county | string | Fuzzy search for the contact's county |
postcode | string | Fuzzy search for the contact's postcode |
status | Relational Filter | Filter using status attributes |
type | Relational Filter | Filter using type attributes |
competencies | Relational Filter | Filter using competency attributes |
property | Relational Filter | Filter using property attributes |
custom_fields | Relational Filter | Filter using custom field attributes |
Example Response
{
"data": [
{
"uuid": "6a088808-5a18-4efe-affa-83e851980c4f",
"created_at": "2018-08-02T10:00:45+01:00",
"updated_at": "2018-08-02T10:00:54+01:00",
"name": "Jane Doe",
"email": "jane.doe@example.com",
"contact_number": "+440000000000",
"company": "Radweb Ltd",
"address": "1400 Blueprint",
"address2": "Dundas Spur",
"city": "Portsmouth",
"county": "Hampshire",
"postcode": "PO3 5RW",
"num_attachments": 1,
"num_notes": 1
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 10,
"current_page": 1,
"total_pages": 1
}
}
}
Get a single Contact
Retrieve a single contact by it's uuid. GET /contacts/:uuid.
Example Response
{
"data": {
"uuid": "6a088808-5a18-4efe-affa-83e851980c4f",
"created_at": "2018-08-02T10:00:45+01:00",
"updated_at": "2018-08-02T10:00:54+01:00",
"name": "Jane Doe",
"email": "jane.doe@example.com",
"contact_number": "+440000000000",
"company": "Radweb Ltd",
"address": "1400 Blueprint",
"address2": "Dundas Spur",
"city": "Portsmouth",
"county": "Hampshire",
"postcode": "PO3 5RW",
"num_attachments": 1,
"num_notes": 1
}
}
Creating a Contact
Perform a POST request to the /contacts endpoint. This endpoint will return a HTTP 201 status code on success.
Input
| Field | Type | Description |
|---|---|---|
name | string | Name of the contact Required |
email | string | Email of the contact Required |
contact_number | string / null | Contact number of the contact |
company | string / null | Name of the company the contact is associated with |
address | string / null | Line 1 of the contact's address |
address2 | string / null | Line 2 of the contact's address |
city | string / null | |
county | string / null | |
postcode | string / null |
Updating a Contact
Perform a PUT request to the /contacts/:uuid endpoint. This endpoint will return a HTTP 200 status code on success.
Input
| Field | Type | Description |
|---|---|---|
name | string | Name of the contact |
email | string | Email of the contact |
contact_number | string / null | Contact number of the contact |
company | string / null | Name of the company the contact is associated with |
address | string / null | Line 1 of the contact's address |
address2 | string / null | Line 2 of the contact's address |
city | string / null | |
county | string / null | |
postcode | string / null |
Deleting a Contact
Perform a DELETE request to the /contacts/:uuid endpoint. This endpoint will return a HTTP 204 status code on success.
