Skip to main content
POST /api/v2/buyer/advertisers/{advertiserId}/context-records Uploads exogenous context data — promos, weather, competitor activity, seasonality — so the learning engine can partial these effects out when estimating incremental impact. Each record covers one geo and time window. Up to 5,000 records per call.

Request

curl -X POST https://api.interchange.io/api/v2/buyer/advertisers/12345/context-records \
  -H "Authorization: Bearer $SCOPE3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "records": [
      {
        "geo": "US-CA",
        "timeWindowStart": "2026-03-01",
        "timeWindowEnd": "2026-03-07",
        "promoActive": true,
        "promoType": "site_wide_15_off",
        "seasonalityIndex": 1.12,
        "flightStatus": "active"
      }
    ]
  }'

Parameters

FieldTypeRequiredNotes
advertiserIdstringYesPath parameter — the owning advertiser
recordsarrayYes1–5000 records
records[].geostringYesGeo identifier (e.g. US-CA)
records[].timeWindowStartstringYesDate YYYY-MM-DD
records[].timeWindowEndstringYesDate YYYY-MM-DD
records[].promoActivebooleanNoWhether a promo ran (default false)
records[].promoTypestringNoFree-text promo descriptor
records[].temperatureAvgnumberNoAverage temperature for weather effects
records[].competitorActivityobjectNoFree-form competitor signals
records[].seasonalityIndexnumberNoSeasonality multiplier
records[].flightStatusenumNoactive, dark, pre_flight, post_flight (default active)

Response

{
  "recordsUploaded": 1
}
Returns the count of records uploaded. The endpoint upserts on (customer, seat, geo, time window), so re-uploading the same key updates in place.

Errors

  • 400 VALIDATION_ERROR — empty records, more than 5,000 records, a missing required field, or a malformed date.
  • 404 NOT_FOUNDadvertiserId does not exist or is not visible to the authenticated customer.
See Errors for the full error contract.

Measurement tasks

All measurement operations

Measurement overview

Pipeline, belief state, and concepts

Upload measurement records

Upload outcome records