TAŇBA-OOH Developers

Plays per structure and day as CSV

GET /api/v1/exports/stats.csv

https://app.tanba-ooh.kz/api/v1/exports/stats.csv

Scope read:stats. Days are Asia/Almaty days. plays, duration_ms and approvals come from the plays the players reported over the authenticated channel. imported_plays is the sum an operator reported from its own CMS for that structure and day (empty when nothing was imported), and reconciled_ratio is imported divided by reported over the reconciled approvals of that day (empty while the day is open or the players reported nothing). Imported plays are for comparison only; they are never billed.

Authentication

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

Scope: read:stats

Parameters

NameInTypeRequiredDescriptionExample
sepquerystringnoColumn separator; semicolon for spreadsheets set to a comma decimal mark. comma, semicoloncomma

Responses

200 UTF-8 CSV with a byte-order mark and a header row.

text/csv

Example

string

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/exports/stats.csv' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests

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