Одна ежедневная печать полученной статистики показов
GET /v1/stats-seals/{day}
https://verify.tanba-ooh.kz/v1/stats-seals/{day}
Технический текст справочника написан на английском.
Печать пакетов статистики, полученных в один календарный день Asia/Almaty (YYYY-MM-DD): подписанное тело, подпись и место печати в публичном реестре. День запечатывается один раз, когда закончится, поэтому пакет, пришедший с опозданием, относится ко дню прихода. По умолчанию ответ это JSON; ?format=p7s возвращает саму подпись (PKCS#7 с вложенным телом). Проверка офлайн: tanba-verify seal FILE.json --ca root.pem. Поле ledger равно null, пока день реестра, содержащий печать, не получил свой дайджест.
Аутентификация
Не требуется. Вызов открытый.
Параметры
| Имя | Где | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|---|
day | путь | string | да | День получения по Asia/Almaty. | 2026-10-13 |
format | запрос | string | нет | p7s возвращает файл подписи вместо JSON. p7s | p7s |
Ответы
200 The seal.
application/json
StatsSeal
| Имя | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|
day | string (date) | да | The sealed Asia/Almaty receive day. | "2026-10-13" |
signed_at | string | да | When the seal was made, Asia/Almaty time. | "2026-10-14T00:31:07+05:00" |
body | object | да | The signed content of a seal, canonical JSON (RFC 8785). | |
body.v | const | да | Body version. | 1 |
body.env | string | да | The environment that made the seal. test, prod | |
body.day | string (date) | да | The sealed Asia/Almaty receive day. | "2026-10-13" |
body.batch_count | integer | да | Number of accepted statistics batches received on the day. | 4812 |
body.record_count | integer | да | Number of play records in those batches. | 96240 |
body.root | string | да | Hex Merkle root over the batch leaves, ordered by receive time then batch number. A leaf is the SHA-256 of the canonical JSON of the batch number, its owner, its sequence number, the SHA-256 of its body and its receive time (UTC, microseconds). Nodes are SHA-256(0x01, left, right), as in the public ledger. | "0f59838f53129a98e19ac704aa86cde6d83fc6cce9c56106370a60cbd6341fa3" |
body.prev_seal_sha256 | string | да | Hex SHA-256 of the previous seal's body; 64 zeros for the first seal. | "0000000000000000000000000000000000000000000000000000000000000000" |
signature | string | да | The CMS signature (PKCS#7, status key, body attached), base64. | "MIIGjwYJKoZIhvcNAQcCoIIGgDCCBnwCAQExDzANBglghkgBZQMEAgEFADA..." |
ledger | oneOf | да | Where the seal sits in the public ledger, or null until the ledger day that holds it has been digested. |
Пример
{
"day": "2026-10-13",
"signed_at": "2026-10-14T00:31:07+05:00",
"body": {
"v": 1,
"env": "prod",
"day": "2026-10-13",
"batch_count": 4812,
"record_count": 96240,
"root": "0f59838f53129a98e19ac704aa86cde6d83fc6cce9c56106370a60cbd6341fa3",
"prev_seal_sha256": "0000000000000000000000000000000000000000000000000000000000000000"
},
"signature": "MIIGjwYJKoZIhvcNAQcCoIIGgDCCBnwCAQExDzANBglghkgBZQMEAgEFADA...",
"ledger": {
"day": "2026-10-14",
"status": "pending",
"block_height": 905123,
"digest": "fb1877ee8cb63b394ddd8a47987bb9c384f5d8ca97353e2248df2ca663db6dd3",
"proof": {
"v": 1,
"day": "2026-10-05",
"leaf": {
"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"
},
"leaf_sha256": "3a6e9c0cc1490e884c3b4a9c6bfd39e19d928a0838407cd48b6317ebcc2ed825",
"index": 3,
"leaf_count": 14,
"path": [
{
"side": "left",
"hash": "e6e9ae1d34d7966232cd03927b9cf18c6d1e1c9532cde816ca929ed482e27326"
}
],
"merkle_root": "53f8fe42a83fc01075e856d385cea164e06b7124d4c76b3a498e39de98d7168b",
"anchor_sha256": "e9f1bb3a2238f73741a8245a599da12c813c8c84ccee623aa5c68c71845db4c4",
"digest": "44eeee2dfc054adad906be43d8d227a8052c19e5080b0ed64dc572fad9ee8f46"
}
}
}
application/pkcs7-signature
Ошибки
Ошибки приходят документом problem (application/problem+json) со стабильным полем code.
| Статус | Значение |
|---|---|
| 404 | Ничего нет или вызывающему это не видно. |
| 429 | Превышен предел частоты; см. Retry-After. |
Примеры кода
curl
curl 'https://verify.tanba-ooh.kz/v1/stats-seals/2026-10-13'
Python
import requests
response = requests.get(
"https://verify.tanba-ooh.kz/v1/stats-seals/2026-10-13",
)
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/stats-seals/2026-10-13", 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))
}