The following endpoint can be used to add or update a contact within the Hyfin application.
The following endpoint can be used to add or update a contact. You must replace the {base_url} and {site_id} variable with the id of the customer that this contact belongs to.
{
"first_name": "John",
"last_name": "Doe",
"display_name": "John Doe",
"language": "en",
"emails": [
{
"label": "work",
"address": "johndoe@abc.com",
"is_primary": true
}
],
"phone_numbers": [
{
"label": "mobile",
"number": "333-444-5555",
"is_primary": true
}
],
"addresses": [
{
"label": "billing",
"is_primary": true,
"address": {
"address_line1": "123 Main Street",
"address_line2": "Suite 123",
"city": "Naples",
"state_code": "FL",
"zip_code": "34102"
}
}
]
}
{
"success": true,
"action": "added",
"_id": "60f720d248f143332af022e0"
}
{
"success": false,
"errors": [
"invalid field2",
"missing field_name"
]
}