<?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_getincomingcalls</id>
	<title>API getincomingcalls - 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_getincomingcalls"/>
	<link rel="alternate" type="text/html" href="https://wiki.7kas.com/index.php?title=API_getincomingcalls&amp;action=history"/>
	<updated>2026-09-06T23:58:34Z</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_getincomingcalls&amp;diff=371&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_getincomingcalls&amp;diff=371&amp;oldid=prev"/>
		<updated>2026-07-21T22:33:35Z</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;
Incoming-call records for a period. model=vic (detail, supports day/hour) or tic (totals). Role-based columns: clients see only their own account (accountcodeid forced) and their selling price; operators their scope; SuperRoot everything incl. provider costs. SHM fast-path + PostgreSQL fallback. Server-side search on src/dst.&lt;br /&gt;
&lt;br /&gt;
== Call ==&lt;br /&gt;
 GET  …/7Kas?func=getincomingcalls&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;vic&amp;lt;/code&amp;gt; || vic = detail records; tic = totals. &amp;lt;small&amp;gt;(valid: vic|tic (case-insensitive))&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 (non-clients). Forced to own for clients.&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=vic 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=vic 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 to search (whitelist: src, dst). &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=getincomingcalls&amp;amp;ukey=KEY&amp;amp;year=2026&amp;amp;month=7&amp;amp;model=vic&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>