The audience multiplier of a quarter hour of a screen
GET /api/v1/market/multipliers
https://app.tanba-ooh.kz/api/v1/market/multipliers
Анықтамалықтың техникалық мәтіні ағылшын тілінде жазылған.
Scope read:inventory. Served only once the platform has switched the audience service on (it is off by default); until then 404. The multiplier is impacts divided by spots for the structure, the month, the ISO weekday and the quarter hour of at read in Almaty time, from the newest released release of an approved audience source. When the source has no row for that quarter hour the answer has no qty at all: there is no default value, and the placeholder audience estimate is never used. qty is the OpenRTB 2.6 object for imp.qty, with sourcetype 1 (measurement vendor) and vendor tanba-ooh.kz. Free for registered participants and the same for every one of them; a release is served to all from its release day.
Аутентификация
Authorization тақырыбындағы API кілті немесе консоль сеансы.
Рұқсат: read:inventory
Параметрлер
| Атауы | Орны | Түрі | Міндетті | Сипаттама | Мысал |
|---|---|---|---|---|---|
structure | сұрау | string | иә | Structure code. | ALM-0001 |
at | сұрау | string (date-time) | иә | The instant of the impression (RFC 3339). | 2027-03-10T10:07:00+05:00 |
Жауаптар
200 The slot, with `qty` when the source has a row for it.
application/json
MultiplierAnswer
| Атауы | Түрі | Міндетті | Сипаттама | Мысал |
|---|---|---|---|---|
structure | string | иә | Structure code. | "ALM-0001" |
at | string (date-time) | иә | The instant asked about, Almaty time. | "2027-03-10T10:07:00+05:00" |
slot | object | иә | The table cell the instant falls in. | |
slot.month | string | иә | Month in Almaty time. | "2027-03" |
slot.weekday | integer | иә | ISO weekday, 1 Monday. | 3 |
slot.quarter | integer | иә | Quarter hour of the day, 0 is 00:00-00:15. | 40 |
qty | object | OpenRTB 2.6 imp.qty; absent when no approved source has a row for the slot. | ||
qty.multiplier | number | иә | Impressions per spot in this quarter hour. | 6.003 |
qty.sourcetype | integer | иә | Measurement vendor. 1 | |
qty.vendor | string | иә | Vendor domain. tanba-ooh.kz | |
source | object | Who measured it; present with qty. | ||
source.vendor | string | иә | Name of the audience source. | "Example Mobility Ltd" |
source.release | string | иә | Label of the release. | "2027-A" |
Мысал
{
"structure": "ALM-0001",
"at": "2027-03-10T10:07:00+05:00",
"slot": {
"month": "2027-03",
"weekday": 3,
"quarter": 40
},
"qty": {
"multiplier": 6.003,
"sourcetype": 1,
"vendor": "tanba-ooh.kz"
},
"source": {
"vendor": "Example Mobility Ltd",
"release": "2027-A"
}
}
Қателер
Қателер 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/market/multipliers?structure=ALM-0001&at=2027-03-10T10%3A07%3A00%2B05%3A00' \
-H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests
response = requests.get(
"https://app.tanba-ooh.kz/api/v1/market/multipliers?structure=ALM-0001&at=2027-03-10T10%3A07%3A00%2B05%3A00",
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/market/multipliers?structure=ALM-0001&at=2027-03-10T10%3A07%3A00%2B05%3A00", 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))
}