CallFire Solutions

Get Contact List

Follow

GET CONTACT LIST

Gets the contact list by id

This operation returns an individual contact list by id. See QueryContactLists to return a list of contact lists and to get individual contactListIds.

REQUEST PARAMETERS

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

RESPONSE PARAMETERS

ParameterDescriptionData Type
ContactList List of Contacts  
Id   long
Name   string
Size   integer
Created   dateTime
Status [ACTIVE, VALIDATING, IMPORTING, IMPORT_FAILED, ERRORS, DELETED, PARSE_FAILED, COLUMN_TOO_LARGE] ContactListStatus

EXAMPLE

In this example we are getting the contact list identified by '188518001'.


using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string GetContactList()
        {
            long contactListId = 188611001; // Your ContactList 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/list/{0}", contactListId), Method.GET);

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

Response Parameters

The contact list exists

Response Code: 200

The XML returned is:

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

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

   <ContactList id="188518001">

      <Name>NewContactListTest</Name>

      <Size>0</Size>

      <Created>2014-06-05T16:57:29Z</Created>

      <Status>DELETED</Status>

   </ContactList>

</r:Resource>

In this case the contact list exists, but if you pay attention to the 'Status' field, it was deleted.

The contact list doesn't exist

Response Code: 404

The XML returned is:

<?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 list not found</r:Message>

</r:ResourceException>

This means that the list never existed.

Invalid parameter type sent

Response Code: 400

The XML returned is:

<?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;1234ASD&quot;</r:Message>

</r:ResourceException>

In this case it seems that the client sent an alphanumeric id instead of sending an integer.

Have more questions? Submit a request

Comments