NoveroCDR
GetTotals
Description
Retrieve the summarised call data totals for number(s) in the account associated with the current API session.
Parameters
| string Period |
The period of time to use for collating the totals. Available options include:
|
||||||||||
| string Number | The number which the totals should be collated for. For all numbers in the account, omit this parameter. | ||||||||||
| RequiredOptional | |||||||||||
Request
- XML
- PHP
- Ruby
- Python
- C#
<?xml version="1.0"?>
<NoveroRequest>
<Request target="NoveroCDR" name="GetTotals" id="TestRequest">
<Number>01213691057</Number>
</Request>
</NoveroRequest>
<?php
require_once('TTNCApi.php');
$Api = new TTNCApi('<username>', '<password>', '<VKey>');
$Request = $Api->NewRequest('NoveroCDR', 'GetTotals', 'TestRequest');
$Request->SetData('Number', '01213691057');
$Api->MakeRequests();
$Response = $Api->GetResponseFromId('TestRequest');
?>
require TTNCApi
api = TTNCApi.new('<username>', '<password>', '<vkey>')
request = api.newrequest('NoveroCDR', 'GetTotals', 'TestRequest')
request.setdata('Number', '01213691057')
api.makerequest()
p request.getresponse()
api = TTNCApi('<username>', '<password>', '<vkey>')
request = api.newrequest('NoveroCDR', 'GetTotals', 'TestRequest')
request.setdata('Number', '01213691057')
api.makerequest()
p request.getresponse()
using System;
using TTNCApi;
class Program
{
static void Main(string[] args)
{
TTNCApi api = new TTNCApi("<username>", "<password>", "<vkey>");
TTNCRequest request = api.NewRequest("NoveroCDR", "GetTotals", "TestRequest");
request.setData("Number", "01213691057");
api.MakeRequests();
TTNCParser dic = request.GetResponse();
}
}
Response
<?xml version="1.0"?>
<NoveroResponse>
<Response target="NoveroCDR" name="GetTotals" Code="200" RequestId="TestRequest">
<CDRTotals Number="01213691057" Period="day">
<AnsweredTotal>0</AnsweredTotal>
<MinsTotal>0 secs</MinsTotal>
<MinsTotalNoFormat>0</MinsTotalNoFormat>
<MissedTotal>0</MissedTotal>
<VoicemailTotal>0</VoicemailTotal>
<AvgLength>0 secs</AvgLength>
<ChargeTotal>0.00</ChargeTotal>
<AvgCost>0.00</AvgCost>
</CDRTotals>
</Response>
</NoveroResponse>
GetCDRs
Description
Retrieve call data records for the account associated with the current API session.
Parameters
| string Number | Limit the query to CDRs for the number specified. |
| int offset | The starting offset for the result set. Defaults to 0. |
| int limit | The maximum number of Call Data Records that will be returned in a result set. Defaults to 10. |
| int LastId | The identifier of a previously retrieved call record. The next applicable record will be the first item in the result set. |
| string StartDate (optional) | The start date for the query, in the format yyyy-mm-dd. |
| string EndDate (optional) | The end date for the query, in the format yyyy-mm-dd. |
| RequiredOptional | |
Request
- XML
- PHP
- Ruby
- Python
- C#
<?xml version="1.0"?>
<NoveroRequest>
<Request target="NoveroCDR" name="GetCDRs" id="TestRequest">
<LastId>106398334</LastId>
<limit>10</limit>
</Request>
</NoveroRequest>
<?php
require_once('TTNCApi.php');
$Api = new TTNCApi('<username>', '<password>', '<VKey>');
$Request = $Api->NewRequest('NoveroCDR', 'GetCDRs', 'TestRequest');
$Request->SetData('LastId', '106398334');
$Request->SetData('limit', '10');
$Api->MakeRequests();
$Response = $Api->GetResponseFromId('TestRequest');
?>
require TTNCApi
api = TTNCApi.new('<username>', '<password>', '<vkey>')
request = api.newrequest('NoveroCDR', 'GetCDRs', 'TestRequest')
request.setdata('LastId', '106398334')
request.setdata('limit', '10')
api.makerequest()
p request.getresponse()
api = TTNCApi('<username>', '<password>', '<vkey>')
request = api.newrequest('NoveroCDR', 'GetCDRs', 'TestRequest')
request.setdata('LastId', '106398334')
request.setdata('limit', '10')
api.makerequest()
p request.getresponse()
using System;
using TTNCApi;
class Program
{
static void Main(string[] args)
{
TTNCApi api = new TTNCApi("<username>", "<password>", "<vkey>");
TTNCRequest request = api.NewRequest("NoveroCDR", "GetCDRs", "TestRequest");
request.setData("LastId", "106398334");
request.setData("limit", "10");
api.MakeRequests();
TTNCParser dic = request.GetResponse();
}
}
Response
<?xml version="1.0"?>
<NoveroResponse>
<Response target="NoveroCDR" name="GetCDRs" Code="200" RequestId="TestRequest">
<CDRs>
<CDR>
<uid>106398335</uid>
<ref>51FD5E980233A34F</ref>
<calldate>2013-08-03</calldate>
<calltime>20:48:40</calltime>
<anumber>7921255043</anumber>
<anumber_location>UK O2 Mobile</anumber_location>
<bnumber>1245830144</bnumber>
<alias></alias>
<dialled>0</dialled>
<dialled_location>Unknown</dialled_location>
<duration>0</duration>
<ring_time>0</ring_time>
<user_cost>0.000</user_cost>
<reason>2</reason>
<reason_q805>0</reason_q805>
<HasRecordedCall>1</HasRecordedCall>
<HasVoicemailRecording>0</HasVoicemailRecording>
<HasFaxDocument>0</HasFaxDocument>
</CDR>
<CDR>
<uid>106398336</uid>
<ref>51FD5EB00233A3E4</ref>
<calldate>2013-08-03</calldate>
<calltime>20:49:04</calltime>
<anumber>7921255043</anumber>
<anumber_location>UK O2 Mobile</anumber_location>
<bnumber>1245830144</bnumber>
<alias></alias>
<dialled>0</dialled>
<dialled_location>Unknown</dialled_location>
<duration>0</duration>
<ring_time>0</ring_time>
<user_cost>0.000</user_cost>
<reason>2</reason>
<reason_q805>0</reason_q805>
<HasRecordedCall>1</HasRecordedCall>
<HasVoicemailRecording>0</HasVoicemailRecording>
<HasFaxDocument>0</HasFaxDocument>
</CDR>
...
</CDRs>
</Response>
</NoveroResponse>
GetCDR (single)
Description
Retrieve a single call data record from a CDRUID or CDRRef.
Parameters
| int CDRUID | The CDRUID, can be retrieved from a the GetCDRs function. |
| string CDRRef | he CDRUID, can be retrieved from a the GetCDRs function or sent via a webhook (if configured). |
| RequiredOptional | |
Request
- XML
- PHP
- Ruby
- Python
- C#
<?xml version="1.0"?>
<NoveroRequest>
<Request target="NoveroCDR" name="GetCDR" id="TestRequest">
<CDRRef>!ABCDEF12345678</CDRRef>
</Request>
</NoveroRequest>
<?php
require_once('TTNCApi.php');
$Api = new TTNCApi('<username>', '<password>', '<VKey>');
$Request = $Api->NewRequest('NoveroCDR', 'GetCDR', 'TestRequest');
$Request->SetData('CDRRef', '!ABCDEF12345678');
$Api->MakeRequests();
$Response = $Api->GetResponseFromId('TestRequest');
?>
require TTNCApi
api = TTNCApi.new('<username>', '<password>', '<vkey>')
request = api.newrequest('NoveroCDR', 'GetCDR', 'TestRequest')
request.setdata('CDRRef', '!ABCDEF12345678')
api.makerequest()
p request.getresponse()
api = TTNCApi('<username>', '<password>', '<vkey>')
request = api.newrequest('NoveroCDR', 'GetCDR', 'TestRequest')
request.setdata('CDRRef', '!ABCDEF12345678')
api.makerequest()
p request.getresponse()
using System;
using TTNCApi;
class Program
{
static void Main(string[] args)
{
TTNCApi api = new TTNCApi("<username>", "<password>", "<vkey>");
TTNCRequest request = api.NewRequest("NoveroCDR", "GetCDR", "TestRequest");
request.setData("CDRRef", "!ABCDEF12345678");
api.MakeRequests();
TTNCParser dic = request.GetResponse();
}
}
Response
<?xml version="1.0"?>
<NoveroResponse>
<Response target="NoveroCDR" name="GetCDR" Code="200" RequestId="TestRequest">
<CDR>
<uid>106398335</uid>
<ref>!ABCDEF12345678</ref>
<calldate>2013-08-03</calldate>
<calltime>20:48:40</calltime>
<anumber>7921255043</anumber>
<anumber_location>UK O2 Mobile</anumber_location>
<bnumber>1245830144</bnumber>
<alias></alias>
<dialled>0</dialled>
<dialled_location>Unknown</dialled_location>
<duration>0</duration>
<ring_time>0</ring_time>
<user_cost>0.000</user_cost>
<reason>2</reason>
<reason_q805>0</reason_q805>
<HasRecordedCall>1</HasRecordedCall>
<HasVoicemailRecording>0</HasVoicemailRecording>
<HasFaxDocument>0</HasFaxDocument>
</CDR>
</Response>
</NoveroResponse>
Downloading CDRs
The example below demonstrates how to download CDRs from the API for storage and processing locally.
On the initial request, download the most current CDRs for the current date - this will enable you to get the ID of the most recent call on your account. If you have more than limit number of calls you will need to include this and the offset parameter until you reach the most recent call:
Request
<?xml version="1.0"?>
<NoveroRequest>
<Request target="Auth" name="SessionLogin" id="SessionRequest">
<Username>user@domain.com</Username>
<Password>secretpassword</Password>
<VKey>a9d64e4c3289e7a14b51baf8adfec60a</VKey>
</Request>
<Request target="NoveroCDR" name="GetCDRs" id="Request1">
<StartDate>2016-05-23</StartDate>
<EndDate>2016-05-24</EndDate>
</Request>
</NoveroRequest>
Response
<?xml version="1.0"?>
<NoveroResponse>
<Response target="Auth" name="SessionLogin" Code="200" RequestId="SessionRequest">
<SessionId>676fb75612b1e3a5691f4969f6503378</SessionId>
</Response>
<Response target="NoveroCDR" name="GetCDRs" Code="200" RequestId="Request1">
<CDRs>
<CDR>
<uid>108119862</uid>
<ref>!5224557B6062F</ref>
<calldate>2013-09-02</calldate>
<calltime>10:08:11</calltime>
<anumber>1245123123</anumber>
<anumber_location>UK Chelmsford</anumber_location>
<bnumber>1211234567</bnumber>
<alias>-</alias>
<dialled>V:user@domain.com</dialled>
<dialled_location>Voice to Email</dialled_location>
<duration>15</duration>
<ring_time>0</ring_time>
<user_cost>0.005</user_cost>
<reason>1</reason>
<reason_q805>1</reason_q805>
</CDR>
<CDR>
<uid>108139023</uid>
<ref>!522485C6323B</ref>
<calldate>2013-09-02</calldate>
<calltime>13:34:14</calltime>
<anumber>1245123123</anumber>
<anumber_location>UK Chelmsford</anumber_location>
<bnumber>1211234567</bnumber>
<alias>-</alias>
<dialled>447512345678</dialled>
<dialled_location>UK O2 Mobile</dialled_location>
<duration>21</duration>
<ring_time>14</ring_time>
<user_cost>0.026</user_cost>
<reason>1</reason>
<reason_q805>1</reason_q805>
</CDR>
</CDRs>
</Response>
</NoveroResponse>
The
Request
<?xml version="1.0"?>
<NoveroRequest>
<Request target="Auth" name="SessionLogin" id="SessionRequest">
<Username>user@domain.dom</Username>
<Password>secretpassword</Password>
<VKey>a9d64e4c3289e7a14b51baf8adfec60a</VKey>
</Request>
<Request target="NoveroCDR" name="GetCDRs" id="Request1">
<LastId>108139023</LastId>
</Request>
</NoveroRequest>
Response
<?xml version="1.0"?>
<NoveroResponse>
<Response target="Auth" name="SessionLogin" Code="200" RequestId="SessionRequest">
<SessionId>1df9979b192955eb973e21a4103306ec</SessionId>
</Response>
<Response target="NoveroCDR" name="GetCDRs" Code="200" RequestId="Request1">
<CDRs>
<CDR>
<uid>108183829</uid>
<ref>!5225936BA6928</ref>
<calldate>2013-09-03</calldate>
<calltime>08:44:43</calltime>
<anumber>1245123123</anumber>
<anumber_location>UK Chelmsford</anumber_location>
<bnumber>1211234567</bnumber>
<alias>-</alias>
<dialled>0</dialled>
<dialled_location>Unknown</dialled_location>
<duration>0</duration>
<ring_time>0</ring_time>
<user_cost>0.000</user_cost>
<reason>1015</reason>
<reason_q805>487</reason_q805>
</CDR>
</CDRs>
</Response>
</NoveroResponse>