TAŇBA-OOH Әзірлеушілерге

The inputs of one day's digest

GET /v1/ledger-days/{day}

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

Анықтамалықтың техникалық мәтіні ағылшын тілінде жазылған.

The signed audit anchor body of the day (exactly as signed, as a string), its SHA-256, and every leaf in tree order, with the Merkle root and the digest. Anyone can recompute the digest from it, offline, with tanba-verify ledger. The day is the Asia/Almaty calendar day, YYYY-MM-DD.

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

Қажет емес. Шақыру ашық.

Параметрлер

АтауыОрныТүріМіндеттіСипаттамаМысал
dayжолstringиәThe Asia/Almaty day, YYYY-MM-DD.2026-10-05

Жауаптар

200 The inputs file.

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 өрісімен келеді.

МәртебесіМағынасы
404Nothing there, or not visible to the caller.
429Rate limit; see 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))
}