CallFire Solutions

Query Regions

Follow

QUERY REGIONS

Queries regions for use in subsequent searches and purchase requests

This operation allows to run a query to get the information for a region, including: phone number prefixes for the city you entered, rate-centers, and more. See the Response Parameters for the full list of data returned.

REQUEST PARAMETERS

ParameterDemo ValueDescriptionData Type
QueryRegions   Regions 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

RESPONSE PARAMETERS

ParameterDescriptionData Type
RegionQueryResult List of Regions returned from query  
TotalResults Results count long
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

EXAMPLE


using RestSharp;

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

            var request = new RestRequest("number/regions", Method.GET);
            request.AddParameter("MaxResults", "5");
            request.AddParameter("Prefix", "1206200");
            request.AddParameter("City", "SEATTLE");
            request.AddParameter("STATE", "WA");
            request.AddParameter("Zipcode", "98154");
            request.AddParameter("Country", "US");
            request.AddParameter("Lata", "674");
            request.AddParameter("RateCenter", "SEATTLE");
            request.AddParameter("Latitude", "47.61");
            request.AddParameter("Longitude", "-122.331");
            request.AddParameter("TimeZone", "America/Los_Angeles");

            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:ResourceList xmlns="http://api.callfire.com/data" xmlns:r="http://api.callfire.com/resource" totalResults="1">

    <Region>

       <Prefix>1206200</Prefix>

       <City>SEATTLE</City>

       <State>WA</State>

       <Zipcode>98154</Zipcode>

       <Country>US</Country>

       <Lata>674</Lata>

       <RateCenter>SEATTLE</RateCenter>

       <Latitude>47.61</Latitude>

       <Longitude>-122.331</Longitude>

       <TimeZone>America/Los_Angeles</TimeZone>

    </Region>

</r:ResourceList>

Have more questions? Submit a request

Comments