CallFire has a new API!
We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.
Get info such as status, lease dates, etc... on keywords owned by your account.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
QueryKeywords | Keywords request by query | object | |
MaxResults | Max number of results to return limited to 1000 (default: 1000) | long | |
FirstResult | Start of next result set (default: 0) | long |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
KeywordQueryResult | List of Keywords returned from query | |
TotalResults | Results count | long |
Keyword | Info on Keyword like status and lease info | |
ShortCode | Deprecated, use Number instead | PhoneNumber |
Number | PhoneNumber | |
Keyword | string | |
Status | [PENDING, ACTIVE, RELEASED, UNAVAILABLE] | NumberStatus |
LeaseInfo | Info about Lease | |
LeaseBegin | Date lease began | date |
LeaseEnd | Date lease ends | date |
AutoRenew | Is lease set to renew each month | boolean |
<?php
/**
* You'll need your login/password pair when you create the SOAP client.
* Don't use the fake login/password provided here; it's just for show and won't work.
*/
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
'soap_version' => SOAP_1_2,
'login' => 'YourLoginId',
'password' => 'YourPassword'));
/**
* QueryKeywords
*/
$query = new stdclass();
$query->MaxResults = 2;
$response = $client->QueryKeywords($query);
print_r($response);
// Sample $response:
// stdClass Object (
// [TotalResults] => 1
// [Keyword] => stdClass Object (
// [ShortCode] => 67076
// [Keyword] => CALLFIRE
// [Status] => ACTIVE
// [LeaseInfo] => stdClass Object (
// [LeaseBegin] => 2011-06-21-07:00
// [LeaseEnd] => 2011-09-21-07:00
// [AutoRenew] => 1
// )
// )
// )
?>