This service provides account holders the means to manage personal phonebook entries. Consumers can view, add or remove entries (numbers).
The list service allows you to create and manage your phonebooks. The WSDL for which is available here: List Service WSDL.
| Method | Description |
|---|---|
| removeNumbersFromList | Remove phone numbers from the contact list. |
| addNumberToList | Add a new phone number to the contact list. |
| removeNumberFromList | Remove a phone number for the contact list. |
| addNumbersToList | Add an array of phone numbers to the contact list. |
| addNumberToListWithEmail | Add a phone number to the contact list, along with an e-mail address. |
| validateList | Private Operation |
| getLists | Get the contact lists associated with the account holder’s id. |
| addList | Create a new contact list for the specified account holder. |
| clearList | Clears the contents of an existing list. |
Use this function to remove numbers from your existing list.
Parameters
| Name | Max Occurs | Min Occurs | Nillable | Type | Description |
|---|---|---|---|---|---|
| key | 1 | 1 | TRUE | xsd:string | Unique key mapped to account to determine ownership |
| listid | 1 | 1 | xsd:long | The ID associated with the list. | |
| numbers | 1 | 1 | TRUE | tns:ArrayOfString | List of numbers to be removed |
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:removeNumbersFromList xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.numbers.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:listid>-8540</tnsa:listid>
<tnsa:numbers>
<tnsa:string>string</tnsa:string>
<tnsa:string>string</tnsa:string>
</tnsa:numbers>
</tnsa:removeNumbersFromList>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function removeNumbersFromList($api_key,$listid,$phoneNumbers,$debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/ListService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$removenumbers = array(
'key' => $api_key,
'listid' => $listid,
'numbers' => $pnumber
);
try
{
$removeNumbersFromListResponse = $campaignOutboundClient->removeNumbersFromList($removenumbers);
if($debug)
{
echo "Numbers removed from list";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."<br/>";
}
}
}
public void removeNumbersFromList(string key, ListDTO list, List<string> numbers)
{
LOG.Info("Entered removeNumbersFromList(string key, ListDTO list, List<string> numbers)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateList(list);
this.validateNumbers(numbers);
try
{
/*
* Removes given numbers from a pre-existing list. The list id is used
* to specify which list to remvoe the numbers from. The numbers list
* is converted to an array as required by the web service proxy object.
*/
this.listService.removeNumbersFromList(key, list.Id, numbers.ToArray());
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to remove numbers from list";
LOG.Error(msg);
throw new ListServiceException(msg, e);
}
finally
{
LOG.Info("Exited removeNumbersFromList(string key, ListDTO list, List<string> numbers)");
}
}
Use this function to remove a single number from your existing list.
Parameters
public function removeNumberFromList($api_key,$listid,$number,$debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/ListService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$removelistparams = array(
'key' => $api_key,
'listid' => $listid,
'number' => $number
);
try
{
$removeNumberFromListResponse = $campaignOutboundClient->removeNumberFromList($removelistparams);
if($debug)
{
echo "Number removed from list";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
public void removeNumberFromList(string key, ListDTO list, string number)
{
LOG.Info("Entered removeNumberFromList(string key, ListDTO list, string number)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateList(list);
this.validateNumber(number);
try
{
/*
* Removes given number from a pre-existing list. The list id is used
* to specify which list to remvoe the number from.
*/
this.listService.removeNumberFromList(key, list.Id, number);
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to remove number from list";
LOG.Error(msg);
throw new ListServiceException(msg, e);
}
finally
{
LOG.Info("Exited removeNumberFromList(string key, ListDTO list, string number)");
}
}
This operation will add the specified number to the account holders list.
Parameters
| Name | maxOccurs | minOccurs | nillable | type | description |
|---|---|---|---|---|---|
| key | 1 | 1 | TRUE | xsd:string | Unique key mapped to account to determine ownership |
| listid | 1 | 1 | xsd:long | The ID associated with the list. | |
| number | 1 | 1 | TRUE | tns:ArrayOfString | Number to be added to the list |
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:addNumberToList xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.numbers.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:listid>6455</tnsa:listid>
<tnsa:number>string</tnsa:number>
</tnsa:addNumberToList>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function addNumberToList($api_key,$listid,$number,$debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/ListService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$addnumbers = array(
'key' => $api_key,
'listid' => $listid,
'number' => $number
);
try
{
$addNumberToListResponse = $campaignOutboundClient->addNumberToList($addnumbers);
if($debug)
{
echo "Number added";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
public void addNumberToList(string key, ListDTO list, string number)
{
LOG.Info("Entered addNumberToList(string key, ListDTO list, string number)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateList(list);
this.validateNumber(number);
try
{
/*
* Adds given number to a pre-existing list. The list id is used
* to specify which list to add the number to.
*/
this.listService.addNumberToList(key, list.Id, number);
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to add number to list";
LOG.Error(msg);
throw new ListServiceException(msg, e);
}
finally
{
LOG.Info("Exited addNumberToList(string key, ListDTO list, string number)");
}
}
Use this function to add numbers to an existing list
Parameters
public function addNumbersToList($api_key,$listid,$phoneNumbers,$debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/ListService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$lines = file($phoneNumbers) or die('Unable to upload phone numbers');
foreach($lines as $line)
{
$pnumber['string'][] = $line;
}
$addNumbersToListparams = array(
'key' => $api_key,
'listid' => $listid,
'numbers' => $pnumber
);
try
{
$addNumbersToListResponse = $campaignOutboundClient->addNumbersToList($addNumbersToListparams);
$result = $addNumbersToListResponse->out;
if($debug)
{
echo "Numbers added to the list";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
Use this function to add a number to an existing list along with the email
Parameters
| Name | maxOccurs | minOccurs | nillable | type | description |
|---|---|---|---|---|---|
| key | 1 | 1 | TRUE | xsd:string | Unique key mapped to account to determine ownership |
| listid | 1 | 1 | xsd:long | The ID associated with the list. | |
| number | 1 | 1 | TRUE | xsd:String | Number to be added to the list |
| 1 | 1 | TRUE | xsd:string | TBA | |
| provider | 1 | 1 | TRUE | xsd:String | Number to be added to the list |
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:addNumberToListWithEmail xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.numbers.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:listid>3750</tnsa:listid>
<tnsa:number>string</tnsa:number>
<tnsa:email>string</tnsa:email>
<tnsa:provider>string</tnsa:provider>
</tnsa:addNumberToListWithEmail>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function addNumberToListWithEmail($api_key,$listid,$number,$email,$provider,$debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/ListService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$addnumbers = array(
'key' => $api_key,
'listid' => $listid,
'number' => $number,
'email' => $email,
'provider' => $provider
);
try
{
$addNumberToListWithEmailResponse = $campaignOutboundClient->addNumberToListWithEmail($addnumbers);
$result = $addNumberToListWithEmailResponse->out;
if($debug)
{
echo "Numbers added successfully";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
public void addNumberToListWithEmail(string key, ListDTO list, string number,
string email, string provider)
{
LOG.Info("Entered addNumberToListWithEmail(string key, ListDTO list, string number, "
+ "string email, string provider)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateList(list);
this.validateNumber(number);
this.validateEmail(email);
this.validateProvider(provider);
try
{
/*
* Adds given number to a pre-existing list. The list id is used
* to specify which list to add the numbers to. The email and provider
* information is also included with the phone number.
*/
this.listService.addNumberToListWithEmail(key, list.Id, number, email, provider);
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to add number to list with email";
LOG.Error(msg);
throw new ListServiceException(msg, e);
}
finally
{
LOG.Info("Exited addNumberToListWithEmail(string key, ListDTO list, string number, "
+ "string email, string provider)");
}
}
Use this function to get all your phone number lists from CallFire.com Parameters
| Name | maxOccurs | minOccurs | nillable | type | description |
|---|---|---|---|---|---|
| key | 1 | 1 | TRUE | xsd:string | Unique key mapped to account to determine ownership |
| Name | maxOccurs | minOccurs | nillable | type | description |
|---|---|---|---|---|---|
| out | 1 | 1 | TRUE | tns:ArrayOfNumberListType |
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:getLists xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.numbers.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
</tnsa:getLists>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function getLists($api_key,$debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/ListService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$getlists = array(
'key' => $api_key
);
try
{
$getListsResponse = $campaignOutboundClient->getLists($getlists);
$lists = $getListsResponse->out;
if($debug)
{
echo "<table border=1><tr><td>id</td><td>name</td></tr>";
foreach($lists->NumberListType as $line)
{
echo "<tr>";
echo "<td>".$line->id."</td>";
echo "<td>".$line->name."</td>";
echo "</tr>";
}
echo "</table>";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
public List<ListDTO> getLists(string key)
{
LOG.Info("Entered getLists(string key)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
try
{
//get lists using the web service proxy and providing the account key
CFLS.NumberListType[] lists = this.listService.getLists(key);
//create List collection to return back to calling code
List<ListDTO> listsFound = new List<ListDTO>();
//construct ListDTO objects based on data returned from the web service
foreach (CFLS.NumberListType nlType in lists)
{
ListDTO list = new ListDTO(nlType.id, nlType.name);
listsFound.Add(list);
}
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("Found " + listsFound.Count + " lists in getLists() for key: " + key);
}
return listsFound;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to get lists for key: " + key;
LOG.Error(msg);
throw new ListServiceException(msg, e);
}
finally
{
LOG.Info("Exited getLists(string key)");
}
}
Use this funciton to create a new phonebook list.
Parameters
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tnsa:addList xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tnsa="http://api.numbers.dialer.skyyconsulting.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tnsa:key>string</tnsa:key>
<tnsa:name>string</tnsa:name>
</tnsa:addList>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
public function addList($api_key,$name,$debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/ListService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$addListparams = array(
'key' => $api_key,
'name' => $name
);
try
{
$addlistResponse = $campaignOutboundClient->addList($addListparams);
$listid = $addlistResponse->out;
if($debug)
{
echo "The list id is : ".$listid;
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
public ListDTO addList(string key, string name)
{
LOG.Info("Entered addList(string key, string name)");
/*
* Validation of parameters early helps avoid runtime
* exceptions such as null pointer exceptions (NPE). Invalid
* parameters can be rejected immediately before any web
* service calls are made.
*/
this.validateAccountKey(key);
this.validateListName(name);
try
{
/*
* Creates a new list using account key and provide name.
* The id is returned in a wrapped long object. The value
* property of that object is used to retrieve the actual
* long value of the id.
*/
long listId = this.listService.addList(key, name).Value;
//the ListDTO object is used to encapsulate the list's data
ListDTO list = new ListDTO(listId, name);
/*
* A quick check is performed to see if debug mode is enabled for logging.
* This ensure the string parameter is not evaluated unless it is needed.
*/
if (LOG.IsDebugEnabled)
{
LOG.Debug("New list created: " + list);
}
return list;
}
catch (Exception e)
{
//write to log and raise exception indicating an error occurred
string msg = "Unable to add list";
LOG.Error(msg);
throw new ListServiceException(msg, e);
}
finally
{
LOG.Info("Exited addList(string key, string name)");
}
}
| Name | maxOccurs | minOccurs | nillable | type | description |
|---|---|---|---|---|---|
| key | 1 | 1 | TRUE | xsd:string | Unique key mapped to account to determine ownership |
| name | 1 | 1 | TRUE | xsd:string |
| Name | maxOccurs | minOccurs | nillable | type | description |
|---|---|---|---|---|---|
| out | 1 | 1 | TRUE | tns:ArrayOfNumberListType |
Use this function to clear the contents of a an existing list.
Parameters
public function clearList($api_key,$listid,$debug)
{
$createOtboundcampaignWsdl = 'https://www.callfire.com/service/ListService?wsdl';
$campaignOutboundClient = new SoapClient($createOtboundcampaignWsdl,array('trace' => true));
$clearListparams = array(
'key' => $api_key,
'listid' => $listid
);
try
{
$clearlistResponse = $campaignOutboundClient->clearList($clearListparams);
if($debug)
{
echo "List contents have been cleared";
}
}
catch(SoapFault $error)
{
if($debug)
{
echo $error."";
}
}
}
