Money report - accrued, invoiced, paid and outstanding
GET /api/v1/billing/reports
https://app.tanba-ooh.kz/api/v1/billing/reports
Технический текст справочника написан на английском.
Scope read:billing. Own organisation; the authority and the platform see all. accrued_* columns are plays and approvals without VAT, split into estimates (open periods) and closed periods; invoiced, paid and outstanding are issued documents and bank payments with VAT where the issuer charges it, and paid + outstanding = invoiced. Estimates are never added to issued documents.
Аутентификация
Ключ API в заголовке Authorization или сессия консоли.
Право доступа: read:billing
Параметры
| Имя | Где | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|---|
from | запрос | string | нет | First month, YYYY-MM (default eleven months back). | 2025-11 |
to | запрос | string | нет | Last month, YYYY-MM (default the current month). | 2026-10 |
Ответы
200 The report sections.
application/json
| Имя | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|
from | string | да | First month of the report, YYYY-MM. | "2025-11" |
to | string | да | Last month of the report, YYYY-MM. | "2026-10" |
months | array of object | да | Accrued, invoiced and paid amounts for each month. | |
by_issuer | array of object | да | Amounts for each issuer of documents. | |
by_payer | array of object | да | Amounts for each payer. | |
top_payers | array of object | да | The payers with the largest amounts. | |
by_kind | array of object | да | Amounts for each kind of document. | |
by_district | array of object | да | Amounts for each district. | |
overdue | array of object | да | Documents past their due date. | |
ageing | array of object | да | Outstanding amounts by age. | |
cash_calendar | array of object | да | Expected payments by date. |
Пример
{
"from": "2025-11",
"to": "2026-10",
"months": [
{}
],
"by_issuer": [
{}
],
"by_payer": [
{}
],
"top_payers": [
{}
],
"by_kind": [
{}
],
"by_district": [
{}
],
"overdue": [
{}
],
"ageing": [
{}
],
"cash_calendar": [
{}
]
}
Ошибки
Ошибки приходят документом problem (application/problem+json) со стабильным полем code.
| Статус | Значение |
|---|---|
| 401 | Нет действительной сессии или ключа API (unauthenticated, session_expired, invalid_api_key). |
| 403 | Роль или право ключа этого не допускает (forbidden, key_scope_denied, key_route_denied). |
| 422 | Ошибки полей (validation_failed). |
| default | Ошибка в виде документа problem. |
Примеры кода
curl
curl 'https://app.tanba-ooh.kz/api/v1/billing/reports' \
-H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests
response = requests.get(
"https://app.tanba-ooh.kz/api/v1/billing/reports",
headers={
"Authorization": "Bearer YOUR_API_KEY",
},
)
print(response.status_code, response.text)
Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://app.tanba-ooh.kz/api/v1/billing/reports", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(data))
}