> ## 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のベンダーユーザーエンティティをCSVから一括で読み込み、ユーザーテーブル全体を外部のコンプライアンスツール向けにエクスポートできます。Business Consoleから利用できます。



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



      
      

\<pre>

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

CSV import / export is a console-only UI feature. For programmatic bulk operations, loop `POST /v3/users/create/` for imports, optionally upload trusted profile faces with `POST /v3/organization/{organization_id}/application/{application_id}/vendor-users/by-id/{didit_internal_id}/faces/upload/`, and paginate `GET /v3/users/` for exports. There is no public CSV API endpoint.

\## Bulk import — loop the create endpoint

\```bash
\# users.json — array of records you want to seed into Didit
\# [{"vendor_data":"user-1","display_name":"Alice"}, ...]

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

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

\```json
\{
"vendor_data": "user-42",          // required, unique per app
"display_name": "Jane Doe",        // optional
"metadata": {"tier": "premium"},   // free-form JSON
"tags": ["promo-2026"]             // optional array of strings
}
\```

\`create` is **not** idempotent — a duplicate `vendor_data` returns conflict. Branch on existence:

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

\## Import faces from another provider

If each imported user has a trusted face image, upload it after the User exists:

\```bash
\# GET /v3/users/{vendor_data}/ or POST /v3/users/create/ first.
\# Use the returned didit_internal_id for the profile attachment endpoint.
curl -X POST https://verification.didit.me/v3/organization/$ORGANIZATION_ID/application/$APPLICATION_ID/vendor-users/by-id/$DIDIT_INTERNAL_ID/faces/upload/ \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"image": "<base64-encoded-jpg-or-png>", "comment": "Imported from previous KYC provider"}'
\```

This stores the face on the User profile and enrolls it for duplicate detection and face search. It does not blocklist the face; use /management-api/lists/upload-face for blocklists.

\## Bulk export — paginate the list endpoint

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

Filter with the same query params as `GET /v3/users/` (`status`, `search`, date ranges, etc).

\## What survives on update vs what stays

\| Field | Behaviour |
\|---|---|
\| `display_name`, `metadata`, `tags` | Overwritten by PATCH |
\| `full_name`, `date_of_birth`, `portrait_image` | Read-only after a verified session (you can override via PATCH but it's logged as a manual override) |
\| Aggregate counters (`session_count`, `approved_count`, etc.) | Computed by Didit — never accept writes |
\| `features` map | Computed — never accept writes |

\## Failure modes

\- `409` on create — `vendor_data` exists; switch to PATCH.
\- `429` — rate limit; back off using `Retry-After`. Don't slam the API; insert 100ms+ between calls.
\- `400` — bad JSON or invalid country/status enum. Log the row and continue.
\- Partial failures: track `vendor_data` → status per row and retry only failures.

\## Console fallback

For one-off migrations bigger than 100K rows, the Business Console CSV import/export (Users → Import / Export) is fast and skips writing your own loop. The console runs the same validations and produces an error report.

\## Sources of truth

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

\</pre>



      
      

貼り付け先

Business Consoleを使うと、チームはコードを書かずにUserエンティティを一括管理できます。**CSVインポート**(ユーザーを大量に作成または更新)と**CSVエクスポート**(外部ツール向けにユーザーテーブルを抽出)の2つのフローに対応しています。> [!NOTE]
>
> ここでの一括インポート/エクスポートは、Userプロファイルの作成または更新のみを行います。過去のKYCセッション、書類の警告、ライブネスの証跡、プロバイダーによる判定は再作成されません。Sumsub、MetaMap、Veriff、Onfido、Persona、またはその他のプロバイダーからの完全な移行については、[他のプロバイダーからのデータのインポート](https://docs.didit.me/ja/sessions-api/import-verifications.md)を参照してください。## CSVからユーザーをインポートする### 利用シーン- **導入時の移行**: 他のKYCベンダーから既存のユーザー名簿を移します。
- **プロバイダーの顔データの移行**: Userの行を作成した後、インポートしたUserプロファイルに信頼できる顔画像を添付します。
- パートナーの顧客リストの**一括オンボーディング**。
- **メタデータの補完**: 多数のユーザーのタグ、レベル、社内識別子をまとめて更新します。### テンプレートの列*Users → Import → Download template*からテンプレートをダウンロードします。列は次のとおりです。| 列 | 必須 | 説明 |
| - | - | - |
| `vendor_data` | はい | ユーザーに対する貴社の識別子です。アプリケーションごとに一意である必要があります。 |
| `display_name` | いいえ | コンソールに表示される表示名です。 |
| `full_name` | いいえ | 法的な氏名です。検証済みのセッションデータで上書きされます。 |
| `email` | いいえ | 把握している連絡先メールアドレスです。 |
| `phone` | いいえ | 把握している連絡先電話番号です(E.164形式)。 |
| `country` | いいえ | ISO 3166-1 alpha-3の国コードです。 |
| `status` | いいえ | `ACTIVE`、`FLAGGED`、`BLOCKED`のいずれかです。デフォルトは`ACTIVE`です。 |
| `tags` | いいえ | カンマ区切りのタグです。 |
| `metadata_json` | いいえ | カスタムメタデータを文字列化したJSONです。 |### インポートの実行**1. CSVをアップロードする***Users → Import → Upload CSV*に移動し、ファイルを選択します。**2. プレビューを確認する**コンソールが各行を検証します。無効な行はエラー理由(`vendor_data`の重複、無効な国コードなど)とともにハイライト表示されます。**3. インポートを開始する**Diditは行を非同期で処理します。タブを閉じても問題ありません。進捗は*Users → Import history*で確認できます。**4. 結果を確認する**インポートが完了すると、履歴ビューに作成、更新、スキップされた行の件数と、ダウンロード可能なエラーレポートが表示されます。### 更新と作成- `vendor_data`が存在しない場合、新しいUserが作成されます。
- `vendor_data`がすでに存在する場合、その行の内容で既存のUser(プロファイルフィールドとメタデータ)が更新されます。
- 集計カウンターと検証済みフィールド(承認済みセッション由来の`full_name`、`date_of_birth`)は、インポートによって**上書きされることはありません**。### ユーザー作成後に顔をインポートするCSVインポートはUserの行を作成または更新します。CSVに顔画像は含まれません。他のプロバイダーから顔の生体情報を移行するには、対象のUserを作成またはインポートしてから、各顔をアップロードします。**1. Userを作成またはインポートする**コンソールのCSVインポートを使うか、[`POST /v3/users/create/`](https://docs.didit.me/ja/management-api/users/create)をループで呼び出します。**2. didit\_internal\_idを取得する**[`GET /v3/users/{vendor_data}/`](https://docs.didit.me/ja/management-api/users/get)でUserを取得します。レスポンスに`didit_internal_id`が含まれます。**3. 顔をアップロードする**raw base64形式の顔画像を指定して[`POST /v3/organization/{organization_id}/application/{application_id}/vendor-users/by-id/{didit_internal_id}/faces/upload/`](https://docs.didit.me/ja/management-api/users/upload-face)を呼び出します。```bash theme={null}
curl -X POST https://verification.didit.me/v3/organization/$ORGANIZATION_ID/application/$APPLICATION_ID/vendor-users/by-id/$DIDIT_INTERNAL_ID/faces/upload/ \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "<base64-encoded-jpg-or-png>",
    "comment": "Imported from previous KYC provider"
  }'
