> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# 企業のCSV一括インポートとエクスポート

> DiditのBusiness Consoleで、Didit Business（KYB）の企業エンティティをCSVから一括登録し、企業テーブル全体をエクスポートできます。請求はAPI呼び出しごとの従量課金です。



企業の一括インポート/エクスポート用プロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\````# Goal — bulk-load (or extract) Didit Business entities programmatically

CSV import / export is console-only. For programmatic bulk operations, loop `POST /v3/businesses/create/` for imports and paginate `GET /v3/businesses/` for exports.

\## Bulk import — loop the create endpoint

\```bash
\# businesses.json — array of records
\# [{"vendor_data":"biz-acme","display_name":"Acme Corp","country_code":"GBR"}, ...]

jq -c '.[]' businesses.json | while read biz; do
curl -X POST https://verification.didit.me/v3/businesses/create/ \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d "$biz"
sleep 0.1   # respect rate limits — see /integration/rate-limiting
done
\```

Record shape (matches `POST /v3/businesses/create/`):

\```json
\{
"vendor_data": "biz-acme",         // required, unique per app
"display_name": "Acme Corp",       // optional
"country_code": "GBR",             // ISO 3166-1 alpha-3, optional
"metadata": {"partner": "Acme Holdings"},
"tags": ["b2b-tier-1"]
}
\```

\`create` is **not** idempotent. Upsert pattern:

\```bash
if curl -s -o /dev/null -w "%{http_code}" \
 https://verification.didit.me/v3/businesses/$VD/ \
 -H "x-api-key: $DIDIT_API_KEY" | grep -q 200; then
curl -X PATCH https://verification.didit.me/v3/businesses/$VD/ \
-H "x-api-key: $DIDIT_API_KEY" -H "Content-Type: application/json" \
-d "$BODY"
else
curl -X POST https://verification.didit.me/v3/businesses/create/ \
-H "x-api-key: $DIDIT_API_KEY" -H "Content-Type: application/json" \
-d "$BODY"
fi
\```

\## Bulk export — paginate the list endpoint

\```bash
PAGE=1
while :; do
RESP=$(curl -sG https://verification.didit.me/v3/businesses/ \
-H "x-api-key: $DIDIT_API_KEY" \
\--data-urlencode "page=$PAGE" \
\--data-urlencode "page_size=100")
echo "$RESP" | jq -c '.results[]' >> businesses.ndjson
HAS_NEXT=$(echo "$RESP" | jq -r '.next // empty')
\[ -z "$HAS_NEXT" ] && break
PAGE=$((PAGE+1))
done
\```

Filter with `status`, `country_code`, `search`, date ranges (see /management-api/businesses/list).

\## What survives on update vs what stays

\| Field | Behaviour |
\|---|---|
\| `display_name`, `metadata`, `tags` | Overwritten by PATCH |
\| `legal_name`, `registration_number`, `country_code` | Read-only after a verified KYB session (overrides logged in audit log) |
\| Aggregate counters, `features` map | Computed by Didit — never accept writes |

\## Failure modes

\- `409` on create — `vendor_data` exists; use PATCH.
\- `429` — rate limit; back off using `Retry-After`. Insert 100ms+ between calls for large batches.
\- `400` — bad country code or bad JSON. Log and continue.

\## Console fallback

The Business Console (Businesses → Import / Export) handles up to 100K rows for imports and 1M rows for exports with chunked async processing and an emailed signed download link.

\## Sources of truth

\- /management-api/businesses/create — POST /v3/businesses/create/ schema
\- /management-api/businesses/list — GET /v3/businesses/ pagination
\- /entities/businesses/data-model — mutable vs read-only fields
\- /integration/rate-limiting — rate limits
\- /integration/integration-prompt — canonical end-to-end prompt````

\</pre>



      
      

貼り付け先

Business Consoleでは、Businessエンティティの一括インポートとエクスポートに対応しています。これは、Usersで利用できるものと同じフローを企業フィールド向けに調整したものです。> [!NOTE]
>
> ここでの一括インポート/エクスポートで作成または更新されるのは、Businessプロファイルのみです。過去のKYBセッション、登記レポート、役員、実質的支配者、プロバイダーの判定は再作成されません。他のプロバイダーまたは法人登記のエクスポートからKYBデータを完全に移行する場合は、[他のプロバイダーからデータをインポートする](https://docs.didit.me/ja/sessions-api/import-verifications.md)を参照してください。## CSVから企業をインポートする### 利用する場面- 他のKYBベンダーからの**移行**。
- **パートナーのオンボーディング**: パートナーの顧客リストを読み込みます。
- **メタデータの一括補完**: 多数の企業のタグ、レベル、カスタムフィールドを更新します。### テンプレートの列テンプレートは*Businesses → Import → Download template*からダウンロードします。| 列 | 必須 | 説明 |
| - | - | - |
| `vendor_data` | はい | 企業を識別するための独自のID。アプリケーションごとに一意です。 |
| `display_name` | いいえ | 人が読める形式の名前。 |
| `legal_name` | いいえ | 法人の正式名称。検証済みの登記データで上書きされます。 |
| `registration_number` | いいえ | 法人の登記番号。検証済みの登記データで上書きされます。 |
| `country_code` | いいえ | ISO 3166-1 alpha-3。危険国チェックのトリガーとなります。 |
| `status` | いいえ | `ACTIVE`、`FLAGGED`、`BLOCKED`のいずれか。デフォルトは`ACTIVE`です。 |
| `tags` | いいえ | カンマ区切りのタグ。 |
| `metadata_json` | いいえ | カスタムメタデータを表す文字列化されたJSON。 |### インポートの実行**1. CSVをアップロードする***Businesses → Import → Upload CSV*。**2. プレビューを確認する**無効な行はハイライト表示されます。重複（既存の`vendor_data`）は更新としてマークされます。**3. インポートを開始する**Diditは行を非同期で処理します。進捗は*Businesses → Import history*で確認できます。**4. 結果を確認する**スキップされた行については、エラーレポートをダウンロードできます。### 更新と作成- 新しい`vendor_data` → 新しいBusinessを作成します。
- 既存の`vendor_data` → Businessの変更可能なフィールドとメタデータを更新します。
- 登記データ由来のフィールド(`legal_name`、`registration_number`、`country_code`)は、企業認証（KYB）セッションで値が入力された後は、インポートで上書きされることは**ありません**。## 企業をCSVにエクスポートする### 利用する場面- **コンプライアンス監査**や規制当局からの要請への対応。
- BI向けの**データウェアハウス同期**。
- **パートナー向けレポート**: 国、レベル、タグで企業を絞り込んだビュー。### エクスポートの実行1) *Businesses → Export*に移動します。
2) フィルター(ステータス、国、期間、検索、タグ)を適用します。
3) 列を選択します。
4) 送信します。Diditはエクスポートを非同期で生成し、署名付きのダウンロードリンクをメールで送信します。役割による制限があります。[役割と権限](https://docs.didit.me/ja/console/roles-permissions.md)を参照してください。## 監査証跡すべてのインポートとエクスポートは、実行者、行数、タイムスタンプとともに記録されます。[監査ログ](https://docs.didit.me/ja/console/audit-logs.md)を参照してください。## 次のステップ> [card] [企業作成API](https://docs.didit.me/ja/management-api/businesses/create.md)
>
> プログラムによる一括作成。> [card] [データ保持](https://docs.didit.me/ja/console/data-retention.md)
>
> インポートしたデータの保持期間。> [card] [監査ログ](https://docs.didit.me/ja/console/audit-logs.md)
>
> インポート/エクスポートの履歴を確認します。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.