POSTS
PORTFOLIO
SEARCH
SHOP
  • Your Cart Is Empty!
Your address will show here +12 34 56 78
API command for developers
Looking for telecom solutions without needing a developer? Our user portal has you covered! 
  • Text Hover
Find and Order International DIDs
Finding International DIDs is much the same as finding local DIDs. You will need to find the countries available, their code, the cities available in those countries, and their codes. This can all be done through the API with these commands. listInternationalCountry(), listInternationalCity(), and orderInternationalDid(). You cannot pick and choose a specific international number, only a city in the country.
EXAMPLE:
<?php
$api = new QBapi();
//this is an example of ordering a DID $result = $api->orderInternationalDid($api ->listInternationalCountry() ->countries[5] ->code[0],$api->listInternationalCity($api ->listInternationalCountry() ->countries[5]->code[0])->cities[3]);
echo '<pre>';
print_r($result);
?>
This will output a success code, and the DID number. If there is an error ordering message, there are no DIDs available in that city at the time.
You can list the international DIDs you own with the command listInternationalDids().
The result will look like this.
[code] => BR
[city] => CAMPINAS
[did] => 551940425540
[did_redirect] => none
Removing an International DID is done with the removeInternationalDid() function.
<?php
$api = new QBapi();
$result = $api->removeInternationalDid("XXXXXXXXXXXX");
echo '<pre>';
print_r($result);
?>
Which will display a simple success message.
Finding rates for international
Three commands are used for finding international rates. internationalRates() and internationalRates2(). The former takes the country ID as the parameter, and the latter takes no parameter and lists rates for non-011 countries. internationalRateCountryList() is the command that will list the arrays of country IDs
EXAMPLE:
You can call and list the code for a country in the internationalRates() command.
<?php
$api = new QBapi();
$result = $api->internationalRates($api-> internationalRateCountryList()->countries[1]-> country_id[0]); echo '<pre>';
print_r($result);
?>
Will Output:
[0] => SimpleXMLElement Object
(
[destination] => ALBANIA
[code] => 355
[rate] => 0.3519
)
[1] => SimpleXMLElement Object
(
[destination] => ALBANIA AMC
[code] => 35558373
[rate] => 0.3689
)
[2] => SimpleXMLElement Object
(
[destination] => ALBANIA AMC
[code] => 35558326
[rate] => 0.3689
)
.....
Example:
$result = $api->internationalRateCountryList();
// -------------- Operators rate for seleted country--------------------- //
$result = $api->internationalRates(2689);
// -------------- Operators rate for countries dialed without 011 (Codes: 1204, 1226, 1236 etc)--------------------- //
//$result = $api->internationalRates2();