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

Входные данные дайджеста одного дня

GET /v1/ledger-days/{day}

https://verify.tanba-ooh.kz/v1/ledger-days/{day}

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

Тело подписанного якоря аудита за день (ровно как подписано, строкой), его SHA-256 и каждый лист в порядке дерева, с корнем Меркла и дайджестом. Любой может пересчитать дайджест офлайн командой tanba-verify ledger. День это календарный день Asia/Almaty, YYYY-MM-DD.

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

Не требуется. Вызов открытый.

Параметры

ИмяГдеТипОбязательныйОписаниеПример
dayпутьstringдаДень Asia/Almaty, YYYY-MM-DD.2026-10-05

Ответы

200 Файл входных данных.

application/json

LedgerInputs

ИмяТипОбязательныйОписаниеПример
vintegerдаVersion of the file format: 2 when the day has a stats seal, 3 when it has a delivery certificate, a spot-check commitment or an inspection; a verifier refuses a version newer than it knows, so use the current tanba-verify. 1, 2, 3
daystring (date)даThe Asia/Almaty day of the digest."2026-10-05"
anchor_bodystringдаThe canonical anchor body, byte for byte as signed."{\"day\":\"2026-10-05\",\"env\":\"prod\",\"event_count\":854}"
anchor_sha256stringдаHex SHA-256 of the anchor body."e9f1bb3a2238f73741a8245a599da12c813c8c84ccee623aa5c68c71845db4c4"
merkle_rootstringдаHex SHA-256 root over the leaves."53f8fe42a83fc01075e856d385cea164e06b7124d4c76b3a498e39de98d7168b"
leaf_countintegerдаNumber of leaves.14
digeststringдаHex SHA-256 of the anchor body hash followed by the Merkle root."44eeee2dfc054adad906be43d8d227a8052c19e5080b0ed64dc572fad9ee8f46"
leavesarray of LedgerLeafдаEvery leaf of the day, in tree order.
leaves[].kindstringдаWhether the leaf records an issue or a revocation. issued, revoked
leaves[].approval_numberstringдаNumber of the approval."TNB-2026-000123"
leaves[].manifest_sha256stringдаHex SHA-256 of the signed manifest of the approval."878a9b0a8452700baaab5574e39716d67a93a07597baab30823639c69bf1e889"
leaves[].signed_atstringUTC, microseconds; for kind issued."2026-10-05T06:20:31.482913Z"
leaves[].revoked_atstringUTC, microseconds; for kind revoked."2026-10-05T09:02:44.100200Z"
leaves[].kindstringдаWhat the entry records, created on the day: a daily seal of the received play statistics (stats_seal), an issued delivery certificate (report_certificate), the commitment to the secret of a spot-check round (sample_commit), one inspection (inspection), or the digest of a published open data release (open_data). stats_seal, report_certificate, sample_commit, inspection, open_data
leaves[].subjectstringдаWhat the entry is about: stats: and the sealed day for a stats seal, report: and the digest for a delivery certificate, sample: and the day of the round for a commitment, inspection: and the inspection id for an inspection."stats:2026-10-01"
leaves[].sha256stringдаHex SHA-256 of the record: the signed body of a seal, the certificate's canonical document, the secret of a round, or the canonical record {id, photos, structure, time} of an inspection (photos are the sorted SHA-256 hashes of the stored photos, never the photos)."4da0c5898d0244f3cb44aae77747f33892b4436addd500c51d58b62caed61385"
leaves[].atstringдаUTC, microseconds; when the record was created."2026-10-02T00:31:00.000000Z"

Пример

{
  "v": 1,
  "day": "2026-10-05",
  "anchor_body": "{\"day\":\"2026-10-05\",\"env\":\"prod\",\"event_count\":854}",
  "anchor_sha256": "e9f1bb3a2238f73741a8245a599da12c813c8c84ccee623aa5c68c71845db4c4",
  "merkle_root": "53f8fe42a83fc01075e856d385cea164e06b7124d4c76b3a498e39de98d7168b",
  "leaf_count": 14,
  "digest": "44eeee2dfc054adad906be43d8d227a8052c19e5080b0ed64dc572fad9ee8f46",
  "leaves": [
    {
      "kind": "issued",
      "approval_number": "TNB-2026-000123",
      "manifest_sha256": "878a9b0a8452700baaab5574e39716d67a93a07597baab30823639c69bf1e889",
      "signed_at": "2026-10-05T06:20:31.482913Z",
      "revoked_at": "2026-10-05T09:02:44.100200Z"
    }
  ]
}

Ошибки

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

СтатусЗначение
404Ничего нет или вызывающему это не видно.
429Превышен предел частоты; см. Retry-After.

Примеры кода

curl

curl 'https://verify.tanba-ooh.kz/v1/ledger-days/2026-10-05'
Python
import requests

response = requests.get(
    "https://verify.tanba-ooh.kz/v1/ledger-days/2026-10-05",
)
print(response.status_code, response.text)
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, err := http.NewRequest("GET", "https://verify.tanba-ooh.kz/v1/ledger-days/2026-10-05", nil)
	if err != nil {
		panic(err)
	}
	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))
}