API & DOCS

My Account            

Get the surcharge cost for an international phone number

Use the International Surcharges API to get international surcharge pricing

Use the International Surcharges API to retrieve the surcharge cost for an international phone number

📘

Base URL for International Surcharges

https://secure.dialogtech.com/ibp_api.php

Parameter List

ParameterRequiredAcceptsMax LengthNotesUsage
actionYesString: cost.get_surchargen/aOnly accepts cost.get_surcharge to get international surcharge costsDefines the API Call as "International Surcharges" type
access_keyYesStringn/aAccess Key from the Key Manager within a DialogTech accountCredentials used for access to the API for a particular DialogTech account
secret_access_keyYesStringn/aSecret Access Key from the Key Manager within a DialogTech accountCredentials used for access to the API for a particular DialogTech account
phone_listNoStringn/aBar "|" delimited list of phone numbersA list of phone numbers to get surcharges for. All phone numbers must start with 011 (Example: 0115712145762)

Using this API

These code examples are meant to show a basic method of accessing DialogTech's International Surcharges API.

<?php
  /*
    International Surcharges EX:
    This example will pull DialogTech's
    international surcharge for transfers
    to a specific international number
  */

  // Create cURL resource
  $ch = curl_init(); 
  $baseuri = "https://secure.dialogtech.com/ibp_api.php?";

  // API Specific Static Parameters
  $action = "cost.get_surcharge";

  // Required User Parameters To Request the API
  $access_key = "foo";
  $secret_access_key = "bar";
  
  // Non required parameters used to request toe API
  $phone_list = "0115552001234|0115552527685";



  // Construct the full URL
  $full_url = $baseuri . "&action=" . $action .
    "&access_key=" . $access_key .
    "&secret_access_key=" . $secret_access_key .
    "&phone_list=" . $phone_list;


  // Set the URL
  curl_setopt($ch, CURLOPT_URL, $full_url);

  // Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

  // Sets the $output variable to the result of the curl
  $output = curl_exec($ch);

  // Close curl resource to free up system resources
  curl_close($ch);

  // Echo the XML response to the page
  echo $output;
?>
curl -X ""

Example Response

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE response [
        <!ELEMENT response (result,result_description,rates)>
        <!ELEMENT result (#PCDATA)>
        <!ELEMENT result_description (#PCDATA)>
        <!ELEMENT rates (rate+)>
        <!ELEMENT rate (phone_number,surcharge)>
        <!ELEMENT phone_number (#PCDATA)>
        <!ELEMENT surcharge (#PCDATA)>
        ]>
<response>
  <result>success</result>
  <result_description>
  </result_description>
  <rates>
    <rate>
      <phone_number>0115552001234</phone_number>
      <surcharge>0.0185</surcharge>
    </rate>
    <rate>
      <phone_number>0115552527685</phone_number>
      <surcharge>0.0182</surcharge>
    </rate>
  </rates>
</response>

Rates shown in example response are subject to change