{"_id":"58fdfa1b7b09013700aa70e2","category":{"_id":"59082a11beedcf0f00235d87","project":"558d9c32beb7c719007f6319","version":"558d9c33beb7c719007f631c","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-05-02T06:41:21.140Z","from_sync":false,"order":4,"slug":"reporting-apis","title":"Reporting APIs"},"__v":0,"githubsync":"","user":"58cadf93d223510f005d27db","parentDoc":null,"project":"558d9c32beb7c719007f6319","version":{"_id":"558d9c33beb7c719007f631c","project":"558d9c32beb7c719007f6319","__v":19,"createdAt":"2015-06-26T18:38:43.154Z","releaseDate":"2015-06-26T18:38:43.153Z","categories":["558d9c33beb7c719007f631d","558db0bc7afc102f008ed863","558db0d07afc102f008ed864","558db3c84cd25f0d00b7ecb2","558dbace7afc102f008ed894","558dbd104cd25f0d00b7ecca","558dbd4c4cd25f0d00b7eccb","559d3e858639bd21008e90a6","55bb8ca5a8400c2d00873e70","58fdfb438fbd2819000db9eb","590829c7ade4172d006a87b8","59082a11beedcf0f00235d87","5908bd2cba2afd23007d6d12","5908d1f64f544425002b6aae","591e5e9e2c1b1f0f000fa4e5","5a283434aba91f002834ea86","5a69fe5cde745d002c936c66","5a81e6ef761cf300127317f8","5a81e7d63b1e120012bed5a1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-04-24T13:14:03.871Z","link_external":false,"link_url":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:api-header]\n{\n  \"title\": \"Use the Broadcast Report API to get voice broadcast results\"\n}\n[/block]\nAPI used to get a report of all voice broadcasts in a given date range.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Base URL for Broadcast Report\",\n  \"body\": \"https://secure.dialogtech.com/ibp_api.php\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Parameter List\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Accepts\",\n    \"h-3\": \"Max Length\",\n    \"h-4\": \"Notes\",\n    \"h-5\": \"Usage\",\n    \"0-0\": \"action\",\n    \"0-1\": \"Yes\",\n    \"0-2\": \"String: **report.broadcast**\",\n    \"0-3\": \"n/a\",\n    \"0-4\": \"Only accepts **report.broadcast** for Broadcast Report\",\n    \"0-5\": \"Defines the API Call as \\\"Broadcast Report\\\" type\",\n    \"1-0\": \"access_key\",\n    \"1-1\": \"Yes\",\n    \"1-2\": \"String\",\n    \"1-3\": \"n/a\",\n    \"2-0\": \"secret_access_key\",\n    \"2-1\": \"Yes\",\n    \"2-2\": \"String\",\n    \"2-3\": \"n/a\",\n    \"1-4\": \"Access Key from the Key Manager within a DialogTech account\",\n    \"1-5\": \"Credentials used for access to the API for a particular DialogTech account\",\n    \"2-5\": \"Credentials used for access to the API for a particular DialogTech account\",\n    \"2-4\": \"Secret Access Key from the Key Manager within a DialogTech account\",\n    \"3-0\": \"start_date\",\n    \"4-0\": \"end_date\",\n    \"5-0\": \"format\",\n    \"6-0\": \"number\",\n    \"7-0\": \"broadcast_id\",\n    \"8-0\": \"type\",\n    \"3-1\": \"Yes\",\n    \"3-2\": \"Date\",\n    \"4-2\": \"Date\",\n    \"4-1\": \"Yes\",\n    \"5-1\": \"No\",\n    \"5-2\": \"**xml** -  or **csv**\",\n    \"5-3\": \"3\",\n    \"5-4\": \"**xml** - XML format\\n**csv** - csv format\",\n    \"5-5\": \"Determines the output format for the response, as either xml or csv\",\n    \"6-1\": \"No\",\n    \"6-2\": \"String: Unformatted Phone Number\",\n    \"6-3\": \"n/a\",\n    \"6-4\": \"A number that was broadcasted to within the date range specified\",\n    \"6-5\": \"Filters the response to only return records where the *Numer_Called* matches the `number` provided.\",\n    \"7-1\": \"No\",\n    \"7-2\": \"Broadcast ID\",\n    \"7-3\": \"n/a\",\n    \"7-4\": \"Broadcast ID within the specified date range\\n\\nDefault is all broadcasts\",\n    \"7-5\": \"Filters the response to only return records where the *Broadcast_ID* matches the `broadcast_id` provided.\",\n    \"8-1\": \"No\",\n    \"8-2\": \"**survo** or **basic** or **all**\",\n    \"8-3\": \"n/a\",\n    \"8-4\": \"**survo** - Only return records for Smart Broadcasts\\n**basic** - Only return records from basic audio broadcasts\\n**all** - Return records from all broadcats\\n\\n*This value is ignored if a `broadcast_id` is provided*\",\n    \"8-5\": \"Filters the response to only return records where the broadcast type matches the `type` provided.\",\n    \"3-3\": \"8\",\n    \"4-3\": \"8\",\n    \"3-4\": \"Date format should be YYYYMMDD\",\n    \"4-4\": \"Date format should be YYYYMMDD\",\n    \"3-5\": \"Defines the start of the date-range for records to be returned from\",\n    \"4-5\": \"Defines the end of the date-range for records to be returned from\"\n  },\n  \"cols\": 6,\n  \"rows\": 9\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Using this API\"\n}\n[/block]\nThese code examples are meant to show a basic method of accessing DialogTech's bradcast.report API.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\t/*\\n\\t\\tBroadcast Report EX:\\n\\t\\tThis example will request a Broadcast \\n    report. It will then create an html \\n    table to display on the page with all \\n    available Broadcast Report fields.\\n\\t*/\\n\\n\\t// Create cURL resource\\n\\t$ch = curl_init(); \\n\\t$baseuri = \\\"https://secure.dialogtech.com/ibp_api.php?\\\";\\n\\n\\t// API Specific Static Parameters\\n\\t$action = \\\"report.broadcast\\\";\\n\\n\\t// Required User Parameters To Request the API\\n\\t$access_key = \\\"foo\\\";\\n\\t$secret_access_key = \\\"bar\\\";\\n\\t$start_date = \\\"20170101\\\";\\n\\t$end_date = \\\"20170131\\\";\\n\\t$broadcast_type = \\\"all\\\";\\n\\t$format = \\\"csv\\\";\\n\\n\\t// Construct the full URL\\n\\t$full_url = $baseuri . \\\"&action=\\\" . $action .\\n\\t\\t\\\"&access_key=\\\" . $access_key .\\n\\t\\t\\\"&secret_access_key=\\\" . $secret_access_key .\\n\\t\\t\\\"&start_date=\\\" . $start_date .\\n\\t\\t\\\"&end_date=\\\" . $end_date .\\n\\t\\t\\\"&broadcast_type=\\\" . $broadcast_type .\\n\\t\\t\\\"&format=\\\" . $format;\\n\\n\\t// Set the URL\\n\\tcurl_setopt($ch, CURLOPT_URL, $full_url);\\n\\n\\t// Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure\\n\\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n\\n\\t// Sets the $output variable to the result of the curl\\n\\t$output = curl_exec($ch);\\n\\n\\t// Close curl resource to free up system resources\\n\\tcurl_close($ch);\\n\\n\\t// Basic CSS for the table formatting\\n\\t$page_html = \\\"<style>\\n\\ttd\\n\\t{\\n\\t\\tborder-left:1px solid black;\\n\\t\\tborder-top:1px solid black;\\n\\t\\ttext-align:center;\\n\\t}\\n\\ttable\\n\\t{\\n\\t\\tborder-right:1px solid black;\\n\\t\\tborder-bottom:1px solid black;\\n\\t}\\n</style>\\\\n\\\\n\\\";\\n\\n\\n\\t// Create the table\\n\\t$table = \\\"<table>\\\\n\\\";\\n\\t$rows = str_getcsv($output, \\\"\\\\n\\\");\\n\\n\\tforeach($rows as &$row) {\\n\\t\\t// Add new row\\n\\t\\t$table .= \\\"\\t<tr>\\\\n\\\";\\n\\t\\t$cells = str_getcsv($row);\\n\\n\\t\\tforeach($cells as &$cell) {\\n\\t\\t\\t// Add a new cell\\n\\t\\t\\t$table .= \\\"\\t\\t<td>$cell</td>\\\\n\\\";\\n\\t\\t}\\n\\n\\t\\t// Complete the new row\\n\\t\\t$table .= \\\"\\t</tr>\\\\n\\\";\\n\\t}\\n\\n\\t// Complete the table\\n\\t$table .= \\\"</table>\\\";\\n\\n\\t// Echo the CSS and table on the page\\n\\techo $page_html . $table;\\n?>\",\n      \"language\": \"text\",\n      \"name\": \"PHP Example\"\n    },\n    {\n      \"code\": \"curl -X \\\"\\\"\",\n      \"language\": \"text\",\n      \"name\": \"cURL\"\n    }\n  ]\n}\n[/block]\n**Example Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version='1.0' encoding='iso-8859-1'?>\\n<!DOCTYPE data [\\n  <!ELEMENT data (record+)>\\n  <!ELEMENT record (Scheduled_Time,Actual_Time,Delay_if_any,Number_Called,Result_of_Call,Response_ID,Broadcast_Parameters,Broadcast_ID)>\\n  <!ELEMENT Scheduled_Time (#PCDATA)>\\n  <!ELEMENT Actual_Time (#PCDATA)>\\n  <!ELEMENT Delay_if_any (#PCDATA)>\\n  <!ELEMENT Number_Called (#PCDATA)>\\n  <!ELEMENT Result_of_Call (#PCDATA)>\\n  <!ELEMENT Response_ID (#PCDATA)>\\n  <!ELEMENT Broadcast_Parameters (#PCDATA)>\\n  <!ELEMENT Broadcast_ID (#PCDATA)>\\n  ]>\\n<data>\\n    <record>\\n        <Scheduled_Time>2017-01-01 09:00:00</Scheduled_Time>\\n        <Actual_Time>2017-01-01 09:01:35</Actual_Time>\\n        <Delay_if_any>00:01:35</Delay_if_any>\\n        <Number_Called>8772955100</Number_Called>\\n        <Result_of_Call>Live Person</Result_of_Call>\\n        <Response_ID></Response_ID>\\n        <Broadcast_Parameters>12345</Broadcast_Parameters>\\n        <Broadcast_ID>01234567</Broadcast_ID>\\n    </record>\\n    <record>\\n        <Scheduled_Time>2017-01-02 09:00:00</Scheduled_Time>\\n        <Actual_Time>2017-01-01 09:01:20</Actual_Time>\\n        <Delay_if_any>00:01:20</Delay_if_any>\\n        <Number_Called>5556667777</Number_Called>\\n        <Result_of_Call>Live Person</Result_of_Call>\\n        <Response_ID></Response_ID>\\n        <Broadcast_Parameters>12345</Broadcast_Parameters>\\n        <Broadcast_ID>01234568</Broadcast_ID>\\n    </record>\\n    <record>\\n    \\t<Scheduled_Time>2017-01-04 10:54:00</Scheduled_Time>\\n        <Actual_Time>2017-01-04 10:55:36</Actual_Time>\\n        <Delay_if_any>00:01:36</Delay_if_any>\\n        <Number_Called>7083725264</Number_Called>\\n        <Result_of_Call>Live Person</Result_of_Call>\\n        <Response_ID>2955551112</Response_ID>\\n        <Broadcast_Parameters>usr_survey_id=973214</Broadcast_Parameters>\\n        <Broadcast_ID>01234569</Broadcast_ID>\\n    </record>\\n</data>\",\n      \"language\": \"xml\",\n      \"name\": \"xml\"\n    },\n    {\n      \"code\": \"\\\"Scheduled_Time\\\",\\\"Actual_Time\\\",\\\"Delay_if_any\\\",\\\"Number_Called\\\",\\\"Result_of_Call\\\",\\\"Response_ID\\\",\\\"Broadcast_Parameters\\\",\\\"Broadcast_ID\\\"\\n\\\"2017-01-01 09:00:00\\\",\\\"2017-01-01 09:01:35\\\",\\\"00:01:35\\\",\\\"8772955100\\\",\\\"Live Person\\\",\\\"\\\",\\\"12345\\\",\\\"01234567\\\"\\n\\\"2017-01-02 09:00:00\\\",\\\"2017-01-01 09:01:20\\\",\\\"00:01:20\\\",\\\"5556667777\\\",\\\"Live Person\\\",\\\"\\\",\\\"12345\\\",\\\"01234568\\\"\\n\\\"2017-03-01 10:54:00\\\",\\\"2017-03-01 10:55:36\\\",\\\"00:01:36\\\",\\\"7083725264\\\",\\\"Live Person\\\",\\\"2955551112\\\",\\\"usr_survey_id=973214\\\",\\\"01234569\\\"\",\n      \"language\": \"text\",\n      \"name\": \"csv\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Response Appendix\"\n}\n[/block]\nThis is a list of each value returned by the Broadcast Report API and a simple description of what that value represents.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"Scheduled_Time\",\n    \"1-0\": \"Actual_Time\",\n    \"2-0\": \"Delay_if_any\",\n    \"3-0\": \"Number_Called\",\n    \"4-0\": \"Result_of_Call\",\n    \"5-0\": \"Response_ID\",\n    \"6-0\": \"Broadcast_Parameters\",\n    \"7-0\": \"Broadcast_ID\",\n    \"0-1\": \"The time the call was scheduled to be broadcasted from DialogTech\",\n    \"1-1\": \"The time the call was actually broadcasted from DialogTech\",\n    \"2-1\": \"The time DialogTech queued up the call and waited for the appropriate broadcast ports to become available\",\n    \"3-1\": \"The number that was broadcasted to\",\n    \"4-1\": \"The result of DialogTech's Voicemail Detection which attempts to determine the difference between a Live Person and an Answering Machine\",\n    \"5-1\": \"A unique ID assigned to one call as part of a broadcast\",\n    \"6-1\": \"A list of any user-generated parameters utilized as part of a smart broadcast\",\n    \"7-1\": \"A unique ID assigned the entire broadcast\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]","excerpt":"Used to get a report of all voice broadcasts in a given date range.","slug":"broadcast-report","type":"basic","title":"Broadcast Report"}

Broadcast Report

Used to get a report of all voice broadcasts in a given date range.

Use the Broadcast Report API to get voice broadcast results

API used to get a report of all voice broadcasts in a given date range.

Base URL for Broadcast Report

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

Parameter List

Parameter
Required
Accepts
Max Length
Notes
Usage

action

Yes

String: report.broadcast

n/a

Only accepts report.broadcast for Broadcast Report

Defines the API Call as "Broadcast Report" type

access_key

Yes

String

n/a

Access Key from the Key Manager within a DialogTech account

Credentials used for access to the API for a particular DialogTech account

secret_access_key

Yes

String

n/a

Secret Access Key from the Key Manager within a DialogTech account

Credentials used for access to the API for a particular DialogTech account

start_date

Yes

Date

8

Date format should be YYYYMMDD

Defines the start of the date-range for records to be returned from

end_date

Yes

Date

8

Date format should be YYYYMMDD

Defines the end of the date-range for records to be returned from

format

No

xml - or csv

3

xml - XML format
csv - csv format

Determines the output format for the response, as either xml or csv

number

No

String: Unformatted Phone Number

n/a

A number that was broadcasted to within the date range specified

Filters the response to only return records where the Numer_Called matches the number provided.

broadcast_id

No

Broadcast ID

n/a

Broadcast ID within the specified date range

Default is all broadcasts

Filters the response to only return records where the Broadcast_ID matches the broadcast_id provided.

type

No

survo or basic or all

n/a

survo - Only return records for Smart Broadcasts
basic - Only return records from basic audio broadcasts
all - Return records from all broadcats

This value is ignored if a broadcast_id is provided

Filters the response to only return records where the broadcast type matches the type provided.

Using this API

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

<?php
	/*
		Broadcast Report EX:
		This example will request a Broadcast 
    report. It will then create an html 
    table to display on the page with all 
    available Broadcast Report fields.
	*/

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

	// API Specific Static Parameters
	$action = "report.broadcast";

	// Required User Parameters To Request the API
	$access_key = "foo";
	$secret_access_key = "bar";
	$start_date = "20170101";
	$end_date = "20170131";
	$broadcast_type = "all";
	$format = "csv";

	// Construct the full URL
	$full_url = $baseuri . "&action=" . $action .
		"&access_key=" . $access_key .
		"&secret_access_key=" . $secret_access_key .
		"&start_date=" . $start_date .
		"&end_date=" . $end_date .
		"&broadcast_type=" . $broadcast_type .
		"&format=" . $format;

	// 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);

	// Basic CSS for the table formatting
	$page_html = "<style>
	td
	{
		border-left:1px solid black;
		border-top:1px solid black;
		text-align:center;
	}
	table
	{
		border-right:1px solid black;
		border-bottom:1px solid black;
	}
</style>\n\n";


	// Create the table
	$table = "<table>\n";
	$rows = str_getcsv($output, "\n");

	foreach($rows as &$row) {
		// Add new row
		$table .= "	<tr>\n";
		$cells = str_getcsv($row);

		foreach($cells as &$cell) {
			// Add a new cell
			$table .= "		<td>$cell</td>\n";
		}

		// Complete the new row
		$table .= "	</tr>\n";
	}

	// Complete the table
	$table .= "</table>";

	// Echo the CSS and table on the page
	echo $page_html . $table;
?>
curl -X ""

Example Response

<?xml version='1.0' encoding='iso-8859-1'?>
<!DOCTYPE data [
  <!ELEMENT data (record+)>
  <!ELEMENT record (Scheduled_Time,Actual_Time,Delay_if_any,Number_Called,Result_of_Call,Response_ID,Broadcast_Parameters,Broadcast_ID)>
  <!ELEMENT Scheduled_Time (#PCDATA)>
  <!ELEMENT Actual_Time (#PCDATA)>
  <!ELEMENT Delay_if_any (#PCDATA)>
  <!ELEMENT Number_Called (#PCDATA)>
  <!ELEMENT Result_of_Call (#PCDATA)>
  <!ELEMENT Response_ID (#PCDATA)>
  <!ELEMENT Broadcast_Parameters (#PCDATA)>
  <!ELEMENT Broadcast_ID (#PCDATA)>
  ]>
<data>
    <record>
        <Scheduled_Time>2017-01-01 09:00:00</Scheduled_Time>
        <Actual_Time>2017-01-01 09:01:35</Actual_Time>
        <Delay_if_any>00:01:35</Delay_if_any>
        <Number_Called>8772955100</Number_Called>
        <Result_of_Call>Live Person</Result_of_Call>
        <Response_ID></Response_ID>
        <Broadcast_Parameters>12345</Broadcast_Parameters>
        <Broadcast_ID>01234567</Broadcast_ID>
    </record>
    <record>
        <Scheduled_Time>2017-01-02 09:00:00</Scheduled_Time>
        <Actual_Time>2017-01-01 09:01:20</Actual_Time>
        <Delay_if_any>00:01:20</Delay_if_any>
        <Number_Called>5556667777</Number_Called>
        <Result_of_Call>Live Person</Result_of_Call>
        <Response_ID></Response_ID>
        <Broadcast_Parameters>12345</Broadcast_Parameters>
        <Broadcast_ID>01234568</Broadcast_ID>
    </record>
    <record>
    	<Scheduled_Time>2017-01-04 10:54:00</Scheduled_Time>
        <Actual_Time>2017-01-04 10:55:36</Actual_Time>
        <Delay_if_any>00:01:36</Delay_if_any>
        <Number_Called>7083725264</Number_Called>
        <Result_of_Call>Live Person</Result_of_Call>
        <Response_ID>2955551112</Response_ID>
        <Broadcast_Parameters>usr_survey_id=973214</Broadcast_Parameters>
        <Broadcast_ID>01234569</Broadcast_ID>
    </record>
</data>
"Scheduled_Time","Actual_Time","Delay_if_any","Number_Called","Result_of_Call","Response_ID","Broadcast_Parameters","Broadcast_ID"
"2017-01-01 09:00:00","2017-01-01 09:01:35","00:01:35","8772955100","Live Person","","12345","01234567"
"2017-01-02 09:00:00","2017-01-01 09:01:20","00:01:20","5556667777","Live Person","","12345","01234568"
"2017-03-01 10:54:00","2017-03-01 10:55:36","00:01:36","7083725264","Live Person","2955551112","usr_survey_id=973214","01234569"

Response Appendix

This is a list of each value returned by the Broadcast Report API and a simple description of what that value represents.

Parameter
Description

Scheduled_Time

The time the call was scheduled to be broadcasted from DialogTech

Actual_Time

The time the call was actually broadcasted from DialogTech

Delay_if_any

The time DialogTech queued up the call and waited for the appropriate broadcast ports to become available

Number_Called

The number that was broadcasted to

Result_of_Call

The result of DialogTech's Voicemail Detection which attempts to determine the difference between a Live Person and an Answering Machine

Response_ID

A unique ID assigned to one call as part of a broadcast

Broadcast_Parameters

A list of any user-generated parameters utilized as part of a smart broadcast

Broadcast_ID

A unique ID assigned the entire broadcast