TAŇBA-OOH Developers

One round of random inspection visits

GET /v1/spot-checks/{day}

https://verify.tanba-ooh.kz/v1/spot-checks/{day}

The round of one Asia/Almaty working day (YYYY-MM-DD). Right after the draw it gives only commitment, the SHA-256 of the secret, and where that hash sits in the public ledger. From reveal_after it also gives the secret, the candidates with their weights and the sample with the visit windows. The sample is a weighted draw without replacement (key u^(1/w), u from the first 8 bytes of HMAC-SHA256(secret, structure code)) of the first day_size structures by descending key, and the visit window inside operating hours is also derived from the secret. To check: SHA-256 of the secret equals commitment, and the draw over the candidates gives the same codes in the same order. Photos and inspector names are not published.

Authentication

None. This call is public.

Parameters

NameInTypeRequiredDescriptionExample
daypathstringyesThe Asia/Almaty working day of the round.2026-10-15

Responses

200 The round.

application/json

SpotRound

NameTypeRequiredDescriptionExample
daystring (date)yesThe Asia/Almaty working day of the round."2026-10-15"
commitmentstringyesHex SHA-256 of the secret of the round."6f1ed002ab5595859014ebf0951522d9a1f6a7a9e8b6dbd2d4f1d43fb3ac4a43"
revealedbooleanyesTrue once the secret and the sample are public.true
reveal_afterstring (date)yesThe first day on which the secret and the sample are public."2026-10-22"
ledgerobjectWhere the seal sits in the public ledger.
ledger.daystring (date)yesThe ledger day that holds the seal: the day the seal was made."2026-10-14"
ledger.statusstringyesState of that ledger day's Bitcoin timestamp, as in the ledger days list. pending, pending_check, anchored
ledger.block_heightintegerBitcoin block of the attestation, present only when anchored.905123
ledger.digeststringyesThe ledger day's digest, the value that is timestamped."fb1877ee8cb63b394ddd8a47987bb9c384f5d8ca97353e2248df2ca663db6dd3"
ledger.proofobjectyesInclusion proof of the seal's leaf in that ledger day's tree.
ledger.proof.vconstyesVersion of the proof format.1
ledger.proof.daystring (date)yesThe Asia/Almaty day of the tree."2026-10-05"
ledger.proof.leafoneOfyesOne entry of a ledger day. The kind says what the entry is about.
ledger.proof.leaf_sha256stringyesHex SHA-256 of the leaf."3a6e9c0cc1490e884c3b4a9c6bfd39e19d928a0838407cd48b6317ebcc2ed825"
ledger.proof.indexintegeryesPosition of the leaf in the tree, counting from 0.3
ledger.proof.leaf_countintegeryesNumber of leaves in the tree.14
ledger.proof.patharray of objectyesSiblings from the leaf up to the root; a node is SHA-256(0x01, left, right).
ledger.proof.path[].sidestringyesWhere the sibling sits. left, right
ledger.proof.path[].hashstringyesHex SHA-256 of the sibling node."e6e9ae1d34d7966232cd03927b9cf18c6d1e1c9532cde816ca929ed482e27326"
ledger.proof.merkle_rootstringyesHex SHA-256 root of the tree."53f8fe42a83fc01075e856d385cea164e06b7124d4c76b3a498e39de98d7168b"
ledger.proof.anchor_sha256stringyesHex SHA-256 of the anchor body of the day."e9f1bb3a2238f73741a8245a599da12c813c8c84ccee623aa5c68c71845db4c4"
ledger.proof.digeststringyesHex SHA-256 of the anchor body hash followed by the Merkle root."44eeee2dfc054adad906be43d8d227a8052c19e5080b0ed64dc572fad9ee8f46"
secretstringHex of the 32 secret bytes; present once revealed."5d0c2e4a9b7f3318a6c4e1f09d2b7a58c3e6f1049b8d27a5e0c3b6f9124d87ae"
weekly_sizeintegerStructures to visit in the week of the round: 2 % of the active structures, at least 5; present once revealed.6
day_sizeintegerStructures drawn for this day, the weekly size spread over the five working days; present once revealed.1
candidatesarray of SpotCandidateThe structures that could be drawn, those already drawn earlier in the week left out; present once revealed.
candidates[].codestringyesPublic code of the structure."ALM-0042"
candidates[].weightintegeryesWeight 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
selectedarray of SpotSelectedThe sample, by descending key, with the visit windows; present once revealed.
selected[].codestringyesPublic code of the structure to visit."ALM-0042"
selected[].fromstringyesStart of the visit window, Asia/Almaty time."2026-10-15T10:35:00+05:00"
selected[].tostringyesEnd of the visit window: one hour after the start."2026-10-15T11:35:00+05:00"

Example

{
  "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"
    }
  ]
}

Errors

Errors are problem documents (application/problem+json) with a stable code.

StatusMeaning
404Nothing there, or not visible to the caller.
429Rate limit; see Retry-After.

Code samples

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))
}