One delivery certificate, its document or its PDF
GET /api/v1/delivery/certificates/{id}
https://app.tanba-ooh.kz/api/v1/delivery/certificates/{id}
Анықтамалықтың техникалық мәтіні ағылшын тілінде жазылған.
Scope read:delivery. By default the certificate's data: digest, scope, period and ledger state. ?format=json returns the document itself, in the canonical form (RFC 8785) whose SHA-256 is the digest, byte for byte as issued. ?format=pdf returns the PDF; without lang it is the file issued, with lang the same document drawn in another language (kk, ru or en). A certificate carries no signature of its own; the public ledger records its digest on the day after issue, and https://verify.tanba-ooh.kz/r/{digest} confirms it.
Аутентификация
Authorization тақырыбындағы API кілті немесе консоль сеансы.
Рұқсат: read:delivery
Параметрлер
| Атауы | Орны | Түрі | Міндетті | Сипаттама | Мысал |
|---|---|---|---|---|---|
id | жол | string (uuid) | иә | Id of the certificate. | 9b2c3d4e-6f70-4812-a3b4-c5d6e7f80912 |
format | сұрау | string | жоқ | json for the canonical document, pdf for the PDF; omit for the data. json, pdf | pdf |
lang | сұрау | string | жоқ | Language of a PDF: kk, ru or en. kk, ru, en | ru |
Жауаптар
200 The certificate, its document or its PDF.
application/json
Мысал
{
"id": "9b2c3d4e-6f70-4812-a3b4-c5d6e7f80912",
"digest": "3f6c1b2a9d4e8f0a1b2c3d4e5f60718293a4b5c6d7e8f9012345678901234567",
"scope": {
"kind": "campaign",
"ref": "7a1f0c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b",
"name": "Autumn campaign",
"external_ref": "PO-2026-17"
},
"period_from": "2026-10-01",
"period_to": "2026-10-31",
"lang": "ru",
"signed": false,
"issued_at": "2026-11-01T09:30:00+05:00",
"pdf_sha256": "5b1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f901234567890a",
"verify_url": "https://verify.tanba-ooh.kz/r/3f6c1b2a9d4e8f0a1b2c3d4e5f60718293a4b5c6d7e8f9012345678901234567",
"ledger": {
"status": "pending",
"day": "2026-11-02",
"block_height": 905432
}
}
application/pdf
Қателер
Қателер problem құжаты (application/problem+json) түрінде, тұрақты code өрісімен келеді.
| Мәртебесі | Мағынасы |
|---|---|
| 401 | No valid session or API key (unauthenticated, session_expired, invalid_api_key). |
| 403 | The role or the key's scope does not allow this (forbidden, key_scope_denied, key_route_denied). |
| 404 | Nothing there, or not visible to the caller. |
| 422 | Field errors (validation_failed). |
| default | An error as a problem document. |
Код мысалдары
curl
curl 'https://app.tanba-ooh.kz/api/v1/delivery/certificates/9b2c3d4e-6f70-4812-a3b4-c5d6e7f80912' \
-H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests
response = requests.get(
"https://app.tanba-ooh.kz/api/v1/delivery/certificates/9b2c3d4e-6f70-4812-a3b4-c5d6e7f80912",
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/delivery/certificates/9b2c3d4e-6f70-4812-a3b4-c5d6e7f80912", 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))
}