Knowladge Base

1J GET A LIST OF Rated DIDs By Country Code And Documents

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)

 

Example URL:

http://newapi.didx.net/DidxApis/api/getAvailableRatedDIDSbyCountryCodeAndDocs.php?UserID=700290&Password=XXXX&CountryCode=1&AreaCode=-1&VRatingFrom=0&VRatingTo=9

 

Example Code in PHP:

<?php

$curl_handle = curl_init();

$url = "http://newapi.didx.net/DidxApis/api/getAvailableRatedDIDSbyCountryCodeAndDocs.php?UserID=700290&Password=XXXX&CountryCode=1&AreaCode=-1&VRatingFrom=0&VRatingTo=9";

curl_setopt($curl_handle, CURLOPT_URL, $url);

curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);

$curl_data = curl_exec($curl_handle);

curl_close($curl_handle);

$response_data = json_decode($curl_data);

print_r($response_data);

die();

?>

 

Input Fields:

    1. UserID
    2. Password
    3. Prefix
    4. VRatingFrom
    5. VRatingTo
    6. Limit
    7. VendorsList(Comma Separated)
    8. RateFrom
    9. RateTo
    10. CountryID
    11. Documents

 

Returned Fields:

    1. DIDNumber
    2. OurSetupCost?
    3. OurMonthlyCharges?
    4. OurPerMinuteCharges?
    5. Country Area
    6. CountryCode?
    7. StateCode?
    8. VendorID
    9. RateCenter?
    10. DID
    11. HideNumber?
    12. CountryID
    13. SMSEnable
    14. VoiceEnable?
    15. VanityRating?
    16. DocsRequired?
    17. DocsType? ( 1 for only Image Documents, 2 for only Text Documents, 3 for Both)
    18. DocsMsg? (A message from vendor about documents)

 

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