Menu
Demand API
Discover directly connected screens and partner inventory, bid on issued opportunities, or review and buy a native advertiser campaign. Read delivery from the same reporting system.
DSP opportunity journey
Link your platform key to a DSP seat, obtain issued opportunities and submit an OpenRTB response. For a planned advertiser campaign, follow the buying journey below.
1. Link the DSP seat
Use your existing platform key. Onboarding links it to the seat without issuing a second secret. New seats start in sandbox; sandbox admission does not enter live selection.
curl --fail-with-body -sS https://api.trillboards.com/openrtb/v2/onboard \
-H "Authorization: Bearer $TRILLBOARDS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"company_name":"Your Company","seat_id":"your_company","contact_email":"developer@your-company.example"}'2. Read issued opportunities
curl --fail-with-body -sS \
"https://api.trillboards.com/openrtb/v2/adslots?format=openrtb&source=owned&limit=20" \
-H "Authorization: Bearer $TRILLBOARDS_API_KEY"Build the response from the exact issued request and impression IDs, currency and floor. A catalogue row or capacity forecast does not reserve inventory.
3. Submit the response
curl -sS -D bid-response.headers https://api.trillboards.com/openrtb/v2/bid \
-H "Authorization: Bearer $TRILLBOARDS_API_KEY" \
-H "Content-Type: application/json" -d @bid-response.jsonA 200 admits a candidate; 204 is a normal no-bid outcome. Admission is separate from one-use live selection and billable completion. Follow the exact callback and delivery contract.
Continue with the DSP integration guide.
Advertiser buying journey
Use an advertiser OAuth token for https://api.trillboards.com/openrtb/v2/buying. Search and preview, save the campaign, attach artwork, prepare the exact total and open checkout. Read the verified payment and each line’s fulfillment state before treating the campaign as live.
An established direct player, API or validated adserver connection is owned and operated, including a screen owned by another publisher. Registration or an unused tag alone does not establish connection. Catalogue source, connection class and current readiness remain distinct.
The buyer guide includes stable action keys and maintained curl examples. The JavaScript example calls the official advertiser SDK. Use the supplier journey to connect inventory and the Data, market and supply-chain guide for the surrounding interfaces.
Why Trillboards
Audience intelligence
Read measured audience signals where available, with the response’s coverage and freshness.
Proof-of-play
Read canonical completed plays with signed, event-confirmed or partner-reported verification tiers.
Native creative review
Upload artwork into the existing asset and moderation flow, then read its actual review status.
Full reporting pipeline
Per-screen breakdown, time-series trends, fill rate, and CPM analytics via API.
Authentication
DSP routes use the platform key linked to the DSP seat. Advertiser buying uses a distinct advertiser OAuth grant for its exact resource. Public documentation, unsaved buyer preview and buyer inventory search can be read without a credential; a supplied credential is validated. Include the DSP key as a header:
# Option 1: x-api-key header
curl -H "x-api-key: tb_dsp_YOUR_KEY" ...
# Option 2: Bearer token
curl -H "Authorization: Bearer tb_dsp_YOUR_KEY" ...Each API key is issued with a set of scopes(e.g. bid:write, inventory:read, campaigns:write). Routes that require a scope you do not hold return 403 missing_scope with required_scope and granted_scopes in the response, see the endpoint table below for the scope each route requires.
New DSPs start in sandbox mode (100 req/min). Sandbox bids are validated but don't enter the live auction. Sandbox keys pass all scope checks (you can integrate against the full surface immediately). Contact support@trillboards.com to upgrade to production (1,000 req/min).
API Endpoints
DSP control routes and advertiser buying operations are listed below. Scope names apply to the credential for that group. The served OpenAPI contract defines each operation’s current request, response and security requirements; the full Demand reference also includes programmatic interfaces.
Onboarding
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| POST | /openrtb/v2/onboard | None | Link an existing platform key to a DSP seat, or register through the supported onboarding flow. |
Real-time bidding
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| POST | /openrtb/v2/bid | bid:write | Submit OpenRTB 2.6 bid response (cached for waterfall injection). |
| GET | /openrtb/v2/stats | stats:read | 24h performance metrics: bids, wins, CPM, fill, latency. |
Inventory discovery
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| GET | /openrtb/v2/adslots | inventory:read | Browse screens with live FEIN signals (face count, attention, emotion, VAS). |
| POST | /openrtb/v2/forecast | inventory:read | Estimate delivery for a budget + targeting tuple. |
| POST | /openrtb/v2/discover | inventory:read | Search canonical inventory by query, geography, source and connection class. |
| GET | /openrtb/v2/screens/:id | inventory:read | Full screen profile (venue, hours, audience composition, recent CPM). |
| POST | /openrtb/v2/screens/availability | inventory:read | Bulk capacity check for a screen set. |
| POST | /openrtb/v2/screens/audience | inventory:read | Bulk audience profiles for a screen set. |
Creatives (AI moderation pipeline)
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| POST | /openrtb/v2/creatives | campaigns:write | Upload creative by URL or get a presigned upload URL for native review. |
| GET | /openrtb/v2/creatives | campaigns:write | List your creatives with moderation status. |
| GET | /openrtb/v2/creatives/:id | campaigns:write | Creative detail: IAB classification, content flags, age rating, brand recognition. |
| POST | /openrtb/v2/creatives/:id/confirm | campaigns:write | Confirm presigned upload completed. Triggers AI moderation. |
DSP campaign compatibility
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| POST | /openrtb/v2/campaigns | campaigns:write | Create a campaign (approved creative + targeting). |
| POST | /openrtb/v2/campaigns/assign | campaigns:write | Legacy assignment returns its native buying recovery route; use advertiser review and checkout. |
Advertiser buying (advertiser OAuth)
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| POST | /openrtb/v2/buying/inventory/search | None | Search screen and provider catalogues; source and connection class are independent. |
| POST | /openrtb/v2/buying/plans/preview | None | Preview without reserving inventory or charging the advertiser. |
| POST | /openrtb/v2/buying/campaigns | campaigns:write | Save the native campaign and selections. |
| POST | /openrtb/v2/buying/campaigns/:advertisementId/creative | campaigns:write | Import artwork into native review; replacements can return 202. |
| POST | /openrtb/v2/buying/campaigns/:advertisementId/prepare | campaigns:read | Read the exact total, currency, selection and readiness. |
| POST | /openrtb/v2/buying/campaigns/:advertisementId/checkout | checkout:write | Create checkout for the reviewed selection; native payment verification follows. |
| GET | /openrtb/v2/buying/campaigns/:advertisementId | campaigns:read | Read campaign, creative and per-line fulfillment progress. |
| GET | /openrtb/v2/buying/campaigns/:advertisementId/delivery | campaigns:read | Read measurement, reconciliation, pacing and screen performance. |
| POST | /openrtb/v2/buying/campaigns/:advertisementId/rebook | campaigns:read campaigns:write | Create a new unpaid campaign with fresh dates and pricing. |
| POST | /openrtb/v2/buying/campaigns/:advertisementId/stop | campaigns:write | Stop original lines and return any partial or pending outcome. |
| POST | /openrtb/v2/buying/campaigns/:advertisementId/flight | campaigns:write | Amend supported original flights; report applied and pending results. |
| PATCH | /openrtb/v2/buying/campaigns/:advertisementId | campaigns:write | Update name, description or landing page. |
Deals (PMP / preferred / guaranteed)
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| GET | /openrtb/v2/deals | deals:read | List deals offered to your seat. |
| GET | /openrtb/v2/deals/:dealId | deals:read | Deal details, floor, caps, dates. |
| POST | /openrtb/v2/deals/propose | campaigns:write | Propose a PMP deal (admin approval required). |
Market insights
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| GET | /openrtb/v2/market/cpm-benchmarks | stats:read | Percentile CPM benchmarks by venue type / geography. |
| GET | /openrtb/v2/market/demand-analysis | stats:read | Demand-side insights, competitive pressure, win-rate context. |
Proof-of-play + reporting
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| GET | /openrtb/v2/proof-of-play | proof:read | Canonical completed plays with each record’s actual verification tier. |
| GET | /openrtb/v2/analytics/funnel | reports:read | Issued prebid opportunities and linked responses, selected starts and completions; read coverage. |
| GET | /openrtb/v2/reports/summary | reports:read | Aggregated impressions, CPM, fill rate. |
| GET | /openrtb/v2/reports/screens | reports:read | Per-screen performance breakdown. |
| GET | /openrtb/v2/reports/timeseries | reports:read | Hourly or daily impression + CPM trends. |
Webhooks
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| POST | /openrtb/v2/webhooks | campaigns:write | Register a webhook URL. |
| GET | /openrtb/v2/webhooks | campaigns:write | List your registered webhooks. |
| GET | /openrtb/v2/webhooks/deliveries | campaigns:write | Delivery log (last 7 days) for debugging. |
| DELETE | /openrtb/v2/webhooks/:id | campaigns:write | Remove a webhook subscription. |
Discovery
| Method | Endpoint | Scope | Description |
|---|---|---|---|
| GET | /openrtb/v2/openapi.json | None | Machine-readable OpenAPI 3.0 spec (cached 5 min). Always discoverable, no auth required. |
AMP / Apparatix-style inventory ingestion
Some buyers (Apparatix-style product catalogs, AMP partners, agency tooling) ingest DOOH inventory once an hour by cron-polling /adslots and upserting screens into their own product table. The mapping below shows how the Trillboards response maps to that schema.
Field mapping
| Trillboards field | Your product field | Notes |
|---|---|---|
| screen_id | external_id | Stable identifier; safe upsert key. |
| name | product_name | Human-readable screen name. |
| address | location | Postal address. |
| venue_type | product_type | retail / restaurant / gym / transit / office / etc. |
| slot_duration_seconds | ad_duration | Default 15s; varies per screen. |
| floor_price_cpm | rate_card | USD floor CPM for this screen. |
| vendor (constant) | vendor | Hard-coded to "Trillboards". |
Hourly cron, bash
# Every hour at minute 5
5 * * * * curl -s -H "x-api-key: $TRILLBOARDS_API_KEY" \
"https://api.trillboards.com/openrtb/v2/adslots" \
> /var/lib/your-product/trillboards-adslots.jsonNode.js, hourly ingestion job
// Pulls /adslots and upserts into a Mongo `products` collection.
// Drop into a cron job, or schedule via your favorite job runner.
const fetch = require('node-fetch');
const { MongoClient } = require('mongodb');
const API_KEY = process.env.TRILLBOARDS_API_KEY;
const MONGO_URL = process.env.MONGO_URL;
async function ingest() {
const res = await fetch(
'https://api.trillboards.com/openrtb/v2/adslots',
{ headers: { 'x-api-key': API_KEY } }
);
if (!res.ok) throw new Error(`adslots ${res.status}`);
const body = await res.json();
const screens = body?.data?.screens ?? [];
const client = await MongoClient.connect(MONGO_URL);
const products = client.db().collection('products');
for (const s of screens) {
await products.updateOne(
{ external_id: s.screen_id },
{
$set: {
external_id: s.screen_id,
product_name: s.name,
location: s.address,
product_type: s.venue_type,
ad_duration: s.slot_duration_seconds ?? 15,
rate_card: s.floor_price_cpm,
vendor: 'Trillboards',
updated_at: new Date(),
},
},
{ upsert: true }
);
}
await client.close();
console.log(`upserted ${screens.length} screens`);
}
ingest().catch((e) => { console.error(e); process.exit(1); });Python, hourly ingestion job
# Drop into your scheduler (Airflow, cron, Prefect, etc.).
import os
import requests
from pymongo import MongoClient, UpdateOne
from datetime import datetime, timezone
API_KEY = os.environ['TRILLBOARDS_API_KEY']
MONGO_URL = os.environ['MONGO_URL']
def ingest():
resp = requests.get(
'https://api.trillboards.com/openrtb/v2/adslots',
headers={'x-api-key': API_KEY},
timeout=30,
)
resp.raise_for_status()
screens = resp.json().get('data', {}).get('screens', [])
client = MongoClient(MONGO_URL)
products = client.get_default_database()['products']
ops = []
for s in screens:
ops.append(UpdateOne(
{'external_id': s['screen_id']},
{'$set': {
'external_id': s['screen_id'],
'product_name': s['name'],
'location': s.get('address'),
'product_type': s.get('venue_type'),
'ad_duration': s.get('slot_duration_seconds', 15),
'rate_card': s.get('floor_price_cpm'),
'vendor': 'Trillboards',
'updated_at': datetime.now(timezone.utc),
}},
upsert=True,
))
if ops:
products.bulk_write(ops, ordered=False)
client.close()
print(f'upserted {len(ops)} screens')
if __name__ == '__main__':
ingest()Delta-sync via ?since=<ISO8601> / ?cursor=<token> is rolling out, when available, your job can request only screens updated since the last sync timestamp. Until then, full re-fetch each tick is the supported pattern (the response is gzipped and caches well for hourly polls).
Error Catalog
Every 4xx and 5xx response across /openrtb/v2/*uses one envelope. The error_code field is the machine-parseable contract; error is a human-readable string; request_id correlates to our logs (include it in support emails).
{
"success": false,
"error": "<human-readable string>",
"error_code": "<snake_case_code>",
"request_id": "req_<uuid>",
// ...optional extras: param, retry_after_seconds,
// required_scope, granted_scopes, nbr (bid only)
}Retry guidance: 4xx are client errors. Fix the payload, do not retry the same call. 429 is rate-limit. Sleep for retry_after_seconds (or honor the Retry-After header) and retry. 5xx is server-side. Use exponential backoff (1s, 2s, 4s, 8s, max 60s) up to 5 attempts, then surface the request_id in a support ticket.
Authentication / authorization
| error_code | HTTP | Retry | Meaning |
|---|---|---|---|
| authentication_required | 401 | never | API key missing or DSP context not populated. |
| not_authorized | 403 | never | API key resolved but does not own the requested resource. |
| missing_scope | 403 | never | Key lacks the scope required by this route. extras.required_scope names the missing scope; extras.granted_scopes lists what the key has. |
Validation (fix the payload, do not retry)
| error_code | HTTP | Retry | Meaning |
|---|---|---|---|
| missing_required_field | 400 | never | extras.param names the missing field. |
| missing_name | 400 | never | Creative / campaign upload missing the name field. |
| missing_content_type | 400 | never | Creative upload missing content_type. |
| missing_creative_id | 400 | never | Campaign / assignment missing creative_id. |
| missing_floor_cpm | 400 | never | Deal proposal missing floor_cpm. |
| invalid_eligible_screens | 400 | never | Deal proposal sent an empty eligible_screens. Send null (every screen) or a non-empty list of screen ids. |
| missing_screen_ids | 400 | never | Assignment missing the screen_ids[] array. |
| missing_asset_url | 400 | never | Creative upload missing asset_url or creative_url. |
| missing_deal_id | 400 | never | Deal lookup missing deal_id. |
| invalid_email | 400 | never | contact_email failed format check on onboarding. |
| invalid_seat_id | 400 | never | seat_id must match ^[a-z0-9_]+$ and be 3-40 chars. |
| invalid_screen | 400 | never | screen_id does not resolve to a known Trillboards screen. |
| invalid_budget | 400 | never | Campaign budget out of allowed range or wrong type. |
| invalid_date | 400 | never | Date param is not ISO-8601 or violates start < end. |
| invalid_webhook_url | 400 | never | Webhook endpoint must be https:// and not localhost / private RFC1918. |
| invalid_verification_tier | 400 | never | Requested verification tier not enabled for this seat. |
| invalid_bid_response | 400 | never | Bid payload failed OpenRTB 2.6 schema validation. extras.nbr carries the no-bid reason code. |
| invalid_events | 400 | never | Webhook subscribe listed events outside the allowlist. |
Resource state
| error_code | HTTP | Retry | Meaning |
|---|---|---|---|
| seat_id_already_registered | 409 | never | Onboarding with a seat_id that already exists. Reuse the existing key (or pick a different seat_id). |
| already_exists | 409 | never | Generic conflict on a unique-key insert. |
| deal_already_exists | 409 | never | POST /deals/propose against an existing deal_id. |
| not_found | 404 | never | Resource id not resolvable to anything the seat owns. |
| creative_not_found | 404 | never | creative_id does not exist or is not owned by this seat. |
| screen_not_found | 404 | never | screen_id does not exist. |
| deal_not_found | 404 | never | deal_id does not exist. |
| webhook_not_found | 404 | never | webhook_id does not exist or is not owned by this seat. |
Throttling
| error_code | HTTP | Retry | Meaning |
|---|---|---|---|
| rate_limited | 429 | after retry_after_seconds | Rate limit exceeded. extras.retry_after_seconds carries the cooldown; the Retry-After HTTP header is also set. |
Server
| error_code | HTTP | Retry | Meaning |
|---|---|---|---|
| api_key_provisioning_failed | 500 | exponential backoff | Onboard succeeded at the DB layer but the key minting step failed. Re-call onboard. |
| internal_error | 500 | exponential backoff | Caught uncaught exception. Retry once; if persistent, email developers@trillboards.com with the request_id. |
| unspecified_error | 500 | exponential backoff | Reserved fallback. Treat as internal_error. |
FEIN Audience Signals
Trillboards screens run edge AI (FEIN) that provides real-time audience data for planning and measurement across the screen network. These signals are included in the /adslots response under ext.trb.fein.
| Signal | Type | Freshness |
|---|---|---|
| live_face_count | integer | 10s (edge) |
| attention_score | 0-1 | 10s (edge) |
| dominant_emotion | string | 10s (edge) |
| vas_7d | number | Hourly |
| crowd_density | integer | 10s (edge) |
| purchase_intent | string | Per-utterance (speech) |
| income_level | enum | Per ad opportunity (cloud) |
| ad_receptivity | 0-1 | Per ad opportunity (cloud) |
Rate Limits
Per-seat in production; per-IP for unauthenticated /onboard. 429 responses carry retry_after_seconds and a Retry-After header.
| Group | Routes | Sandbox | Production |
|---|---|---|---|
| Bidding | /bid | 100/min | 1,000/min |
| Inventory | /adslots, /screens/*, /discover, /forecast, /proof-of-play | 100/min | 200/min |
| Campaigns | /creatives, /campaigns, /campaigns/assign, /webhooks | 100/min | 100/min |
| Onboarding | /onboard (per IP) | 5/hr | 5/hr |
DSP rate limits are shown above. Advertiser buying uses authenticated account buckets: 200 reads/min and 100 writes/min, shared across token refresh. Follow returned retry headers. DSP rate limit headers include: RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset.
Need help integrating? Contact developers@trillboards.com