TAŇBA-OOH Developers

Advertiser product categories

GET /api/v1/categories

https://app.tanba-ooh.kz/api/v1/categories

Scope write:submissions. The IAB Tech Lab Ad Product Taxonomy 2.0, tiers 1 and 2, with names in English, Russian and Kazakh. Tier 1 entries have no parent; tier 2 entries name their tier 1 entry in parent_id. Use an id as category_id of a submission. The Kazakh names are pending a language review.

Authentication

API key in the Authorization header, or a console session.

Scope: write:submissions

Responses

200 Every category, ordered by id.

application/json

NameTypeRequiredDescriptionExample
itemsarray of CategoryyesThe categories, tier 1 first.
items[].idintegeryesThe taxonomy's own id.1004
items[].parent_idinteger | nullyesId of the tier 1 category; null for tier 1.1002
items[].tierintegeryesTaxonomy tier. 1, 2
items[].nameobjectyesName in English, Russian and Kazakh.
items[].name.enstringyesName in English."Beer"
items[].name.rustringyesName in Russian."Пиво"
items[].name.kkstringyesName in Kazakh."Сыра"

Example

{
  "items": [
    {
      "id": 1002,
      "parent_id": null,
      "tier": 1,
      "name": {
        "en": "Alcohol",
        "ru": "Алкоголь",
        "kk": "Алкоголь"
      }
    },
    {
      "id": 1004,
      "parent_id": 1002,
      "tier": 2,
      "name": {
        "en": "Beer",
        "ru": "Пиво",
        "kk": "Сыра"
      }
    }
  ]
}

Errors

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

StatusMeaning
401No valid session or API key (unauthenticated, session_expired, invalid_api_key).
403The role or the key's scope does not allow this (forbidden, key_scope_denied, key_route_denied).
defaultAn error as a problem document.

Code samples

curl

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

response = requests.get(
    "https://app.tanba-ooh.kz/api/v1/categories",
    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/categories", 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))
}