CallFire Solutions

Query Numbers

Follow

QUERY NUMBERS

Lists numbers owned by your account

This operation allows searching for numbers that you have already purchased and that are in your account. You can query by region using parameters such as prefix, city, state, zip code, rate center, among others. It returns the numbers in your account with information about status, lease information, configuration, and more. See the Response Parameters table below for the full list of values returned.

REQUEST PARAMETERS

ParameterDemo ValueDescriptionData 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
Lata Lata string
RateCenter   string
Latitude Latitude float
Longitude Longitude float
TimeZone   string
LabelName Label that number must have to be included string

RESPONSE PARAMETERS

ParameterDescriptionData 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
Lata Lata string
RateCenter   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

EXAMPLE


using RestSharp;

namespace [your-namespace]
{
    public class [your-class]
    {
        public string QueryNumbers()
        {
            var client = new RestClient("https://www.callfire.com/api/1.1/rest/");
            client.Authenticator = new HttpBasicAuthenticator("YourLoginId", "password");

            var request = new RestRequest("number", Method.GET);
            request.AddParameter("MaxResults", "1");
            request.AddParameter("Prefix", "121320");

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

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">

    <Number>

       <Number>12132042444</Number>

       <NationalFormat>12132042444</NationalFormat>

       <TollFree>false</TollFree>

       <Status>ACTIVE</Status>

       <LeaseInfo>

          <LeaseBegin>2014-12-02Z</LeaseBegin>

          <LeaseEnd>2015-01-02Z</LeaseEnd>

          <AutoRenew>true</AutoRenew>

       </LeaseInfo>

       <NumberConfiguration>

          <CallFeature>ENABLED</CallFeature>

          <TextFeature>ENABLED</TextFeature>

          <InboundCallConfigurationType>TRACKING</InboundCallConfigurationType>

          <InboundCallConfiguration>

             <CallTrackingConfig id="3630161003">

             <TransferNumber>12132042446</TransferNumber>

             <Screen>false</Screen>

             <Record>true</Record>

             </CallTrackingConfig>

          </InboundCallConfiguration>

       </NumberConfiguration>

    </Number>

</r:Resource>

Have more questions? Submit a request

Comments