Billing periods with totals
GET /api/v1/billing/periods
https://app.tanba-ooh.kz/api/v1/billing/periods
Технический текст справочника написан на английском.
Scope read:billing. Amounts are estimates, in tenge, without VAT unless stated.
Аутентификация
Ключ API в заголовке Authorization или сессия консоли.
Право доступа: read:billing
Ответы
200 Periods, newest first.
application/json
| Имя | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|
items | array of BillingPeriod | да | Periods, newest first. | |
items[].id | string (uuid) | да | Identifier of the billing period. | "0b1c3a52-6f0e-4c2e-9d3a-2f5d1e7a9c10" |
items[].org_id | string (uuid) | да | Identifier of the organisation billed. | "3a9d5e71-c4b2-4f08-b6d3-e8a1070c5f92" |
items[].org_name | string | Name of the organisation billed. | "Alma Outdoor LLP" | |
items[].period_start | string (date) | да | First day of the period. | "2026-09-01" |
items[].period_end | string (date) | да | Last day of the period. | "2026-09-30" |
items[].status | string | да | Whether the period is still accruing. open, closed | |
items[].closed_at | string | null | When the period was closed; null while it is open. | "2026-10-02T09:00:00+05:00" | |
items[].total_kzt | string | да | Total of the period in tenge, as a decimal string. | "1250000.00" |
items[].vat_kzt | string | да | VAT on the total in tenge, as a decimal string. | "150000.00" |
items[].statements | integer | Number of statements issued for the period. | 2 |
Пример
{
"items": [
{
"id": "0b1c3a52-6f0e-4c2e-9d3a-2f5d1e7a9c10",
"org_id": "3a9d5e71-c4b2-4f08-b6d3-e8a1070c5f92",
"org_name": "Alma Outdoor LLP",
"period_start": "2026-09-01",
"period_end": "2026-09-30",
"status": "open",
"closed_at": "2026-10-02T09:00:00+05:00",
"total_kzt": "1250000.00",
"vat_kzt": "150000.00",
"statements": 2
}
]
}
Ошибки
Ошибки приходят документом problem (application/problem+json) со стабильным полем code.
| Статус | Значение |
|---|---|
| 401 | Нет действительной сессии или ключа API (unauthenticated, session_expired, invalid_api_key). |
| 403 | Роль или право ключа этого не допускает (forbidden, key_scope_denied, key_route_denied). |
| default | Ошибка в виде документа problem. |
Примеры кода
curl
curl 'https://app.tanba-ooh.kz/api/v1/billing/periods' \
-H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests
response = requests.get(
"https://app.tanba-ooh.kz/api/v1/billing/periods",
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/periods", 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))
}