Knowladge Base

GET A LIST OF AVAILABLE DIDS BY COUNTRY-AREA CODE AND DOCUMENT REQUIREMENTS

1G. METHOD FOR GETTING AVAILABLE DID’S COUNTRY CODE OR AREA CODE BY VENDOR RATING OR BY DOCUMENT REQUIREMENTS

This method returns the list of available DID’s by Vendor Rating in the form of an array. The user is required to give User Id, Password, Country code, Area code and Vendor Rating and document requirement as arguments and he’ll get a list of available DIDs for the area of the country for which he’s provided the code.

If the user wants available DID’s for the whole country and not just for a particular area, then he should supply only Country code (e.g., “44” for UK). If he wants DID’s for just one particular area, he should supply Country code with Area Code (DID Prefix, e.g., “4420” for UK, London). In return, he’ll get the list of available DID’s for desired area.
Please note user must supply area code for US. ( e.g., “1567”)

User can supply Vendor Rating range to get a list of available DID’s by Vendor Rating Rating. If there is no range is defined, then it will get a list of DIDs with all vendor ratings. (limited display)

Method Signature

getAvailableRatedDIDSbyCountryCode ($UserID,$Password,$Prefix,$VRatingFrom,$VRatingTo,$Limit,$VendorsList(Comma Separated),$RateFrom,$RateTo,$CountryID,$NeedDocuments)

$NeedDocuments = 0 : All DIDs
$NeedDocuments = 1 : All DIDs with document requirements
$NeedDocuments = 2 : All DIDs with no document requirement

Prefix = Country code + Area code. e.g., 1567 or 4420

Example Usage

We are providing a sample code in PHP which accesses and uses this service.

<?php
require_once “nusoap.php”;

$parameters=array(“65948″,”sdaf485″,”1567″,”1″,”6″,”10″,””,”0″,”5″,”211″,”1″);
$soapclient= new soapclient(‘http://api.didx.net/webservice/index.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getAvailableRatedDIDSbyCountryCodeAndDocs”, $parameters,’urn:getAvailableRatedDIDSbyCountryCodeAndDocs’);

print_r($SoapResult);

?>

The first two arguments passed to the method are user ID and password. The third argument is the country code (or DID Prefix), fourth represents the starting Rating and the fifth represents the ending Rating. In this case, we’ve provided ‘1567’ as the country code which corresponds to US, from Vendor Rating 1 to Vendor Rating 6, then the vendor comma separated list, then rate from and rate, then country id and then document requirements.

or

Use following function to get a full list of DIDs based on Country/AreaCode,Vendor Rating Range and Price Range.

Fields Returned:
DIDNumber
OurSetupCost?
OurMonthlyCharges?
OurPerMinuteCharges?
Country
Area
CountryCode?
StateCode?
VendorID
RateCenter?
DIDID
HideNumber?
CountryID
SMSEnable
VoiceEnable?
VanityRating?
DocsRequired?
DocsType? ( 1 for only Image Documents, 2 for only Text Documents, 3 for Both)
DocsMsg? (A message from vendor about documents)