Skip to content

Contact

Allowed query parameters

Filters

FilterTypeDescription
searchStringFull-text search
companyIdFilter by Company Id
custom_fieldKey,StringFilter 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)TypeDescription
company_idId?A Company Id
firstnameString?Contact firstname
lastnameString?Contact lastname
positionString?Contact position
company_nameString?Company name
emailString?Email address
phone_landlineString?Landline phone number
phone_mobileString?Mobile phone number
addressString?Address line 1
address_line_2String?Address line 2
cityString?City
zipString?Postal code
stateString?State
countryString?Country code (2-letter ISO code)
remarksString?Contact remarks or notes
preferred_languageString?Preferred language code (e.g., 'de', 'en')
salutationString?Contact salutation
custom_fieldsObject?Custom data as Custom Fields

Example response

json
// HTTP 201 Created
{
    // a contact object
}

Update a contact

put
/contact/{id}
Attribute (* required)TypeDescription
company_idId?A Company Id
firstnameString?Contact firstname
lastnameString?Contact lastname
positionString?Contact position
company_nameString?Company name
emailString?Email address
phone_landlineString?Landline phone number
phone_mobileString?Mobile phone number
addressString?Address line 1
address_line_2String?Address line 2
cityString?City
zipString?Postal code
stateString?State
countryString?Country code (2-letter ISO code)
remarksString?Contact remarks or notes
preferred_languageString?Preferred language code (e.g., 'de', 'en')
salutationString?Contact salutation
custom_fieldsObject?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.