getVoxnumbers¶
Request Method: GET
Description: Retrieves all VoxNumbers and their details
URL: https://api.iovox.com:444/Voxnumbers?v=3&method=getVoxnumbers
The following parameters can be sent in the querystring
Parameter | Description | Default Value | Data Type | Mandatory |
v | API version to use | INTEGER | YES | |
page | The page number to return. Use together with limit to achieve paginated results | 1 | INTEGER | NO |
limit | Determines how many results to return. Use together with page to achieve paginated results. Maximum here is 20000 | 20000 | INTEGER | NO |
req_fields | Comma separated list of abbreviated fields to return in response. nid=Node ID, nname=Node Name, lid=Link ID, lname=Link Name, as=Assigned Status, cs=Call Status, vn=VoxNumber, vnt=VoxNumber Type, vnco=VoxNumber Country, vnci=VoxNumber City, vnpd=VoxNumber Purchase Date | lid,lname,as,cs,vn, vnt,vnco,vnci,vnpd | STRING | NO |
order | Determines which field to order the output result by. Use a field name from the req_fields list and suffix with ASC or DESC for ascending or descending respectively. For example, "vnpd_DESC" will return results ordered by VoxNumber Purchase Date with the most recent first | STRING | NO | |
voxnumber | Returns VoxNumber details under the specified VoxNumber (this must be internationalised e.g. 442012344321) | INTEGER | NO | |
voxnumber_type | Returns all VoxNumbers under the specified VoxNumber Type: LOCAL, NATIONAL | STRING | NO | |
voxnumber_country | Returns all VoxNumbers in the specified country | STRING | NO | |
voxnumber_city | Returns all VoxNumbers in the specified city | STRING | NO | |
assigned_status | Returns all VoxNumbers based on the specified assigned status, i.e. whether or not it is assigned to a link: ASSIGNED or UNASSIGNED | STRING | NO | |
call_status | Returns all VoxNumbers based on the specified call status. The valid search criteria here are:
| STRING | NO | |
link_id | Returns the VoxNumber attached to the specified Link ID | STRING | NO | |
link_name | Returns the VoxNumbers attached to the specified Link Name | STRING | NO | |
node_id | Returns the VoxNumbers attached to the specified Node ID | STRING | NO | |
node_name | Returns the VoxNumbers attached to the specified Node Name | STRING | NO | |
cat_ids | Returns all data for the given category IDs. To produce an AND based search separate each by a comma and to produce an OR based, separate as array elements. For example, cat_ids[]=1,2&cat_ids[]=3,4 would search where category ID is (1 AND 2) OR (3 AND 4). Note: if a search is made for Category ID 5, potentially Location = London, results will include any items further down the tree, such as Notting Hill | ARRAY | NO | |
output | Specifying XML or JSON returns data in XML or JSON format | XML | STRING | NO |
Result¶
Error Result¶
HTTP Code | Error String | Resolution |
400 | API Version Empty | Add a value for the v parameter in the query string |
400 | API Version Invalid | Correct v parameter |
400 | Request Method must be GET. x attempted | Switch request method x to GET |
400 | Page Number not an integer | Remove non-numerics from page |
400 | Limit not an integer | Remove non-numerics from limit |
400 | Limit must be between 1 and 20000 | Correct the limit parameter |
400 | VoxNumber not an integer | Remove non-numerics from voxnumber |
400 | Assigned Status Invalid | Remove assigned_status or change to ASSIGNED or UNASSIGNED |
400 | Call Status Invalid | Remove call_status or change to ON, NO RULES, ACTIVE or OFF |
400 | Order Field Invalid | Check the allowed abbreviation fields in the documentation |
400 | Order Direction Invalid | Correct the direction in the order. |
400 | Output Type Invalid | Correct output parameter |
500 | Internal Server Error | Retry later |
Success Result¶
<?xml version="1.0" encoding="utf-8"?>
<response>
<current_page>1<current_page>
<total_pages>4<total_pages>
<total_results>100<total_results>
<results>
<result>
<link_id>1290</link_id>
<assigned_status>ASSIGNED</assigned_status>
<call_status>ON (No Rules)</call_status>
<country_code>44</country_code>
<voxnumber>441642112233</voxnumber>
<voxnumber_type>LOCAL</voxnumber_type>
<voxnumber_country>UNITED KINGDOM</voxnumber_country>
<voxnumber_city>MIDDLESBROUGH</voxnumber_city>
<purchase_date>2010-01-01 12:30:15</purchase_date>
</result>
<result>
...
<result>
</results>
</response>