getSmsData¶
Request Method: GET
Description: Collects all SMS data
URL: https://api.iovox.com:444/SMS?v=3&method=getSmsData
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 |
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, "date_DESC" will return results ordered by date with the most recent first. | cs_DESC | STRING | NO |
sdt | Returns all calls received since a given date. Start date format is YYYY-MM-DD HH:MM:SS with hours, minutes and seconds being optional. Hours, minutes and seconds defaults to 00:00:00 | 1st day of current month at 00:00:00 | DATETIME | NO |
edt | Returns all calls received before a given date. End date format is YYYY-MM-DD HH:MM:SS with hours, minutes and seconds being optional. Hours, minutes and seconds defaults to 23:59:59 | Current day at 23:59:59 | DATETIME | NO |
sms_activity_id | Returns the Call with the specified SMS Activity ID | STRING | NO | |
node_id | Returns all calls for the specified Node ID | STRING | NO | |
node_type | Returns all calls for the specified Node Type | STRING | NO | |
link_id | Returns all calls for the specified Link ID | STRING | NO | |
link_type | Returns all calls for the specified Link Type | STRING | NO | |
rule_result | Returns all data under the given rule result | STRING | NO | |
origin | Returns all data under the given origin, e.g. 447966111222 | STRING | NO | |
voxnumber | Returns all data under the given VoxNumber, e.g. 448456111222 | INTEGER | NO | |
destination | Returns all data under the given destination, e.g. 447966123456 | STRING | NO | |
direction | Returns all data under the given direction e.g. IN | ENUM ['IN,'OUT'] | NO | |
req_fields | Comma separated list of abbreviated fields to return in response. sms_activity_id = SMS Activity ID, direction = Direction, origin = Origin, destination= Destination, message = Message, date = Date, link_id = Link ID, link_name = Link Name, link_type = Link Type, node_id = Node ID, node_name = Node Name, node_type = Node Type, template_name = Template Name, rule_result = Rule Result, voxnumber = VoxNumber, voxnumber_country = VoxNumber Country, voxnumber_city = VoxNumber City | STRING | 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 | Order Field Invalid | Check the allowed abbreviation fields in the documentation |
400 | Order Direction Invalid | Correct the direction in the order |
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 | Start Date Invalid | Correct sdt parameter |
400 | End Date Invalid | Correct edt parameter |
400 | VoxNumber not an integer | Correct VoxNumber parameter |
400 | Required Fields Invalid: fieldone, fieldtwo | Correct or remove fieldone and fieldtwo |
400 | Output Type Invalid | Correct output parameter |
500 | Internal Server Error | Retry later |
Success Result¶
<?xml version="1.0" encoding="utf-8"?>
<response>
<total_pages>1</total_pages>
<total_results>8</total_results>
<results>
<result>
<sms_activity_id>d120ed6e-a82b-11e6-9852-d43d7ed6ce4c</sms_activity_id>
<direction>IN</direction>
<origin>44790123123</origin>
<destination>44772346123</destination>
<message>Example of message</message>
<date>2016-11-11 16:28:03</date>
<link_id>The Link Id</link_id>
<link_name>Link Name</link_name>
<link_type>Link Type</link_type>
<node_id>Node ID</node_id>
<node_name>The Node Name</node_name>
<node_type>Node Type</node_type>
<template_name>Template of VoxNumber</template_name>
<rule_result></rule_result>
<voxnumber>44771456782</voxnumber>
<voxnumber_country>UNITED KINGDOM</voxnumber_country>
<voxnumber_city>MOBILE</voxnumber_city>
</result>
<result>
...
</result>
</results>
</response>