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
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
items | array of Category | yes | The categories, tier 1 first. | |
items[].id | integer | yes | The taxonomy's own id. | 1004 |
items[].parent_id | integer | null | yes | Id of the tier 1 category; null for tier 1. | 1002 |
items[].tier | integer | yes | Taxonomy tier. 1, 2 | |
items[].name | object | yes | Name in English, Russian and Kazakh. | |
items[].name.en | string | yes | Name in English. | "Beer" |
items[].name.ru | string | yes | Name in Russian. | "Пиво" |
items[].name.kk | string | yes | Name 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.
| Status | Meaning |
|---|---|
| 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). |
| default | An 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))
}