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.
Search for numbers already purchased and in your account by region info such as prefix, city, state, zipcode, rate center, etc... Returns info on the numbers in your account such as status, lease info, configuration, etc...
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
QueryNumbers | Numbers 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 | |
Region | Region of number represented by city, state, prefix, etc... | object | |
Prefix | 4-7 digit prefix | string | |
City | Name of a city | string | |
State | State abbreviation | string | |
Zipcode | 5 digit zipcode | string | |
Country | 2 digit country code | string | |
Latitude | Latitude | float | |
Longitude | Longitude | float | |
TimeZone | string | ||
LabelName | Label that number must have to be included | string |
* indicates choice value, bolded parameters are required
Response Parameters
Parameter | Description | Data Type |
---|---|---|
NumberQueryResult | List of Numbers returned from query | |
TotalResults | Results count | long |
Number | Info about Number like Region | |
Number | 11 digit E.164 number | PhoneNumber |
NationalFormat | Phone number formatted for local | string |
TollFree | Is toll free number | boolean |
Region | Region of number represented by city, state, prefix, etc... | |
Prefix | 4-7 digit prefix | string |
City | Name of a city | string |
State | State abbreviation | string |
Zipcode | 5 digit zipcode | string |
Country | 2 digit country code | string |
Latitude | Latitude | float |
Longitude | Longitude | float |
TimeZone | 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 |
NumberConfiguration | Configure Call and Text features | |
CallFeature | [UNSUPPORTED, PENDING, DISABLED, ENABLED] | NumberFeature |
TextFeature | [UNSUPPORTED, PENDING, DISABLED, ENABLED] | NumberFeature |
InboundCallConfigurationType | [TRACKING, IVR] | InboundType |
InboundCallConfiguration | ||
CallTrackingConfig | ||
id | Unique ID of InboundConfig | long |
TransferNumber | List[PhoneNumber] | |
Screen | boolean | |
Record | boolean | |
IntroSoundId | long | |
WhisperSoundId | long | |
IvrInboundConfig | ||
id | Unique ID of InboundConfig | long |
DialplanXml | string |
<?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'));
/**
* QueryNumbers
*/
$query = new stdclass();
$query->MaxResults = 2;
$query->Region = new stdclass(); // required
$query->Region->Prefix = '1920659';
$response = $client->QueryNumbers($query);
print_r($response);
// Sample $response
// stdClass Object
// (
// [TotalResults] => 1
// [Number] => stdClass Object
// (
// [Number] => 19206596476
// [NationalFormat] => (920) 659-6476
// [TollFree] =>
// [Status] => ACTIVE
// [LeaseInfo] => stdClass Object
// (
// [LeaseBegin] => 2011-05-11-07:00
// [LeaseEnd] => 2014-08-11-07:00
// [AutoRenew] => 1
// )
// [NumberConfiguration] => stdClass Object
// (
// [CallFeature] => ENABLED
// [TextFeature] => ENABLED
// [InboundCallConfigurationType] => TRACKING
// [InboundCallConfiguration] => stdClass Object
// (
// [CallTrackingConfig] => stdClass Object
// (
// [id] => 5
// [TransferNumber] => 12132212289
// [Screen] =>
// [Record] =>
// )
// )
// )
// )
// )
?>