Knowladge Base

1A GET A LIST OF AVAILABLE DID FOR THOSE AREAS FOR WHICH YOU DO NOT HAVE A DID STOCK

This method returns the list of available DID’s in the form of an array. The user is required to give User ID, Password, Country code, Area code as arguments and then 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 ‘-1’ as the Area code. In return, he’ll get the list of available DID’s for the whole country.

Now, optionally user can provide a specific Vendor ID to get the DID’s, available for sale by the Vendor (provide ‘-1’ or nothing if there is no defined Vendor ID).

Method Signature

getAvailableDIDS ($UserID, $Password, $CountryCode, $AreaCode ,$VendorID, $VRatingFrom,$VRatingTo,$CountryID)

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","92","-1");
 $soapclient= new soapclient('http://api.didx.net/webservice/WebGetListServer.php');
 $SoapResult = array();
 $SoapResult = $soapclient->call("getAvailableDIDS", $parameters,'urn:getAvailableDIDS);

print_r($SoapResult)

?>

The first two arguments passed to the method are user ID and password. The third argument is the country code and the fourth represents the area code. In this case, we’ve provided ‘92’ as the country code that corresponds to Pakistan and ‘-1’ in place of the area code. This will return the list of all available DID’s for Pakistan with vendor rating. In case you want available DID’s for a specific area, you’d have to provide the area code for it.

Or

In case user needs to get the available DID’s from particular Vendor:

<?php
 require_once "nusoap.php";

 $parameters=array("65948","sdaf485","92","-1","991199");
 $soapclient= new soapclient('http://api.didx.net/webservice/WebGetListServer.php');
 $SoapResult = array();
 $SoapResult = $soapclient->call("getAvailableDIDS", $parameters,'urn:getAvailableDIDS);

print_r($SoapResult)

?>

Fields Returned:
DIDNumber
OurSetupCost
OurMonthlyCharges
OurPerMinuteCharges
VendorRating
Country
Area

This will get the DIDs from Vendor 991199.

Important Note: to distinguish the countries having country code ‘1’, please use the country id argument.

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 DID’s for this Area in our record.
-4 = The Area code does not exist.
-5 = There are no DID’s for this country in our record.
-6 = The Country Code does not exist.