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

Parameter Data Type Demo Value Description
QueryRegions object Regions request by query
MaxResults long 1000 Max number of results to return limited to 1000 (default: 1000)
FirstResult long 0 Start of next result set (default: 0)
Region object Region of number represented by city, state, prefix, etc...
Prefix string 1920659 4-7 digit prefix
City string Seattle Name of a city
State string WA State abbreviation
Zipcode string 98154 5 digit zipcode
Country string US 2 digit country code
Lata string 674 Lata
RateCenter string SEATTLE
Latitude float 47.61 Latitude
Longitude float -122.331 Longitude
TimeZone string America/Los_Angeles

RESPONSE PARAMETERS

Parameter Data Type Description
RegionQueryResult List of Regions returned from query
TotalResults long Results count
Region Region of number represented by city, state, prefix, etc...
Prefix string 4-7 digit prefix
City string Name of a city
State string State abbreviation
Zipcode string 5 digit zipcode
Country string 2 digit country code
Lata string Lata
RateCenter string
Latitude float Latitude
Longitude float Longitude
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>