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

Parameter Data Type Demo Value Description
GetContact object Contact request by unique ID
Id long 135 Unique ID of resource

RESPONSE PARAMETERS

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

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.