Один раунд случайных выездов инспекторов
GET /v1/spot-checks/{day}
https://verify.tanba-ooh.kz/v1/spot-checks/{day}
Технический текст справочника написан на английском.
Раунд рабочего дня Asia/Almaty (YYYY-MM-DD). Сразу после жеребьевки отдает только commitment, то есть SHA-256 от секрета, и место этого хэша в публичном реестре. Начиная с reveal_after отдает также секрет, список кандидатов с весами и выборку с окнами визита. Выборка это взвешенная жеребьевка без возвращения (ключ u^(1/w), u берется из первых 8 байт HMAC-SHA256(секрет, код конструкции)) первых day_size конструкций по убыванию ключа, окно визита в пределах часов работы тоже выводится из секрета. Проверка: SHA-256 секрета равен commitment, и жеребьевка по кандидатам дает те же коды в том же порядке. Фотографии и имена инспекторов не публикуются.
Аутентификация
Не требуется. Вызов открытый.
Параметры
| Имя | Где | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|---|
day | путь | string | да | Рабочий день раунда по Asia/Almaty. | 2026-10-15 |
Ответы
200 The round.
application/json
SpotRound
| Имя | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|
day | string (date) | да | The Asia/Almaty working day of the round. | "2026-10-15" |
commitment | string | да | Hex SHA-256 of the secret of the round. | "6f1ed002ab5595859014ebf0951522d9a1f6a7a9e8b6dbd2d4f1d43fb3ac4a43" |
revealed | boolean | да | True once the secret and the sample are public. | true |
reveal_after | string (date) | да | The first day on which the secret and the sample are public. | "2026-10-22" |
ledger | object | Where the seal sits in the public ledger. | ||
ledger.day | string (date) | да | The ledger day that holds the seal: the day the seal was made. | "2026-10-14" |
ledger.status | string | да | State of that ledger day's Bitcoin timestamp, as in the ledger days list. pending, pending_check, anchored | |
ledger.block_height | integer | Bitcoin block of the attestation, present only when anchored. | 905123 | |
ledger.digest | string | да | The ledger day's digest, the value that is timestamped. | "fb1877ee8cb63b394ddd8a47987bb9c384f5d8ca97353e2248df2ca663db6dd3" |
ledger.proof | object | да | Inclusion proof of the seal's leaf in that ledger day's tree. | |
ledger.proof.v | const | да | Version of the proof format. | 1 |
ledger.proof.day | string (date) | да | The Asia/Almaty day of the tree. | "2026-10-05" |
ledger.proof.leaf | oneOf | да | One entry of a ledger day. The kind says what the entry is about. | |
ledger.proof.leaf_sha256 | string | да | Hex SHA-256 of the leaf. | "3a6e9c0cc1490e884c3b4a9c6bfd39e19d928a0838407cd48b6317ebcc2ed825" |
ledger.proof.index | integer | да | Position of the leaf in the tree, counting from 0. | 3 |
ledger.proof.leaf_count | integer | да | Number of leaves in the tree. | 14 |
ledger.proof.path | array of object | да | Siblings from the leaf up to the root; a node is SHA-256(0x01, left, right). | |
ledger.proof.path[].side | string | да | Where the sibling sits. left, right | |
ledger.proof.path[].hash | string | да | Hex SHA-256 of the sibling node. | "e6e9ae1d34d7966232cd03927b9cf18c6d1e1c9532cde816ca929ed482e27326" |
ledger.proof.merkle_root | string | да | Hex SHA-256 root of the tree. | "53f8fe42a83fc01075e856d385cea164e06b7124d4c76b3a498e39de98d7168b" |
ledger.proof.anchor_sha256 | string | да | Hex SHA-256 of the anchor body of the day. | "e9f1bb3a2238f73741a8245a599da12c813c8c84ccee623aa5c68c71845db4c4" |
ledger.proof.digest | string | да | Hex SHA-256 of the anchor body hash followed by the Merkle root. | "44eeee2dfc054adad906be43d8d227a8052c19e5080b0ed64dc572fad9ee8f46" |
secret | string | Hex of the 32 secret bytes; present once revealed. | "5d0c2e4a9b7f3318a6c4e1f09d2b7a58c3e6f1049b8d27a5e0c3b6f9124d87ae" | |
weekly_size | integer | Structures to visit in the week of the round: 2 % of the active structures, at least 5; present once revealed. | 6 | |
day_size | integer | Structures drawn for this day, the weekly size spread over the five working days; present once revealed. | 1 | |
candidates | array of SpotCandidate | The structures that could be drawn, those already drawn earlier in the week left out; present once revealed. | ||
candidates[].code | string | да | Public code of the structure. | "ALM-0042" |
candidates[].weight | integer | да | Weight in the draw: 1, 2, 4 or 8 for the compliance band green, yellow, orange or red, doubled while the structure has an open high or critical event. | 1 |
selected | array of SpotSelected | The sample, by descending key, with the visit windows; present once revealed. | ||
selected[].code | string | да | Public code of the structure to visit. | "ALM-0042" |
selected[].from | string | да | Start of the visit window, Asia/Almaty time. | "2026-10-15T10:35:00+05:00" |
selected[].to | string | да | End of the visit window: one hour after the start. | "2026-10-15T11:35:00+05:00" |
Пример
{
"day": "2026-10-15",
"commitment": "6f1ed002ab5595859014ebf0951522d9a1f6a7a9e8b6dbd2d4f1d43fb3ac4a43",
"revealed": true,
"reveal_after": "2026-10-22",
"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"
}
},
"secret": "5d0c2e4a9b7f3318a6c4e1f09d2b7a58c3e6f1049b8d27a5e0c3b6f9124d87ae",
"weekly_size": 6,
"day_size": 1,
"candidates": [
{
"code": "ALM-0042",
"weight": 1
}
],
"selected": [
{
"code": "ALM-0042",
"from": "2026-10-15T10:35:00+05:00",
"to": "2026-10-15T11:35:00+05:00"
}
]
}
Ошибки
Ошибки приходят документом problem (application/problem+json) со стабильным полем code.
| Статус | Значение |
|---|---|
| 404 | Ничего нет или вызывающему это не видно. |
| 429 | Превышен предел частоты; см. Retry-After. |
Примеры кода
curl
curl 'https://verify.tanba-ooh.kz/v1/spot-checks/2026-10-15'
Python
import requests
response = requests.get(
"https://verify.tanba-ooh.kz/v1/spot-checks/2026-10-15",
)
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/spot-checks/2026-10-15", 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))
}