Appearance
Contact
Allowed query parameters
Filters
Filter | Type | Description |
---|---|---|
search | String | Full-text search |
company | Id | Filter by Company Id |
custom_field | Key,String | Filter by Custom Field (eg. my_internal_id,42 ) |
Sorting
firstname
, lastname
, created_at
Includes
company.media
, invoices
, pendingInvoices
, overdueInvoices
, invoicesCount
, overdueInvoicesCount
, pendingInvoicesCount
,
Create a contact
post
/contact
Attribute (* required) | Type | Description |
---|---|---|
company_id | Id? | A Company Id |
firstname | String? | Contact firstname |
lastname | String? | Contact lastname |
position | String? | Contact position |
company_name | String? | Company name |
email | String? | Email address |
phone_landline | String? | Landline phone number |
phone_mobile | String? | Mobile phone number |
address | String? | Address line 1 |
address_line_2 | String? | Address line 2 |
city | String? | City |
zip | String? | Postal code |
state | String? | State |
country | String? | Country code (2-letter ISO code) |
remarks | String? | Contact remarks or notes |
preferred_language | String? | Preferred language code (e.g., 'de', 'en') |
salutation | String? | Contact salutation |
custom_fields | Object? | Custom data as Custom Fields |
Example response
json
// HTTP 201 Created
{
// a contact object
}
Update a contact
put
/contact/{id}
Attribute (* required) | Type | Description |
---|---|---|
company_id | Id? | A Company Id |
firstname | String? | Contact firstname |
lastname | String? | Contact lastname |
position | String? | Contact position |
company_name | String? | Company name |
email | String? | Email address |
phone_landline | String? | Landline phone number |
phone_mobile | String? | Mobile phone number |
address | String? | Address line 1 |
address_line_2 | String? | Address line 2 |
city | String? | City |
zip | String? | Postal code |
state | String? | State |
country | String? | Country code (2-letter ISO code) |
remarks | String? | Contact remarks or notes |
preferred_language | String? | Preferred language code (e.g., 'de', 'en') |
salutation | String? | Contact salutation |
custom_fields | Object? | Custom data as Custom Fields |
Example response
json
// HTTP 200 OK
{
// a contact object
}
Retrieve a contact
get
/contact/{id}
Example response
json
// HTTP 200 OK
{
"id": "PQYLdqm4wR",
"salutation": null,
"company_name": "GoFly Travel",
"firstname": "John",
"lastname": "Doe",
"name": "John Doe",
"fullName": "John Doe",
"position": "CEO",
"email": "john@gofly.travel",
"phone_landline": "+41 44 123 45 67",
"phone_mobile": "+41 79 123 45 67",
"address": "Bahnhofstrasse 1",
"address_line_2": null,
"city": "Zurich",
"zip": "8001",
"state": null,
"country": "CH",
"fullAddress": "Bahnhofstrasse 1 CH-8001 Zurich",
"fullAddressHtml": "Bahnhofstrasse 1<br/>CH-8001 Zurich",
"remarks": null,
"preferred_language": "de",
"logo_url": "https://logo.clearbit.com/gofly.travel",
"company_id": "wRm4dqLYQP",
"custom_fields": {},
"created_at": "2023-09-22T10:15:30.000000Z"
}
Delete a contact
delete
/contact/{id}
Example response
json
// HTTP 204 No Content
List contacts
get
/contact
The list endpoint accepts the same parameters as in Retrieve a contact and returns a paginated array of the same contact object in the data
property.
Read more about Pagination, Filtering, Sorting and Includes on the Introduction page.