<?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_getcallsbilling</id>
	<title>API getcallsbilling - 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_getcallsbilling"/>
	<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=API_getcallsbilling&amp;action=history"/>
	<updated>2026-11-07T02:17:30Z</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_getcallsbilling&amp;diff=1303&amp;oldid=prev</id>
		<title>Maintenance script: API docs regenerated from func=help (operator catalogue)</title>
		<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=API_getcallsbilling&amp;diff=1303&amp;oldid=prev"/>
		<updated>2026-11-05T13:47:32Z</updated>

		<summary type="html">&lt;p&gt;API docs regenerated from func=help (operator catalogue)&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 13:47, 5 November 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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;&#039;&#039;7Kas VoIP REST API function. Available to: &#039;&#039;&#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SuperRoot, &lt;/del&gt;Operator, Client&#039;&#039;&#039;.&#039;&#039;&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;&#039;&#039;7Kas VoIP REST API function. Available to: &#039;&#039;&#039;Operator, Client&#039;&#039;&#039;.&#039;&#039;&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;== Description ==&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;== Description ==&lt;/div&gt;&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-l48&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&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;----&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;----&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;Back to [[API VoIP]] · &#039;&#039;&#039;[[API Console|▶ Try it live]]&#039;&#039;&#039; · Profiles: &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[API profile SuperRoot]], &lt;/del&gt;[[API profile Operator]], [[API profile Client (of operator)]], [[API profile Client (direct)]]&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;Back to [[API VoIP]] · &#039;&#039;&#039;[[API Console|▶ Try it live]]&#039;&#039;&#039; · Profiles: [[API profile Operator]], [[API profile Client (of operator)]], [[API profile Client (direct)]]&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:API SuperRoot]]&lt;/del&gt;[[Category:API Operator]][[Category:API Client]][[Category:API function]]&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;[[Category:API Operator]][[Category:API Client]][[Category:API function]]&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_getcallsbilling&amp;diff=360&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_getcallsbilling&amp;diff=360&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;
Outgoing-call billing records for a period. model=voc (detailed calls, supports day/hour and server-side search) or toc (per-account totals). Role-based columns: clients see only their own account (accountcode forced) and their price; operators their scope + profit; SuperRoot everything incl. provider costs. SHM fast-path + PostgreSQL fallback.&lt;br /&gt;
&lt;br /&gt;
== Call ==&lt;br /&gt;
 GET  …/7Kas?func=getcallsbilling&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 (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;model&amp;lt;/code&amp;gt; || string || No || &amp;lt;code&amp;gt;voc&amp;lt;/code&amp;gt; || voc = detailed calls; toc = totals. &amp;lt;small&amp;gt;(valid: voc|toc (case-insensitive))&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;accountcode&amp;lt;/code&amp;gt; || string || No || — || Filter by account code (non-clients). Forced to own for clients. &amp;lt;small&amp;gt;(max 20)&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;day&amp;lt;/code&amp;gt; || integer || No || — || Filter by day (1-31). &amp;lt;small&amp;gt;(model=voc only)&amp;lt;/small&amp;gt;&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;(model=voc only, requires day)&amp;lt;/small&amp;gt;&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 up to 10000, PostgreSQL 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;
| &amp;lt;code&amp;gt;search&amp;lt;/code&amp;gt; || string || No || — || Server-side search pattern. &amp;lt;small&amp;gt;(max 40)&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;search_fields&amp;lt;/code&amp;gt; || string || No || — || Comma-separated fields (whitelist: dst, cid_num, cid_name, cli_billing, dial_cid_num, accountcode, prefix, dtype, context, tariff, fromuri). &amp;lt;small&amp;gt;(max 200)&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;search_mode&amp;lt;/code&amp;gt; || string || No || &amp;lt;code&amp;gt;contains&amp;lt;/code&amp;gt; || Match mode. &amp;lt;small&amp;gt;(prefix|suffix|contains|exact)&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Example ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;https://api.7kas.com:9080/7Kas?func=getcallsbilling&amp;amp;ukey=KEY&amp;amp;year=2026&amp;amp;month=7&amp;amp;model=voc&amp;amp;limit=100&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Response ==&lt;br /&gt;
FillRecords2JSON records (columns depend on role).&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>