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

One approval with its manifest

GET /api/v1/approvals/{number}

https://app.tanba-ooh.kz/api/v1/approvals/{number}

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

Scope read:approvals.

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

Ключ API в заголовке Authorization или сессия консоли.

Право доступа: read:approvals

Параметры

ИмяГдеТипОбязательныйОписаниеПример
numberпутьstringдаApproval number.TNB-2026-000123

Ответы

200 The approval.

application/json

Approval

ИмяТипОбязательныйОписаниеПример
numberstringдаНомер согласования."TNB-2026-000123"
valid_fromstring (date)даПервый день действия согласования."2026-10-01"
valid_untilstring (date)даПоследний день действия согласования."2026-12-31"
statusstringдаState of the approval. pending, active, expiring, expired, revoked
signed_atstring | nullдаWhen the approval was signed; null while it is pending."2026-10-06T14:05:39+05:00"
envstringдаEnvironment of the approval: test or prod."prod"
advertiser_namestringдаName of the advertiser."Example Advertising LLP"
media_namestringName of the approved media file."autumn-sale.mp4"
submission_idstring (uuid)даIdentifier of the submission the approval belongs to."6f1c0d3e-52a4-4b57-9a7e-0c3a1b9d2e44"
manifestobjectдаThe signed manifest as a JSON object.
revoked_atstring | nullWhen the approval was revoked; null if it was not."2026-10-09T10:30:00+05:00"
revoke_reasonstring | nullFree-text reason of the revocation; null if it was not revoked."The content differs from the approved file."
revoke_groundstring | nullCode of the legal ground of the revocation; null if it was not revoked."content_changed"
regulationobjectдаРегламент, по которому выдано согласование.

Пример

{
  "number": "TNB-2026-000123",
  "valid_from": "2026-10-01",
  "valid_until": "2026-12-31",
  "status": "pending",
  "signed_at": "2026-10-06T14:05:39+05:00",
  "env": "prod",
  "advertiser_name": "Example Advertising LLP",
  "media_name": "autumn-sale.mp4",
  "submission_id": "6f1c0d3e-52a4-4b57-9a7e-0c3a1b9d2e44",
  "manifest": {},
  "revoked_at": "2026-10-09T10:30:00+05:00",
  "revoke_reason": "The content differs from the approved file.",
  "revoke_ground": "content_changed",
  "regulation": {}
}

Ошибки

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

СтатусЗначение
401Нет действительной сессии или ключа API (unauthenticated, session_expired, invalid_api_key).
403Роль или право ключа этого не допускает (forbidden, key_scope_denied, key_route_denied).
404Ничего нет или вызывающему это не видно.
429Превышен предел частоты; см. Retry-After.
defaultОшибка в виде документа problem.

Примеры кода

curl

curl 'https://app.tanba-ooh.kz/api/v1/approvals/TNB-2026-000123' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests

response = requests.get(
    "https://app.tanba-ooh.kz/api/v1/approvals/TNB-2026-000123",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
)
print(response.status_code, response.text)
Go
package main

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

func main() {
	req, err := http.NewRequest("GET", "https://app.tanba-ooh.kz/api/v1/approvals/TNB-2026-000123", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	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))
}