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

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

ИмяТипОбязательныйОписаниеПример
idstring (uuid)даId of the campaign."7a1f0c2e-5b6d-4e8f-9a0b-1c2d3e4f5a6b"
namestringдаName of the campaign, unique within the organisation."Autumn campaign"
external_refstringдаThe organisation's own reference, such as an order number; may be empty."PO-2026-17"
period_fromstring (date)даFirst day of the campaign."2026-10-01"
period_tostring (date)даLast day of the campaign."2026-10-31"
approvalsarray of stringдаNumbers of the approvals of the campaign.
created_atstringдаWhen the campaign was created, Almaty time."2026-10-01T09:00:00+05:00"
updated_atstringда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))
}