XML Rates
XML API
Download documentation (Microsoft Word)
Version: 1.08
Index
Query URL
Main URL
Optional GET Arguments
Wildcard matching
Examples
Results Formating
XML header
Error result example
Results description
Successful result example
https://www.voip.ms/rates/xmlapi.php
dest – Destination name
pattern – destination prefix
Use % for wildcards. (e.g.: france% , %Kingdom%, 44%, %United States%)
- https://www.voip.ms/rates/xmlapi.php?dest=United
Return no results
- https://www.voip.ms/rates/xmlapi.php?dest=%United%
Return any results containing “United” in the name. Including United States, United Kingdom, United Arabe Emirates etc.
- https://www.voip.ms/rates/xmlapi.php?dest=United States%
Return all results start with United States
- https://www.voip.ms/rates/xmlapi.php?dest=%United%&pattern=44%
Return results from only United Kingdom because even if the destination match other countries, 44 is the country code for England.
- https://www.voip.ms/rates/xmlapi.php?pattern=1514
Return Montreal, Canada only
- https://www.voip.ms/rates/xmlapi.php?pattern=441
Returns result for United Kingdom proper only
as opposed to
https://www.voip.ms/rates/xmlapi.php?pattern=44%
Return the whole United Kingdom results
<?xml version="1.0" encoding="utf-8" ?>
<error>
<code>404</code>
<description>No results found</description>
<dest>some country</dest>
<pattern>some code</pattern>
</error>
If successful, main results array contain one or multiple item arrays. Each item childs are described here:
Short_description: Country name
Description: Detailed destination name
Prefix: Dial prefix
Rate: Current rate in US cents
old_rate: If current rate has been changed in the past, show old rate
old_rate_change: Date of last rate update for this item
<results>
<item>
<short_description>United Kingdom</short_description>
<description>United Kingdom - Freephone</description>
<prefix>44800</prefix>
<rate>0.021255465</rate>
<increment>6</increment>
<old_rate>0.233545</old_rate>
<old_rate_change>2007-06-02</old_rate_change>
</item>
<item>
<short_description>United Kingdom</short_description>
<description>United Kingdom - Freephone</description>
<prefix>44808</prefix>
<rate>0.021255465</rate>
<increment>6</increment>
<old_rate>0.000000</old_rate>
<old_rate_change>0000-00-00</old_rate_change>
</item>
<item>
<short_description>United Kingdom</short_description>
<description>United Kingdom - Local Rate</description>
<prefix>44845</prefix>
<rate>0.08451366</rate>
<increment>6</increment>
<old_rate></old_rate>
<old_rate_change></old_rate_change>
</item>
<results>