```顔は有効な画像で、デコード後のサイズが最大2MBであり、検出可能な顔を含んでいる必要があります。Diditはそれをプロファイルに保存し、重複検出と顔検索のためにインデックス化します。別途[リストへの顔のアップロード](https://docs.didit.me/ja/management-api/lists/upload-face.md)エンドポイントを使用しない限り、顔ブロックリストには追加されません。## CSVにユーザーをエクスポートする### 利用シーン- **コンプライアンス監査**: ユーザーテーブル全体を監査人に提出します。
- **データウェアハウスとの同期**: BIツール向けに定期的にデータを出力します。
- **SAR/規制当局からの要請**: フィルターで絞り込んだユーザーのサブセットを抽出します。### エクスポートの実行1. *Users → Export*に移動します。
2. フィルター(ステータス、国、日付範囲、検索)を適用します。
3. 列を選択します(デフォルトはすべてのフィールドで、不要な列は除外できます)。
4. 送信します。Diditはエクスポートを非同期で生成し、署名付きのダウンロードリンクをリクエストを行ったオペレーターにメールで送信します。> [!NOTE]
>
> エクスポートには、ご自身の役割で閲覧が許可されているデータのみが含まれます。COMPLIANCE\_OFFICER以上はテーブル全体をエクスポートできます。DEVELOPERおよびREADERの役割はエクスポートが制限されます。## パフォーマンス特性| 操作 | 一般的な規模 | 備考 |
| - | - | - |
| インポート | 最大100,000行 | これより大きいファイルはサーバー側で分割され、進捗はUIでポーリングされます |
| エクスポート | 最大1,000,000行 | これより大きいエクスポートはS3にストリーミングされ、署名付きURLで配信されます |## 監査証跡すべてのインポートとエクスポートは[監査ログ](https://docs.didit.me/ja/console/audit-logs.md)に記録されます。- 実行したオペレーター。
- 行数(インポート)/フィルターのスナップショット(エクスポート)。
- タイムスタンプと成功/失敗の状態。## 次のステップ> [card] [ユーザー作成API](https://docs.didit.me/ja/management-api/users/create.md)
>
> スクリプトを使用したインポート向けに、プログラムでユーザーを作成します。> [card] [ユーザーの顔のアップロード](https://docs.didit.me/ja/management-api/users/upload-face.md)
>
> インポートした顔画像をUserプロファイルに添付します。> [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.