One delivery campaign
GET /api/v1/delivery/campaigns/{id}
https://app.tanba-ooh.kz/api/v1/delivery/campaigns/{id}
Технический текст справочника написан на английском.
Scope read:delivery. Only members of the organisation that owns the campaign can read it.
Аутентификация
Ключ API в заголовке Authorization или сессия консоли.
Право доступа: read:delivery
Параметры
| Имя | Где | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|---|
id | путь | string (uuid) | да | Id of the campaign. | 7a1f0c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b |
Ответы
200 The campaign.
application/json
DeliveryCampaign
| Имя | Тип | Обязательный | Описание | Пример |
|---|---|---|---|---|
id | string (uuid) | да | Id of the campaign. | "7a1f0c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b" |
name | string | да | Name of the campaign, unique within the organisation. | "Autumn campaign" |
external_ref | string | да | The organisation's own reference, such as an order number; may be empty. | "PO-2026-17" |
period_from | string (date) | да | First day of the campaign. | "2026-10-01" |
period_to | string (date) | да | Last day of the campaign. | "2026-10-31" |
approvals | array of string | да | Numbers of the approvals of the campaign. | |
created_at | string | да | When the campaign was created, Almaty time. | "2026-10-01T09:00:00+05:00" |
updated_at | string | да | When the campaign was last changed, Almaty time. | "2026-10-02T10:00:00+05:00" |
Пример
{
"id": "7a1f0c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b",
"name": "Autumn campaign",
"external_ref": "PO-2026-17",
"period_from": "2026-10-01",
"period_to": "2026-10-31",
"approvals": [
"TNB-2026-000123"
],
"created_at": "2026-10-01T09:00:00+05:00",
"updated_at": "2026-10-02T10:00:00+05:00"
}
Ошибки
Ошибки приходят документом problem (application/problem+json) со стабильным полем code.
| Статус | Значение |
|---|---|
| 401 | Нет действительной сессии или ключа API (unauthenticated, session_expired, invalid_api_key). |
| 403 | Роль или право ключа этого не допускает (forbidden, key_scope_denied, key_route_denied). |
| 404 | Ничего нет или вызывающему это не видно. |
| default | Ошибка в виде документа problem. |
Примеры кода
curl
curl 'https://app.tanba-ooh.kz/api/v1/delivery/campaigns/7a1f0c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b' \
-H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests
response = requests.get(
"https://app.tanba-ooh.kz/api/v1/delivery/campaigns/7a1f0c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b",
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/campaigns/7a1f0c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b", 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))
}