MENU
CallFire - Your Message Delivered
CLOSE
  • Products
  • Pricing
  • Developers
  • Help
  • Log In
  • Sign Up

QueryRegions

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.

CallFire-API-Documentation

  • ▶/BroadcastService
    • CreateBroadcast
    • QueryBroadcasts
    • GetBroadcast
    • UpdateBroadcast
    • GetBroadcastStats
    • ControlBroadcast
    • CreateContactBatch
    • QueryContactBatches
    • GetContactBatch
    • ControlContactBatch
    • CreateBroadcastSchedule
    • QueryBroadcastSchedule
    • GetBroadcastSchedule
    • DeleteBroadcastSchedule
  • ▶/SubscriptionService
    • CreateSubscription
    • QuerySubscriptions
    • GetSubscription
    • UpdateSubscription
    • DeleteSubscription
  • ▶/TextService
    • SendText
    • QueryTexts
    • GetText
    • CreateAutoReply
    • QueryAutoReplies
    • GetAutoReply
    • DeleteAutoReply
  • ▶/CallService
    • SendCall
    • QueryCalls
    • GetCall
    • CreateSound
    • QuerySoundMeta
    • GetSoundMeta
    • GetSoundData
    • GetRecordingData
    • SendVerificationCodeToCallerId
    • VerifyCallerId
    • GetCallerIds
  • ▶/CccService
    • GetCccCampaign
    • GetCccCampaignStats
    • CreateCccCampaign
    • QueryCccCampaigns
    • UpdateCccCampaign
    • DeleteCccCampaignTransferNumbers
    • DeleteCccCampaignQuestions
    • ControlCccCampaign
    • DeleteCccCampaign
    • GetAgent
    • QueryAgents
    • AddAgents
    • GetAgents
    • RemoveAgent
    • GetAgentGroup
    • QueryAgentGroups
    • CreateAgentGroup
    • UpdateAgentGroup
    • AddAgentGroups
    • GetAgentGroups
    • DeleteAgentGroup
    • RemoveAgentGroup
    • GetAgentSession
    • QueryAgentSessions
    • SendAgentInvites
    • GetAgentInviteUri
  • ▶/ContactService
    • QueryContacts
    • UpdateContacts
    • RemoveContacts
    • GetContact
    • GetContactHistory
    • CreateContactList
    • QueryContactLists
    • DeleteContactList
    • AddContactsToList
    • GetContactList
    • RemoveContactsFromList
    • QueryDncNumbers
    • UpdateDncNumber
    • QueryDncLists
    • CreateDncList
    • GetDncList
    • DeleteDncList
    • AddNumbersToDncList
    • RemoveNumbersFromDncList
  • ▶/NumberService
    • QueryRegions
    • QueryNumbers
    • GetNumber
    • ConfigureNumber
    • SearchAvailableNumbers
    • QueryKeywords
    • SearchAvailableKeywords
    • CreateNumberOrder
    • GetNumberOrder
    • Release
  • ▶/LabelService
    • DeleteLabel
    • QueryLabels
    • LabelBroadcast
    • UnlabelBroadcast
    • LabelNumber
    • UnlabelNumber
  • API    >  
  • NumberService  >  
  • QueryRegions

QueryRegions

Queries regions for use in subsequent searches and purchase requests

Use a know subset of info on a region to query for the full set of info on a region. Example, if you know the city you can query for phone number prefixes, rate-centers, etc... associated with that city.

Request Parameters

Parameter Demo Value Description Data 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
Latitude Latitude float
Longitude Longitude float
TimeZone string

* indicates choice value, bolded parameters are required

Response Parameters

Parameter Description Data 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
Latitude Latitude float
Longitude Longitude float
TimeZone string

 

Example Code

	<?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'));


/**
 * QueryRegions
 */
$query = new stdclass();
$query->MaxResults = 2;   
$query->Region = new stdclass(); // required  
$query->Region->City = 'Seattle';

// Return list of Regions.
$response = $client->QueryRegions($query);
print_r($response);

// Sample $response:
// stdClass Object
// (
//     [TotalResults] => 621
//     [Region] => Array
//         (
//             [0] => stdClass Object
//                 (
//                     [Prefix] => 1206200
//                     [City] => SEATTLE
//                     [State] => WA
//                     [Zipcode] => 98154
//                     [Country] => US
//                     [Latitude] => 47.61
//                     [Longitude] => -122.331
//                     [TimeZone] => America/Los_Angeles
//                 )
//
//             [1] => stdClass Object
//                 (
//                     [Prefix] => 1206201
//                     [City] => SEATTLE
//                     [State] => WA
//                     [Zipcode] => 98154
//                     [Country] => US
//                     [Latitude] => 47.61
//                     [Longitude] => -122.331
//                     [TimeZone] => America/Los_Angeles
//                 )
//         )
// )

?>

Company

  • Careers
  • Blog
  • Press

Products

  • Text Messaging
  • Call Tracking
  • Voice Broadcast
  • CallFire IVR
  • Developer API

Resources

  • Case Studies
  • Industries
  • Communications Glossary
  • Marketing Glossary
  • Area Codes
  • Labs

Help

  • FAQs
  • CallFire XML
  • Contact Support
  • Reviews
  • System Status

© Copyright 2023 CallFire Inc. All Rights Reserved

Privacy Policy / Terms / Service Policy / FTC/FCC/DNC Compliance / Sitemap

Contact Support

Msg&data rates may apply in the US. Standard message and data rates apply in Canada. To unsubscribe from any CallFire ® list simply send 'STOP' to the originating short code or contact Support.