Update Secondary Contacts
General Info
The following API requests will allow you to update an existing client with secondary contacts.
Access Requirements
Access | Requires Authorization |
Scopes | user:clients:read user:clients:write |
Update Existing Client Profile with Secondary Contacts
Request: PUT
https://api.freshbooks.com/accounting/account/<accountId>/users/clients/
{
"client": {
"contacts": [
{
"email": "[email protected]",
"fname": "AJ",
"lname": "McLean",
"phone1": "18663036061"
},
{
"email": "[email protected]",
"fname": "Howie",
"lname": "Dorough",
"phone1": "18661235678"
}
]
}
}
Response:
{
"response": {
"result": {
"client": {
"accounting_systemid": "E85Qp",
"allow_late_fees": true,
"allow_late_notifications": true,
"bus_phone": "",
"company_industry": null,
"company_size": null,
"currency_code": "CAD",
"direct_link_token": null,
"email": "[email protected]",
"fax": "",
"fname": "Barbara",
"has_retainer": null,
"home_phone": "",
"id": 111111,
"language": "en",
"last_activity": null,
"last_login": null,
"level": 0,
"lname": "Walters",
"mob_phone": "",
"note": "Says my invoices are the best",
"notified": false,
"num_logins": 0,
"organization": "20/20",
"p_city": "",
"p_code": "",
"p_country": "Canada",
"p_province": "",
"p_street": "",
"p_street2": "",
"pref_email": true,
"pref_gmail": false,
"retainer_id": null,
"role": "client",
"s_city": "",
"s_code": "",
"s_country": "",
"s_province": "",
"s_street": "",
"s_street2": "",
"signup_date": "2018-07-11 15:39:04",
"statement_token": null,
"subdomain": null,
"updated": "2019-07-18 13:17:52",
"userid": 111111,
"username": "barbarawalters",
"vat_name": null,
"vat_number": "",
"vis_state": 0
}
}
}
}
Get Client Profile and Associated Secondary Contacts
Request: GET
https://api.freshbooks.com/accounting/account/<accountId>/users/clients/?include[]=recent_contacts
Response:
{
"response": {
"result": {
"clients": [
{
"accounting_systemid": "E85Qp",
"allow_late_fees": true,
"allow_late_notifications": true,
"bus_phone": "",
"company_industry": null,
"company_size": null,
"currency_code": "CAD",
"direct_link_token": null,
"email": "",
"fax": "",
"fname": "Kevin",
"has_retainer": null,
"home_phone": null,
"id": 509270,
"language": "en",
"last_activity": null,
"last_login": null,
"level": 0,
"lname": "Federline",
"mob_phone": "",
"note": null,
"notified": false,
"num_logins": 0,
"organization": "Department 1",
"p_city": "",
"p_code": "",
"p_country": "Canada",
"p_province": "",
"p_street": "",
"p_street2": "",
"pref_email": true,
"pref_gmail": false,
"retainer_id": null,
"role": "client",
"s_city": "",
"s_code": "",
"s_country": "",
"s_province": "",
"s_street": "",
"s_street2": "",
"signup_date": "2019-06-18 19:14:31",
"statement_token": null,
"subdomain": null,
"updated": "2019-07-15 16:17:10",
"userid": 50001,
"username": "kevin2",
"vat_name": null,
"vat_number": "",
"vis_state": 0
},
{
"accounting_systemid": "E85Qp",
"allow_late_fees": true,
"allow_late_notifications": true,
"bus_phone": "",
"company_industry": null,
"company_size": null,
"currency_code": "CAD",
"direct_link_token": null,
"email": "[email protected]",
"fax": "",
"fname": "",
"has_retainer": null,
"home_phone": null,
"id": 505486,
"language": "en",
"last_activity": null,
"last_login": null,
"level": 0,
"lname": "",
"mob_phone": "",
"note": null,
"notified": false,
"num_logins": 0,
"organization": "Raptors Marketing",
"p_city": "",
"p_code": "",
"p_country": "Canada",
"p_province": "",
"p_street": "",
"p_street2": "",
"pref_email": true,
"pref_gmail": false,
"retainer_id": null,
"role": "client",
"s_city": "",
"s_code": "",
"s_country": "",
"s_province": "",
"s_street": "",
"s_street2": "",
"signup_date": "2019-06-03 22:20:31",
"statement_token": null,
"subdomain": null,
"updated": "2019-07-15 14:28:05",
"userid": 505486,
"username": "SEf2e2Jcam",
"vat_name": null,
"vat_number": "",
"vis_state": 0
}
}
}
}
}
Remove all Secondary Contacts
Request: PUT
https://api.freshbooks.com/accounting/account/<accountid>/users/clients/<clientid>
{ "client":{
"contacts": []
}
}