1B. METHOD FOR GETTING AVAILABLE DID’S COUNTRY LIST
This method returns the list of available DID’s country list by Vendor Rating in the form of an array. The user is required to give User ID, Password, and Vendor Ratings as arguments and he’ll get a list of available DID’s countries.
User can supply Vendor Rating range to get a list of available DID’s countries by Vendor Rating. If there is no range is defined, then it will get a list of DID’s countries with all vendor ratings.
Method Signature
getDIDCountry ($UserID,$Password,$VRatingFrom,$VRatingTo)
Example Usage
We are providing a sample code in PHP & PERL that accesses and uses this service.
click here to .net example for this API?
<?php
require_once “nusoap.php”;
$parameters=array(“700000″,”xxxx”,”1″,”9″);
$soapclient= new soapclient(‘http://api.didx.net/webservice/WebGetDIDCountriesServer.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getDIDCountry”, $parameters,’urn:getDIDCountry’);
?>
WSDL Access (PHP Client):
<?php
$parameters=array(“700000″,”xxxx”,”1″,”9″);
$soapclient= new soapclientnusoap(‘http://api.didx.net/webservice/WebGetDIDCountriesServer.wsdl’, true);
$SoapResult = array();
$SoapResult = $soapclient->call(“getDIDCountry”, $parameters,’urn:getDIDCountry’);
print_r($SoapResult);
?>
WSDL Access (PERL Client):
#!/usr/bin/perl
use SOAP::Lite;
my $Countries = SOAP::Lite
-> service(‘http://api.didx.net/webservice/WebGetDIDCountriesServer.wsdl’)
-> getDIDCountry(“700000″,”xxxx”,”1″,”9″);
$TotalCountries = @{$Countries};
for ($iIndex=0;$iIndex<=$TotalCountries;$iIndex++)
{
print “\n $Countries->[$iIndex][0] – $Countries->[$iIndex][1] – $Countries->[$iIndex][2]”;
}
The first two arguments passed to the method are user ID and password. The third argument represents the starting Rating and the fifth represents the ending Rating. In this case, we’ve provided ratings from 1 to Vendor Rating 6. This will return the list of all available DIDs’ country originations.
Fields Returned:
Country Code
Description
CountryID ( how and where to use country ID? )
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 DIDs’ country avaiable in our record.