CallFire Solutions

Get Contact

Follow

GET CONTACT

Gets a contact by id

It returns an individual contact by id. See QueryContacts to return a list of contacts and to determine individual contactIds.

REQUEST PARAMETERS

ParameterDemo ValueDescriptionData Type
GetContact   Contact request by unique ID object
Id Unique ID of resource long

RESPONSE PARAMETERS

ParameterDescriptionData Type
Contact Info about the people you want to contact. Any info needed can be stored under Contact as an extra attribute.  
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 GetContact()
        {
            long contactId = 165332795001; // Your Contact Id here

            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest(string.Format("contact/{0}", contactId), Method.GET);

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

Response Parameters

Contact exists

Response Code: 200

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<r:Resource xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">

   <Contact homePhone="14252163710" lastName="Contact2_LastName" firstName="Contact2_Name" id="165332795001"/>

</r:Resource>

Contact doesn't exist

Response Code: 404

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<r:ResourceException xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">

   <r:HttpStatus>404</r:HttpStatus>

   <r:Message>contact not found</r:Message>

</r:ResourceException>

Invalid Id Value

Response Code: 400

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<r:ResourceException xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource">

   <r:HttpStatus>400</r:HttpStatus>

   <r:Message>Cannot parse number: For input string: &quot;ABC&quot;</r:Message>

</r:ResourceException>

This error can be caused by sending an invalid value for the parameter type, such as sending an alphanumeric string instead of an integer.

Have more questions? Submit a request

Comments