Signal Foundry
ドキュメント
サポート 戻る
ドキュメントユースケースAPI リファレンスリリースノート

API リファレンス

認証、利用上限、主要 endpoint を実行単位で確認します。

API 概要
OpenAPI Inventory会社検索会社プロフィール会社の観測データ開示一覧開示詳細開示比較観測データ検索ソースAPIリストAPIリスト見積もりリスト候補確認リスト保存リストEnrichmentリストExport調査アイテムクレジット残高クレジット利用サマリーフィードバックAPI外部調査API
API リファレンス

Source API

ユーザー持ち込み source を import / inspect / map / resolve して saved List へ渡す API contract です。

このページの内容17項目
契約サマリーリクエストImportInspectMapResolveReviewSelectレスポンス共通 envelopeImport / inspect / mapResolveReviewSelectrow status lifecycle復旧方法Next

Source API は、CSV などの持ち込み source を account-scoped artifact として保存し、row を canonical company_id に解決するための grouped contract です。

手順全体を進める場合は Source Import Workflow を使ってください。このページは HTTP API と CLI JSON contract の確認用です。

契約サマリー

StepMethod / PathCreditCLI equivalent
importPOST /api/signal-foundry/sources/import消費しないsf source import ./companies.csv --name "<name>" --json
inspectGET /api/signal-foundry/sources/{sourceId}/inspect消費しないsf source inspect <sourceId> --json
mapPOST /api/signal-foundry/sources/{sourceId}/map消費しないsf source map <sourceId> --entity company --column name=<header> --json
resolvePOST /api/signal-foundry/sources/{sourceId}/resolvematched row に Basic creditsf source resolve <sourceId> --execute --max-credits <n> --json
reviewGET /api/signal-foundry/sources/{sourceId}/review消費しないsf source review <sourceId> --status multiple_candidates --json
selectPOST /api/signal-foundry/sources/{sourceId}/select新規確定 row に 1 Basic creditsf source select <sourceId> --row <sourceRowId> --company <companyId> --max-credits 1 --json

production は API key 必須です。Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY> か x-api-key: <SIGNAL_FOUNDRY_API_KEY> を使います。通常 accountId / account_id は送りません。

resolve と select は credit-consuming write なので、HTTP では Idempotency-Key と maxCredits、CLI では --execute --max-credits <n> --json を必ず付けます。

リクエスト

Import

curl -s "$SIGNAL_FOUNDRY_BASE_URL/api/signal-foundry/sources/import" \
  -H "Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: source-import-20260501-001" \
  -d '{
    "name": "展示会リード",
    "originalFilename": "companies.csv",
    "contentSha256": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
    "headers": ["会社名", "法人番号", "URL"],
    "rows": [
      {
        "会社名": "株式会社サンプル",
        "法人番号": "1234567890123",
        "URL": "https://example.com"
      }
    ]
  }'

Inspect

curl -s "$SIGNAL_FOUNDRY_BASE_URL/api/signal-foundry/sources/<sourceId>/inspect" \
  -H "Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY>"

Map

curl -s "$SIGNAL_FOUNDRY_BASE_URL/api/signal-foundry/sources/<sourceId>/map" \
  -H "Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "entity": "company",
    "columns": {
      "name": "会社名",
      "corporate_number": "法人番号",
      "domain": "URL"
    }
  }'

columns の key は corporate_number domain name ticker です。entity は現時点では company のみです。

Resolve

curl -s "$SIGNAL_FOUNDRY_BASE_URL/api/signal-foundry/sources/<sourceId>/resolve" \
  -H "Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: source-resolve-<sourceId>-001" \
  -d '{
    "execute": true,
    "maxCredits": 100
  }'

Review

curl -s "$SIGNAL_FOUNDRY_BASE_URL/api/signal-foundry/sources/<sourceId>/review?status=multiple_candidates&limit=50" \
  -H "Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY>"

status は repeated または comma separated で送れます。主な値は matched multiple_candidates not_found invalid unresolved です。

Select

curl -s "$SIGNAL_FOUNDRY_BASE_URL/api/signal-foundry/sources/<sourceId>/select" \
  -H "Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: source-select-<sourceRowId>-001" \
  -d '{
    "row": "<sourceRowId>",
    "companyId": "jpx_1234",
    "maxCredits": 1
  }'

