Trillboards Campaign Attribution API

Campaign-level attribution summaries, timeseries, heatmaps, and journey funnels

GitHub OpenAPI

Operations 4

GET /v1/advertiser/attribution/campaign/{campaignId} Campaign attribution summary #
GET /v1/advertiser/attribution/campaign/{campaignId}/timeseries Daily attribution timeseries #
GET /v1/advertiser/attribution/campaign/{campaignId}/heatmap Geospatial exposure heatmap #
GET /v1/advertiser/attribution/campaign/{campaignId}/journey Attribution journey funnel #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trillboards-com:trillboards-com-campaign-attribution-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

trillboards-com-campaign-attribution-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Trillboards Attribution & Measurement Campaign Attribution…
  version: 1.0.0
  description: 'Closed-loop DOOH attribution engine with attention-verified impressions,

    cross-channel multi-touch attribution, Bayesian incrementality measurement,

    and creative performance optimization.


    ## Why This Matters


    Traditional DOOH attribution estimates impressions using population data.

    Trillboards MEASURES them: on-device computer vision (ML Kit) counts faces

    and tracks gaze, audio classification (YAMNet TFLite) detects ambient context,

    and third-party mobile location signals (Intuizi) prove store visits.

    Every metric in this API is deterministic, not probabilistic.


    ## Authentication


    All endpoints require a valid JWT token in the Authorization header:

    ```

    Authorization: Bearer

    ```

    Tokens are obtained via `POST /v1/user/login`.


    ## Key Concepts


    - **aCPM (Attention CPM)**: Cost per 1,000 attention-verified impressions. Unlike standard CPM, aCPM only counts impressions where someone was actually looking at the screen.

    - **Incremental Lift**: The percentage increase in store visits attributable to the DOOH campaign, measured via geo-holdout experiments with matched control groups.

    - **CPIV (Cost Per Incremental Visit)**: Total media cost divided by the number of store visits that would NOT have happened without the campaign.

    - **Weighted Confidence**: Exposure match confidence (spatial/temporal) multiplied by attention weight from FEIN edge AI. Higher = more certain the person both saw AND paid attention to the ad.

    - **Attribution Chain**: A complete user journey across channels (billboard -> mobile ad -> web visit -> store visit) with credit allocation via multi-touch models.


    ## Attribution Pipeline (6 Layers)


    1. **Signal Ingestion** — Intuizi mobile device location pings + POI reference data

    2. **Exposure Matching** — PostGIS ST_DWithin joins device signals with ad plays

    3. **Attention Enrichment** — FEIN edge AI inference (face count, gaze, emotion) attached to each exposure

    4. **Identity Resolution** — Household clustering, cross-device graph, pixel visitor linking

    5. **Attribution** — Multi-touch credit allocation across DOOH + mobile + web + store channels

    6. **Measurement** — Bayesian + frequentist incrementality with geo-holdout experiments'
  contact:
    name: Trillboards Developer Support
    email: developers@trillboards.com
    url: https://trillboards.com/developers
  license:
    name: Proprietary
    url: https://trillboards.com/terms-of-service
servers:
- url: https://api.trillboards.com
  description: Production API
- url: http://localhost:4004
  description: Local development
tags:
- name: Campaign Attribution
  description: Campaign-level attribution summaries, timeseries, heatmaps, and journey funnels
