CallFire Solutions

Update Contacts

Follow

UPDATE CONTACTS

Updates existing contacts

This operation updates existing contacts by providing a unique id identification and the information you want to update.

You can update many contacts at once by providing an array of contacts.

REQUEST PARAMETERS

ParameterDemo ValueDescriptionData Type
UpdateContacts   Update Contacts using attached info object
Contact   Info about the people you want to contact. Any info needed can be stored under Contact as an extra attribute. object
lastName Last name string
externalId id of contact defined by external system (NATION_BUILDER, GOOGLE_GROUPS, etc...) string
mobilePhone E.164 11 digit number PhoneNumber
firstName First name string
externalSystem System where externalId was generated from (NATION_BUILDER, GOOGLE_GROUPS, etc...) string
homePhone E.164 11 digit number PhoneNumber
workPhone E.164 11 digit number PhoneNumber
zipcode 5 digit zipcode string
Id Unique ID of Contact long

EXAMPLE


using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string UpdateContact()
        {
            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest("contact", Method.PUT);
            request.AddParameter("Contact[0][id]", "18185551212");
            request.AddParameter("Contact[0][firstName]", "John"); 
            request.AddParameter("Contact[0][lastName]", "Doe");
            request.AddParameter("Contact[0][zipcode]", "98033");
            request.AddParameter("Contact[0][homePhone]", "4056054533");
            request.AddParameter("Contact[0][workPhone]", "3309232823");
            request.AddParameter("Contact[0][mobilePhone]", "3309232823");
            request.AddParameter("Contact[0][externalId]", "1234567890");
            request.AddParameter("Contact[0][externalSystem]", "ExternalSystemName");

            var response = client.Execute(request);
            string content = response.Content;
            return content;
        }
    }
}

The response code returned is:

204

Which means that the contact has been deleted successfully.

Have more questions? Submit a request

Comments