1D. METHOD FOR GETTING AVAILABLE DID’S COUNTRY CODE OR AREA CODE BY VENDOR RATING
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 as arguments and he’ll get a list of available DID’s 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)
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”);
$soapclient= new soapclient(‘http://api.didx.net/webservice/index.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getAvailableRatedDIDSbyCountryCode“, $parameters,’urn:getAvailableRatedDIDSbyCountryCode‘);
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. This will return the list of all available DID’s US and NW Ohio:Toledo.
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
FreeMinutes
IncludedChannels (Note: If channel based then return number of channels else return -1)
Method Signature
getAvaiableDIDsByAll ($UserID,$Password,$CountryCode,$AreaCode,$VRatingFrom,$VRatingTo,$MinimumPrice,$MaximumPrice,
$VendorsList(Comma Separated),$CountryID)
<?php
require_once “nusoap.php”;
$parameters=array(“65948″,”sdaf485″,”1″,”567″,”1″,”6”,1,4);
$soapclient= new soapclient(‘http://api.didx.net/webservice/index.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getAvaiableDIDsByAll”, $parameters,’urn:getAvaiableDIDsByAll’);
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,6th and 7th are the minimum and maximum price range.In this case, we’ve provided ‘1′ and ‘567’ as the country/area code which corresponds to US, from Vendor Rating 1 to Vendor Rating 6, from US$1 to US$4. This will return the list of all available DID’s US and NW Ohio:Toledo.
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
Country Code
StateCode
VendorID
RateCenter
Method Signature
sub getDIDSbyCountryCodeAndPrice ($UserID,$Password,$CountryCode,$MinimumPrice,$MaximumPrice,
$VRatingFrom,$VRatingTo,$CountryID)
<?php
require_once "nusoap.php";
$parameters=array(“65948″,”sdaf485″,”1567”,1,4);
$soapclient= new soapclient(‘http://api.didx.net/webservice/index.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getDIDSbyCountryCodeAndPrice”, $parameters,’urn:getDIDSbyCountryCodeAndPrice’);
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 and the fifth represents the minimum and maximum price range.In this case, we’ve provided ‘1′ and ‘567’ as the country/area code which corresponds to US, from US$1 to US$4. This will return the list of all available DID’s US and NW Ohio:Toledo.
Fields Returned:
DIDNumber
OurSetupCost
OurMonthlyCharges
OurPerMinuteCharges
Country
Area
CountryCode
StateCode
RateCenter
Error Codes
In case of any incorrect information provided by the user or in case of no matching data, an error code will be returned. Error codes correspond to the following messages:
-1 = User ID does not exist
-2 = Your Password is Incorrect
-3 = There are no rated DID’s for this Area in our record.
-10 = There is no area code defined with US Country code.
-11 = Country code not provided.
-12 = Invalid Price Range
– Method Signature
getAvailableRatedDIDSbyFreeMin($UserID,$Password,$CountryCode,$AreaCode,$MinFrom,$MinTo,$Vendors,$CountryID,$VRatingFrom,$VRatingTo,documents)
<?php
require_once “nusoap.php”;
$parameters=array(“65948″,”sdaf485″,”1″,”567″,”2500″,”5000″,”11111″,”211″,”5″,”8″,””);
$soapclient= new soapclient(‘http://api.didx.net/webservice/index.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getAvailableRatedDIDSbyFreeMin”, $parameters,’urn:getAvailableRatedDIDSbyFreeMin’);
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 is area code and the fifth and sixth represents the minimum and maximum free minutes range,seventh is vendorid,8th is country id,nine and tenth are the range for vendor rating .
The last argument set to “1”, for those DIDs require end user documents,
“0”, for those do not require and leave empty to get all.
Error Codes
In case of any incorrect information provided by the user or in case of no matching data, an error code will be returned. Error codes correspond to the following messages:
-1 = User ID does not exist
-2 = Your Password is Incorrect
-3 = There are no rated DID’s for this Area in our record.
-10 = There is no area code defined with US Country code.
-11 = Country code not provided.
How do I search the DIDs using API by T38 capability ?
If you want to search the DIDs by T38 capability, you can use the following function.
– Method Signature
getAvailableRatedDIDSbyT38($UserID,$Password,$CountryCode,$AreaCode,$Vendors,$CountryID,$VRatingFrom,$VRatingTo,$NeedDocument,$T38)
<?php
require_once “nusoap.php”;
$parameters=array(“65948″,”sdaf485″,”1″,”567″,””,”211″,”5″,”8″,””,”1″);
$soapclient= new soapclient(‘http://api.didx.net/webservice/index.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getAvailableRatedDIDSbyT38”, $parameters,’urn:getAvailableRatedDIDSbyT38′);
print_r($SoapResult);
?>
The first two arguments passed to the method are user ID and password. The third argument is the country code, fourth is area code and the fifth is for vendors list (csv), sixth represents the country ID, seventh and eight for vendor rating range, ninth argument is set 1 if you need DIDs that requires documents, “0” that dont, leave empty if you want all, 10th argument is set “1” if you need T38 capability DIDs.
Error Codes
In case of any incorrect information provided by the user or in case of no matching data, an error code will be returned. Error codes correspond to the following messages:
-1 = User ID does not exist
-2 = Your Password is Incorrect
-3 = There are no rated DID’s for this Area in our record.
-10 = There is no area code defined with US Country code.
-11 = Country code not provided.
–
How do I search the DIDs using API by default channels quantity ?
Method Signature
getAvaiableDIDsByDefaultChannels($UserID,$Password,$CountryCode,$AreaCode,$ChannelQtyFrom,$ChannelQtyTo,$VRatingFrom,$VRatingTo,$MinimumPrice,$MaximumPrice,
$VendorsList(Comma Separated),$CountryID)
<?php
require_once “nusoap.php”;
$parameters=array(“65948″,”sdaf485″,”1″,”567″,”2″,”4″,”1″,”9”);
$soapclient= new soapclient(‘http://api.didx.net/webservice/index.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getAvaiableDIDsByDefaultChannels”, $parameters,’urn:getAvaiableDIDsByDefaultChannels’);
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 and fifth are the default channel quantity range, then it represents vendor rating range, then monthly rates range, then vendor list, and then country ID. In this case, we’ve provided ‘1′ and ‘567’ as the country/area code which corresponds to US, from Vendor Rating 1 to Vendor Rating 9, from default channels 2 to 4. This will return the list of all available DID’s US and NW Ohio:Toledo.
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
Channels