companyId は、その row の resolve_candidates[] に含まれる候補だけ指定できます。

レスポンス

共通 envelope

source endpoint は成功時に次の共通 key を返します。

{
  "ok": true,
  "command": "source.resolve",
  "status": "completed",
  "source": {
    "source_id": "<sourceId>",
    "status": "resolved",
    "row_count": 3,
    "headers": ["会社名", "法人番号", "URL"],
    "mapping": {
      "entity": "company",
      "columns": {
        "name": "会社名"
      }
    },
    "resolve_summary": {
      "matched": 2,
      "multiple_candidates": 1,
      "not_found": 0,
      "invalid": 0,
      "total": 3
    }
  },
  "next_actions": [
    "sf source review <sourceId> --status multiple_candidates --json"
  ]
}

Import / inspect / map

見る key:

  • source.source_id
  • source.row_count
  • source.headers
  • source.detected_identifier_columns
  • source.mapping
  • source.sample_rows
  • deduplicated
  • next_actions[]

Resolve

見る key:

  • source.resolve_summary.matched
  • source.resolve_summary.multiple_candidates
  • source.resolve_summary.not_found
  • resolution.matched
  • resolution.multiple_candidates
  • resolution.not_found
  • resolution.resolved_count
  • resolution.multiple_candidates_count
  • resolution.not_found_count
  • resolution.review_required_count
  • run.resolved_count
  • run.multiple_candidates_count
  • run.not_found_count
  • run.review_required_count
  • billing.credits_used
  • billing.max_credits
  • next_actions[]

run.*_count は agent 向けの stable count contract です。resolution.*_count は同じ値の互換 alias です。run.resolved_count は matched row 数、run.review_required_count は multiple_candidates / not_found / invalid / unresolved の合計です。件数は billing から推測しないでください。

Review

見る key:

  • review.statuses
  • review.total_reviewable_rows
  • review.unresolved_rows_remaining
  • rows[].source_row_id
  • rows[].resolve_status
  • rows[].resolve_candidates
  • rows[].candidate_count
  • rows[].needs_human

multiple_candidates は canonical data へ自動昇格しません。agent は rows[].resolve_candidates を人間に見せ、明示された候補だけ select します。

Select

見る key:

  • selected.source_row_id
  • selected.company_id
  • selected.candidate
  • billing.credits_used
  • billing.deduplicated
  • review.multiple_candidates_remaining
  • next_actions[]

同じ row / company / idempotency key の再試行では二重消費しません。

row status lifecycle

StatusMeaningNext
unresolvedimport 済みだが resolve 前map 後に resolve
matchedcanonical company_id に確定済みsaved List 作成へ進める
multiple_candidates候補が複数あり人間確認が必要review して select
not_foundidentifier から候補が見つからないsource column を増やして map / resolve
invalidrow shape や mapping value が不正source row を修正して再 import

復旧方法

Error codeWhere復旧
invalid_source_headers / duplicate_source_headersimportheaders を空・重複なしに直して再 import
source_row_limit_exceededimportsource を分割して import
empty_source_mappingmap--column <field>=<header> を少なくとも 1 つ指定
source_mapping_requiredresolvesf source map <sourceId> --entity company ... --json を先に実行
execute_requiredresolvebody に execute: true、CLI に --execute を付ける
idempotency_key_requiredresolve / selectIdempotency-Key header を付けて再試行
max_credits_requiredresolvemaxCredits または --max-credits <n> を付ける
max_credits_exceededresolve / selectrow を分割するか、見積もり以上の maxCredits にする
source_row_not_selectableselectmultiple_candidates の row だけ select する
candidate_not_foundselectresolve_candidates[] に含まれる company_id を指定する
account_scope_conflictallAPI key account と body / query の account 指定を一致させる。通常は account を送らない

credit_balance_insufficient が出た場合は、sf credits balance --json または GET /credits/balance で今実行できるかを確認してください。

Next

  • 手順全体を確認する: Source Import Workflow
  • saved List 化後の API を確認する: リストAPI
  • credit ledger を確認する: GET /credits

このページの内容

契約サマリーリクエストImportInspectMapResolveReviewSelectレスポンス共通 envelopeImport / inspect / mapResolveReviewSelectrow status lifecycle復旧方法Next