TAŇBA-OOH Developers

Play import

Operators that run their own CMS can report the plays it counted. The platform stores them next to the plays the players report and compares the two every night.

Before you start

Send a batch

curl -X POST 'https://app.tanba-ooh.kz/api/v1/plays/import' \
  -H 'Authorization: Bearer tnbk_EXAMPLE_secret' \
  -H 'Content-Type: text/csv' \
  --data-binary @plays.csv

The body is JSON ({"rows": [...]}) or CSV with a header row, UTF-8, comma or semicolon, at most 5 MB or 50 000 rows.

structure_code,approval_number,hour,plays,source_ref
ALM-0012,TNB-2026-000123,2026-10-06T14:00:00+05:00,118,cms-main
ALM-0012,TNB-2026-000123,2026-10-06T15:00:00+05:00,120,cms-main
ColumnMeaning
structure_code or structure_idThe structure; give one of them
approval_numberThe approval that was in force
hourA whole hour in ISO 8601. Without an offset it is read as Asia/Almaty time
playsHow many times the content played in that hour
source_refOptional name of your feed, up to 100 characters

Read the answer

Rows are judged one by one. The answer lists every row as accepted or refused, with a reason code for a refusal. Accepted rows are stored even when others in the batch are refused. Fix the refused rows and send only those again.

Sending a row again

A row is stored under (organisation, structure, approval, hour, source_ref). Sending it again replaces the earlier value and never adds to it. Rows with different source_ref values are separate and are added together when compared. Give one feed one source_ref and keep it.

What imported plays are

Imported plays are not evidence. They are kept apart from the plays the players report, they are never billed, and they never decide a compliance event. Each night the platform compares them with the reported plays. If the players reported and your import differs from them by more than 10 %, an import_mismatch event is opened for the structure. You can read the comparison in the operational report.

Reason codes

The full list is on the Play import reference page.