HTTP API
GET https://ads.solinn.uk/v1/ad
| Parameter | Required | Meaning |
|---|---|---|
app | yes | App key (or the sandbox key, with for=<app key>) |
moment | yes | launch, menu, pause, level_complete, game_over, idle or gameplay |
tier | no | free (default) or premium |
device | no | The platform's device or advertising ID. Stored only as a per-app HMAC. |
lat | no | 1 if the viewer limits ad tracking: the device key is then not stored |
session | no | A UUID created at app launch |
t | no | Seconds since launch |
last | no | The advert ID shown last |
has | no | Comma-separated app keys installed on the device |
v, model, os | no | App version, device model, OS version |
200 returns an advert:
{
"ad": {
"id": "ad_…", "surface": "bottom", "corner": "bottom_right",
"imageUrl": "https://ads.solinn.uk/i/….webp", "width": 1600, "height": 300,
"displaySeconds": 15, "skippableAfterSeconds": 5, "ctaLabel": "Press OK to get it",
"action": { "type": "qr", "qrUrl": "https://ads.solinn.uk/q/var_….png", "shortUrl": "https://go.solinn.uk/…?s=your-app-key" },
"impressionToken": "…"
},
"rotateAfterSeconds": 15
}action is { "type": "upgrade" } for upsells, or { "type": "store", "storeUrl", "storeId" } where the TV can open the store page. Other responses: 204 with X-Ad-Outcome and X-Ad-Reason (see reasons), 400 bad parameters, 404 unknown or inactive app, 429 over 20 requests a minute per device and app, 503 try again shortly.
POST https://ads.solinn.uk/v1/ad/events
{ "token": "<impressionToken>", "type": "impression" } // or complete, dismiss, ctaSend impression once the image is on screen, complete when the display time ends, dismiss on Back or skip, and cta on OK. Each type counts once per request. Tokens last one hour. Returns 204, or 400 for a bad or expired token. text/plain bodies are accepted, so navigator.sendBeacon works.
Admin API
Send Authorization: Bearer sk_live_… with a key from Settings › API keys. Every route works inside the key's workspace only; anything else is 404. Editor keys can change adverts and placements; admin keys can also manage apps.
| Route | Does |
|---|---|
| GET /v1/admin/apps | List apps |
| POST /v1/admin/apps | Register an app: { name, platform, storeUrl?, storeId?, kids? } |
| GET, PATCH /v1/admin/apps/{id} | Read or change an app; PATCH { settings } changes placements |
| GET /v1/admin/adverts?status=&kind=&app= | List adverts |
| POST /v1/admin/adverts | Create: JSON, or multipart with an advert JSON field plus creative, creative_strip, creative_tall |
| GET, PATCH /v1/admin/adverts/{id} | Read or change; PATCH { status: active | paused | archived } too |
| POST, DELETE /v1/admin/adverts/{id}/creatives/{wide|strip|tall} | Replace (multipart file) or remove an image |
Errors return { "error": { "code", "message", "fields"? } } with field-by-field messages for validation.