<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.7kas.com/index.php?action=history&amp;feed=atom&amp;title=API_getcdr</id>
	<title>API getcdr - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.7kas.com/index.php?action=history&amp;feed=atom&amp;title=API_getcdr"/>
	<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=API_getcdr&amp;action=history"/>
	<updated>2026-09-07T00:37:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.7kas.com/index.php?title=API_getcdr&amp;diff=632&amp;oldid=prev</id>
		<title>Maintenance script: API docs (generated from func=help)</title>
		<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=API_getcdr&amp;diff=632&amp;oldid=prev"/>
		<updated>2026-08-03T10:31:12Z</updated>

		<summary type="html">&lt;p&gt;API docs (generated from func=help)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:31, 3 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot;&gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Response ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Response ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FillRecords2JSON records: {&quot;RecordCount&quot;:N,&quot;fields&quot;:[...],&quot;1&quot;:[...],...}. Columns: calldate, clisrc, clidst, clid, src, dst, billsec, lastapp, disposition, uniqueid, channel, dstchannel, callfrom. callfrom = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;raw &lt;/del&gt;call-direction code &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;set by the PBX &lt;/del&gt;(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;integer; &lt;/del&gt;1 = incoming/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Entrante&lt;/del&gt;). &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The portal maps &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;code to its direction label (Interna/Entrante/Saliente)&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FillRecords2JSON records: {&quot;RecordCount&quot;:N,&quot;fields&quot;:[...],&quot;1&quot;:[...],...}. Columns: calldate, clisrc, clidst, clid, src, dst, billsec, lastapp, disposition, uniqueid, channel, dstchannel, callfrom. callfrom = call-direction code (&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0 = undetermined, &lt;/ins&gt;1 = incoming/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;entrante, 2 = outgoing/saliente, 3 = incoming re-launched as outgoing&lt;/ins&gt;). &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Source of truth: &lt;/ins&gt;the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;COMMENT on tucall.voip_cdr.callfrom&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Column visibility by profile ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Column visibility by profile ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>https://wiki.7kas.com/index.php?title=API_getcdr&amp;diff=631&amp;oldid=prev</id>
		<title>Maintenance script: API docs (generated from func=help)</title>
		<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=API_getcdr&amp;diff=631&amp;oldid=prev"/>
		<updated>2026-08-03T10:19:10Z</updated>

		<summary type="html">&lt;p&gt;API docs (generated from func=help)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:19, 3 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot;&gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Response ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Response ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FillRecords2JSON records: {&quot;RecordCount&quot;:N,&quot;fields&quot;:[...],&quot;1&quot;:[...],...}.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;FillRecords2JSON records: {&quot;RecordCount&quot;:N,&quot;fields&quot;:[...],&quot;1&quot;:[...],...}&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Columns: calldate, clisrc, clidst, clid, src, dst, billsec, lastapp, disposition, uniqueid, channel, dstchannel, callfrom. callfrom = raw call-direction code set by the PBX (integer; 1 = incoming/Entrante). The portal maps the code to its direction label (Interna/Entrante/Saliente)&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Column visibility by profile ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Column visibility by profile ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>https://wiki.7kas.com/index.php?title=API_getcdr&amp;diff=359&amp;oldid=prev</id>
		<title>Maintenance script: API docs (generated from func=help)</title>
		<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=API_getcdr&amp;diff=359&amp;oldid=prev"/>
		<updated>2026-07-21T22:33:31Z</updated>

		<summary type="html">&lt;p&gt;API docs (generated from func=help)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;7Kas VoIP REST API function. Available to: &amp;#039;&amp;#039;&amp;#039;SuperRoot, Operator, Client&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Call Detail Records (CDR) for a period. One function serves all roles (CDR has no pricing columns). Clients see only their own account (accountcodeid is forced); operators their scope; SuperRoot everything. Served from SHM cache with PostgreSQL fallback.&lt;br /&gt;
&lt;br /&gt;
== Call ==&lt;br /&gt;
 GET  …/7Kas?func=getcdr&amp;amp;ukey=YOUR_KEY&amp;amp;…&lt;br /&gt;
Requires the &amp;lt;code&amp;gt;ukey&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Parameter !! Type !! Required !! Default !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;year&amp;lt;/code&amp;gt; || integer || Yes || — || Year of the records (e.g. 2026).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;month&amp;lt;/code&amp;gt; || integer || Yes || — || Month, 1-12.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt; || integer || No || — || Filter by day of month (1-31).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;hour&amp;lt;/code&amp;gt; || integer || No || — || Filter by hour (0-23). &amp;lt;small&amp;gt;(only valid together with day)&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;accountcodeid&amp;lt;/code&amp;gt; || integer || No || — || Filter by account id. Ignored/forced to the caller&amp;#039;s own for clients.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;limit&amp;lt;/code&amp;gt; || integer || No || &amp;lt;code&amp;gt;100&amp;lt;/code&amp;gt; || Max rows. SHM fast-path up to 10000, PostgreSQL fallback up to 1000.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;offset&amp;lt;/code&amp;gt; || integer || No || &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; || Pagination offset.&lt;br /&gt;
|}&lt;br /&gt;
== Example ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;https://api.7kas.com:9080/7Kas?func=getcdr&amp;amp;ukey=KEY&amp;amp;year=2026&amp;amp;month=7&amp;amp;limit=100&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Response ==&lt;br /&gt;
FillRecords2JSON records: {&amp;quot;RecordCount&amp;quot;:N,&amp;quot;fields&amp;quot;:[...],&amp;quot;1&amp;quot;:[...],...}.&lt;br /&gt;
&lt;br /&gt;
== Column visibility by profile ==&lt;br /&gt;
Pricing/cost columns depend on the caller&amp;#039;s profile (GOD LAW):&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SuperRoot&amp;#039;&amp;#039;&amp;#039; — provider cost + selling price + profit (VOC only).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Operator&amp;#039;&amp;#039;&amp;#039; — account price + root price + profit (VOC only).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Client (direct, root=0)&amp;#039;&amp;#039;&amp;#039; — only its own selling price (accountcode column).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Client (of operator, root&amp;gt;0)&amp;#039;&amp;#039;&amp;#039; — only its own selling price (root column).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[API VoIP]] · &amp;#039;&amp;#039;&amp;#039;[[API Console|▶ Try it live]]&amp;#039;&amp;#039;&amp;#039; · Profiles: [[API profile SuperRoot]], [[API profile Operator]], [[API profile Client (of operator)]], [[API profile Client (direct)]]&lt;br /&gt;
[[Category:API SuperRoot]][[Category:API Operator]][[Category:API Client]][[Category:API function]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>