Skip to main content
POST /api/v2/storefront/inventory-sources/{sourceId}/test-connection Probes the upstream adapter for reachability against the provisioned ad-server credentials. Use it after saving config or rotating credentials to confirm the source can authenticate.

Request

curl -X POST https://api.interchange.io/api/v2/storefront/inventory-sources/retail-gam/test-connection \
  -H "Authorization: Bearer $SCOPE3_API_KEY"

Parameters

FieldTypeRequiredNotes
sourceIdstring (path)YesStorefront-scoped inventory source ID

Response

{
  "success": true,
  "error": null,
  "errorCode": null,
  "remediation": null,
  "details": { "networkCode": "12345678" },
  "capabilityChecks": [],
  "testedAt": "2026-05-02T09:14:00Z"
}
On failure, success is false and errorCode classifies the problem — for example ADAPTER_PERMISSION_DENIED (GAM grant still propagating) or ADAPTER_NETWORK_NOT_FOUND (wrong network code). remediation carries an operator-facing next step when available. capabilityChecks is an optional array of per-capability probe results — each entry has { capability, status, message?, errorCode?, remediation?, details? } where status is passed, failed, or not_checked:
{
  "success": false,
  "error": "Service account is not authorized on network 12345678.",
  "errorCode": "ADAPTER_PERMISSION_DENIED",
  "remediation": "Grant the service-account email access in your GAM admin console, then retry after a minute.",
  "details": null,
  "testedAt": "2026-05-02T09:14:00Z"
}

Errors

  • 401 UNAUTHORIZED — missing or invalid API key.
  • 404 NOT_FOUND — no ad-server-backed source with this sourceId.
A failed probe returns 200 with success: false — it is not an HTTP error. See Errors for the full error contract.

Inventory source tasks

All operations

Replace ad-server config

Fix the config, then re-test

Rotate credentials

Rotate, then re-test

Get status

Operational snapshot