paths:
  /v1/advertiser/attribution/campaign/{campaignId}:
    get:
      operationId: getCampaignSummary
      summary: Campaign attribution summary
      description: 'Returns comprehensive attribution metrics for a campaign including reach,

        exposures, footfall visits, incremental lift, cost per visit, and statistical

        significance. This is the single endpoint that proves DOOH campaign ROI.


        The response includes both raw metrics and quality indicators (match confidence,

        control group size, significance level) so advertisers can assess data reliability.'
      tags:
      - Campaign Attribution
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/campaignId'
      responses:
        '200':
          description: Attribution summary for the campaign
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/AttributionSummary'
              example:
                success: true
                data:
                  campaign_id: camp_abc123
                  advertiser_id: adv_xyz789
                  date_range:
                    start: '2026-02-01'
                    end: '2026-02-28'
                  reach:
                    unique_devices_exposed: 45200
                    total_exposures: 128500
                    avg_frequency: 2.84
                  footfall:
                    exposed_visitors: 3250
                    control_visitors: 1820
                    exposed_visit_rate: 0.0719
                    control_visit_rate: 0.0403
                    incremental_lift_pct: 78.4
                    incremental_visits: 1430
                    cost_per_incremental_visit: 6.99
                  quality:
                    control_group_size: 45200
                    avg_match_confidence: 0.82
                    statistical_significance: 0.997
                    avg_time_to_visit_h: 48.3
                    attribution_window_days: 14
                  cost:
                    total_media_cost: 10000
                    cost_per_unique_reach: 0.22
                  breakdowns:
                    venue_breakdown:
                      gym:
                        visitors: 1200
                        lift_pct: 92.1
                      coffee_shop:
                        visitors: 850
                        lift_pct: 65.3
                    daypart_breakdown:
                      morning:
                        visitors: 1500
                        lift_pct: 85.0
                      evening:
                        visitors: 1750
                        lift_pct: 72.0
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/advertiser/attribution/campaign/{campaignId}/timeseries:
    get:
      operationId: getCampaignTimeseries
      summary: Daily attribution timeseries
      description: 'Returns daily attribution metrics over time. Use this to answer:

        "Is my campaign''s lift improving or degrading?" and "Which days drive

        the most store visits?"


        Supports date range filtering. If no dates specified, returns the full

        campaign duration.'
      tags:
      - Campaign Attribution
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/campaignId'
      - name: startDate
        in: query
        schema:
          type: string
          format: date
        description: Start date (ISO 8601, e.g. 2026-02-01)
      - name: endDate
        in: query
        schema:
          type: string
          format: date
        description: End date (ISO 8601, e.g. 2026-02-28)
      responses:
        '200':
          description: Daily timeseries of attribution metrics
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AttributionTimeseriesPoint'
              example:
                success: true
                data:
                - summary_date: '2026-02-15'
                  unique_devices_exposed: 1620
                  total_exposures: 4580
                  exposed_visitors: 116
                  control_visitors: 65
                  incremental_lift_pct: 78.5
                  incremental_visits: 51
                  cost_per_incremental_visit: 7.84
                  avg_match_confidence: 0.83
                  statistical_significance: 0.982
                - summary_date: '2026-02-16'
                  unique_devices_exposed: 1780
                  total_exposures: 5120
                  exposed_visitors: 134
                  control_visitors: 72
                  incremental_lift_pct: 86.1
                  incremental_visits: 62
                  cost_per_incremental_visit: 6.45
                  avg_match_confidence: 0.85
                  statistical_significance: 0.994
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/advertiser/attribution/campaign/{campaignId}/heatmap:
    get:
      operationId: getCampaignHeatmap
      summary: Geospatial exposure heatmap
      description: 'Returns geospatial clusters of exposure and conversion density.

        Answers: "WHERE are people seeing my ads and then visiting my stores?"


        Each point represents a geographic cluster with exposure count,

        conversion count, and density. Use for map visualizations showing

        campaign impact by location.'
      tags:
      - Campaign Attribution
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/campaignId'
      responses:
        '200':
          description: Geospatial heatmap data
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/HeatmapPoint'
              example:
                success: true
                data:
                - latitude: 40.7128
                  longitude: -74.006
                  exposure_count: 3200
                  conversion_count: 245
                  density: 0.89
                  geohash: dr5ru7
                - latitude: 40.758
                  longitude: -73.9855
                  exposure_count: 2800
                  conversion_count: 198
                  density: 0.76
                  geohash: dr5rub
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/advertiser/attribution/campaign/{campaignId}/journey:
    get:
      operationId: getCampaignJourney
      summary: Attribution journey funnel
      description: 'Returns the attribution funnel showing how exposed devices progress

        through the conversion journey: Exposure -> Visit -> Transaction.


        Use this to understand conversion rates at each stage and identify

        where the funnel leaks.'
      tags:
      - Campaign Attribution
      security:
      - bearerAuth: []
      parameters:
      - $ref: '#/components/parameters/campaignId'
      responses:
        '200':
          description: Journey funnel data
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/JourneyFunnel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    AttributionTimeseriesPoint:
      type: object
      properties:
        summary_date:
          type: string
          format: date
        unique_devices_exposed:
          type: integer
        total_exposures:
          type: integer
        exposed_visitors:
          type: integer
        control_visitors:
          type: integer
        incremental_lift_pct:
          type: number
        incremental_visits:
          type: integer
        cost_per_incremental_visit:
          type: number
        avg_match_confidence:
          type: number
        statistical_significance:
          type: number
    JourneyFunnel:
      type: object
      description: Attribution funnel from exposure through conversion stages
      properties:
        stages:
          type: array
          items:
            type: object
            properties:
              stage:
                type: string
              count:
                type: integer
              conversion_rate:
                type: number
        total_exposed:
          type: integer
        total_converted:
          type: integer
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
        error:
          type: string
    HeatmapPoint:
      type: object
      properties:
        latitude:
          type: number
        longitude:
          type: number
        exposure_count:
          type: integer
          description: Number of device exposures in this geographic cluster
        conversion_count:
          type: integer
          description: Number of POI visits from exposed devices in this area
        density:
          type: number
          minimum: 0
          maximum: 1
          description: Relative density (0-1) normalized across all clusters
        geohash:
          type: string
          description: Geohash-6 cell identifier
    AttributionSummary:
      type: object
      description: 'Comprehensive campaign attribution summary with reach, footfall,

        cost, and quality metrics. This is the single object that proves

        DOOH campaign ROI.

        '
      properties:
        campaign_id:
          type: string
        advertiser_id:
          type: string
        date_range:
          type: object
          properties:
            start:
              type: string
              format: date
            end:
              type: string
              format: date
        reach:
          type: object
          properties:
            unique_devices_exposed:
              type: integer
              description: Count of unique MAID hashes exposed to the campaign
            total_exposures:
              type: integer
              description: Total exposure events (one device can have multiple)
            avg_frequency:
              type: number
              description: Average exposures per unique device
        footfall:
          type: object
          description: Footfall attribution — proving ads drove store visits
          properties:
            exposed_visitors:
              type: integer
              description: Exposed devices that visited a POI within attribution window
            control_visitors:
              type: integer
              description: Unexposed control group devices that visited a POI
            exposed_visit_rate:
              type: number
              description: exposed_visitors / unique_devices_exposed
            control_visit_rate:
              type: number
              description: control_visitors / control_group_size
            incremental_lift_pct:
              type: number
              description: 'Percentage increase in visit rate attributable to the campaign.

                Formula: (exposed_visit_rate - control_visit_rate) / control_visit_rate * 100

                '
            incremental_visits:
              type: integer
              description: Visits that would NOT have happened without the campaign
            cost_per_incremental_visit:
              type: number
              description: total_media_cost / incremental_visits (CPIV)
        quality:
          type: object
          description: Data quality and statistical confidence indicators
          properties:
            control_group_size:
              type: integer
              description: Size of DMA-matched unexposed control group
            avg_match_confidence:
              type: number
              minimum: 0
              maximum: 1
              description: Average geospatial match confidence score
            statistical_significance:
              type: number
              minimum: 0
              maximum: 1
              description: P(lift > 0) from Bayesian model. > 0.95 = significant.
            avg_time_to_visit_h:
              type: number
              description: Average hours from exposure to store visit
            attribution_window_days:
              type: integer
              description: Attribution lookback window in days
        cost:
          type: object
          properties:
            total_media_cost:
              type: number
              description: Total campaign media spend
            cost_per_unique_reach:
              type: number
              description: Cost per unique device reached
        breakdowns:
          type: object
          properties:
            venue_breakdown:
              type: object
              additionalProperties:
                type: object
                properties:
                  visitors:
                    type: integer
                  lift_pct:
                    type: number
            daypart_breakdown:
              type: object
              additionalProperties:
                type: object
                properties:
                  visitors:
                    type: integer
                  lift_pct:
                    type: number
  parameters:
    campaignId:
      name: campaignId
      in: path
      required: true
      schema:
        type: string
        pattern: ^[a-zA-Z0-9_-]{1,128}$
      description: Campaign identifier
  responses:
    Unauthorized:
      description: Missing or invalid authentication token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained via POST /v1/user/login