API getcallsbilling
Appearance
(Redirected from API CDR Salientes)
7Kas VoIP REST API function. Available to: SuperRoot, Operator, Client.
Description
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.
Call
GET …/7Kas?func=getcallsbilling&ukey=YOUR_KEY&…
Requires the ukey parameter.
Parameters
| Parameter | Type | Required | Default | Meaning |
|---|---|---|---|---|
year |
integer | Yes | — | Year (e.g. 2026). |
month |
integer | Yes | — | Month, 1-12. |
model |
string | No | voc |
toc (case-insensitive)) |
accountcode |
string | No | — | Filter by account code (non-clients). Forced to own for clients. (max 20) |
day |
integer | No | — | Filter by day (1-31). (model=voc only) |
hour |
integer | No | — | Filter by hour (0-23). (model=voc only, requires day) |
limit |
integer | No | 100 |
Max rows. SHM up to 10000, PostgreSQL up to 1000. |
offset |
integer | No | 0 |
Pagination offset. |
search |
string | No | — | Server-side search pattern. (max 40) |
search_fields |
string | No | — | Comma-separated fields (whitelist: dst, cid_num, cid_name, cli_billing, dial_cid_num, accountcode, prefix, dtype, context, tariff, fromuri). (max 200) |
search_mode |
string | No | contains |
suffix|contains|exact) |
Example
https://api.7kas.com:9080/7Kas?func=getcallsbilling&ukey=KEY&year=2026&month=7&model=voc&limit=100
Response
FillRecords2JSON records (columns depend on role).
Column visibility by profile
Pricing/cost columns depend on the caller's profile (GOD LAW):
- SuperRoot — provider cost + selling price + profit (VOC only).
- Operator — account price + root price + profit (VOC only).
- Client (direct, root=0) — only its own selling price (accountcode column).
- Client (of operator, root>0) — only its own selling price (root column).
Back to API VoIP · ▶ Try it live · Profiles: API profile SuperRoot, API profile Operator, API profile Client (of operator), API profile Client (direct)