Skip to main content
POST /api/v2/storefront/storefronts/{storefrontId}/demand-signals/{signalId}/test-fit Runs the matcher and reply drafter against a demand signal scoped to the caller’s storefront without persisting anything. Returns the match score, a per-factor breakdown, ranked product candidates, an agent-drafted reply, and the headline CPM. Idempotent and safe to call repeatedly — use it to preview before Respond to demand signal.

Request

curl -X POST https://api.interchange.io/api/v2/storefront/storefronts/4471/demand-signals/8821/test-fit \
  -H "Authorization: Bearer $SCOPE3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

FieldTypeRequiredNotes
storefrontIdintegerYesStorefront the caller owns (path)
signalIdintegerYesDemand signal identifier (path)
overridesobjectNoSteer the dry-run without changing stored data
overrides.includeProductIdsstring[]NoForce-include these products (1–200)
overrides.excludeProductIdsstring[]NoForce-exclude these products (max 200)
overrides.cpmOverridesobjectNoPer-product CPM overrides (productId → number > 0)
overrides.notesOverridestringNoOverride notes fed to the reply drafter (max 4000)

Response

{
  "matchScore": 72,
  "verdict": "REVIEW",
  "factors": [
    { "id": "audience", "label": "Audience overlap", "weight": 40, "score": 78, "detail": "Strong outdoor-enthusiast overlap" },
    { "id": "channel", "label": "Channel fit", "weight": 30, "score": 90, "detail": "CTV inventory available in flight" }
  ],
  "products": [
    {
      "productId": "prod_ctv_primetime",
      "name": "CTV Primetime",
      "description": "Primetime connected-TV inventory",
      "publisherDomain": "northwind.example",
      "channel": "ctv",
      "cpm": 26.5,
      "currency": "USD",
      "estimatedImpressions": 4200000,
      "fitScore": 81,
      "factors": [
        { "id": "audience", "label": "Audience overlap", "weight": 40, "score": 78, "detail": "Strong overlap" }
      ]
    }
  ],
  "skippedProducts": [
    {
      "productId": "prod_display_run_of_site",
      "name": "Run-of-Site Display",
      "description": null,
      "publisherDomain": "northwind.example",
      "channel": "display",
      "cpm": null,
      "currency": null,
      "estimatedImpressions": null,
      "fitScore": 22,
      "factors": [],
      "skipReason": "Channel not requested by buyer"
    }
  ],
  "productsConsidered": 14,
  "draftReply": {
    "text": "We can offer CTV Primetime at a $26.50 CPM with ~4.2M impressions in your flight.",
    "source": "gemini"
  },
  "headlineCpm": 26.5,
  "headlineCurrency": "USD"
}
verdict is AUTO-QUOTE, REVIEW, or PASS. draftReply.source is gemini, template, or human. Nothing is written — call /respond to send a response.

Errors

  • 400 VALIDATION_ERRORincludeProductIds empty or over 200 entries, or a cpmOverrides value ≤ 0.
  • 403 FORBIDDEN — the demand-supply-signals feature is not enabled, or the caller does not own the storefront.
  • 404 NOT_FOUND — the signal is not routed to this storefront.
See Errors for the full error contract.

Demand signal tasks

All demand-signal operations

Respond to demand signal

Send the response after previewing

Get demand signal

One signal with its target row

List demand signals

Filterable, paginated list