TAŇBA-OOH Разработчикам

One money report section as CSV

GET /api/v1/exports/billing-reports/{name}

https://app.tanba-ooh.kz/api/v1/exports/billing-reports/{name}

Технический текст справочника написан на английском.

Scope read:billing. Sections are months, issuers, payers, kinds, districts, overdue, ageing and cash-calendar.

Аутентификация

Ключ API в заголовке Authorization или сессия консоли.

Право доступа: read:billing

Параметры

ИмяГдеТипОбязательныйОписаниеПример
nameпутьstringдаSection of the money report to download. months, issuers, payers, kinds, districts, overdue, ageing, cash-calendarmonths
fromзапросstringнетFirst month, YYYY-MM.2025-11
toзапросstringнетLast month, YYYY-MM.2026-10
sepзапросstringнетColumn separator; semicolon for spreadsheets set to a comma decimal mark. comma, semicoloncomma

Ответы

200 CSV в UTF-8 с меткой порядка байтов и строкой заголовков.

text/csv

Пример

string

Ошибки

Ошибки приходят документом problem (application/problem+json) со стабильным полем code.

СтатусЗначение
401Нет действительной сессии или ключа API (unauthenticated, session_expired, invalid_api_key).
403Роль или право ключа этого не допускает (forbidden, key_scope_denied, key_route_denied).
404Ничего нет или вызывающему это не видно.
422Ошибки полей (validation_failed).
defaultОшибка в виде документа problem.

Примеры кода

curl

curl 'https://app.tanba-ooh.kz/api/v1/exports/billing-reports/months' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests

response = requests.get(
    "https://app.tanba-ooh.kz/api/v1/exports/billing-reports/months",
    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/exports/billing-reports/months", 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))
}