> ## 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.

# ウォレットアドレスのインポートAPI：トラベルルール

> Didit Management APIで、最大10,000件のウォレットをJSONまたはCSVからトラベルルールのアドレス帳に一括インポート。アドレスまたはアドレスハッシュで指定でき、冪等に処理され、行ごとのレポートが返されます。



ウォレットアドレスインポートAPIのプロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Import many wallets into the application's Travel Rule address book in one call, as JSON or as a CSV file.

Endpoint:
POST https://verification.didit.me/v3/travel-rule/wallet-addresses/import/

Authentication:
Use the x-api-key header with my Didit API key.

Request body, one of:
\- application/json: {"entries": [row, ...]} or a bare JSON array of rows.
\- multipart/form-data: a "file" field holding a UTF-8 CSV of at most 5 MB with a header row naming the columns.
At most 10,000 rows either way.

Row fields (every one optional, but each row needs address, address_hash or both):
\{
"address": "0xBeneficiaryWallet01",      // the wallet address (alias: walletAddress)
"address_hash": "4f7d...3f2e",           // SHA-256 of the lowercased address, 64 hex or 44 base64 characters (alias: walletAddressHash)
"chain": "ETH",
"memo": "104729",                        // destination tag or memo on XRP, XLM, EOS, ATOM, HBAR (alias: destinationTag)
"holder_name": "Ana Diaz",
"holder_vendor_data": "user-042",        // your id for the holder (alias: externalUserId)
"entity_type": "individual",             // individual or company
"label": "Main deposit wallet",
"owner_type": "customer",                // customer, internal or vasp
"travel_address": "ta...",
"self_declared": false                   // only when your settings allow self-declaration
}

Behavior:
\- Send address_hash alone to register a wallet without disclosing its address. Sent with address, it must be that address's hash.
\- Idempotent: a wallet already in the book (same address or hash, chain and memo) is reported as "existing" and left untouched, so the same file can be sent again.
\- A row that repeats an earlier row of the same import is "duplicate" and names that row.
\- Each row is validated on its own, so one bad row never fails the others.
\- An entry imported by its hash only matches transfers to that address, and can be proven with the wallet-ownership widget like any other entry.
\- In a CSV, an empty cell counts as not sent and columns the import does not read are ignored.

What to read from the response:
\- 200 when no row failed, 207 when at least one did.
\- total, created, existing, duplicate, failed - the counts.
\- rows[] - one result per row in the order sent: row (from 1), status, entry_id, errors, duplicate_of_row.

Failure modes:
\- 400 - both entries and a file, or neither; more than 10,000 rows; a file over 5 MB, not UTF-8 CSV, or without a header row or rows.
\- 401 - missing or malformed x-api-key.

Full guide: /transaction-monitoring/travel-rule#importing-wallets-in-bulk.`

\</pre>



      
      

貼り付け先



## OpenAPI

````yaml ja/openapi-25.json POST /v3/travel-rule/wallet-addresses/import/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 本人確認API。x-api-keyヘッダーで認証します。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/travel-rule/wallet-addresses/import/:
    post:
      tags:
        - Travel Rule
      summary: ウォレットアドレスを一括インポート
      description: >-
        1回の呼び出しで最大10,000件のウォレットを、JSONまたはCSVファイルとしてトラベルルールのアドレス帳に追加できます。ウォレットは、アドレスそのもの、アドレスを非公開にするための小文字化したアドレスのSHA-256（`address_hash`）、またはその両方で送信できます。インポートは冪等です。すでにアドレス帳にあるウォレットは`existing`として報告され、変更されないため、同じファイルを再送信できます。各行は個別に検証されるため、1行が不正でも他の行が失敗することはありません。ハッシュのみでインポートされたウォレットは、そのアドレスへの送金にのみ一致し、他のエントリと同様にウォレット所有権ウィジェットで証明できます。
      operationId: importTravelRuleWalletAddresses
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  required:
                    - entries
                  properties:
                    entries:
                      type: array
                      minItems: 1
                      maxItems: 10000
                      items:
                        $ref: '#/components/schemas/WalletAddressImportRow'
                - type: array
                  minItems: 1
                  maxItems: 10000
                  items:
                    $ref: '#/components/schemas/WalletAddressImportRow'
            example:
              entries:
                - address: 0xBeneficiaryWallet01
                  chain: ETH
                  holder_name: Ana Diaz
                  holder_vendor_data: user-042
                - address_hash: >-
                    4f7d2e1c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e
                  chain: bitcoin
                  holder_vendor_data: user-043
                - address: rExchangeSharedAddress01
                  chain: XRP
                  memo: '104729'
                  holder_name: Ana Diaz
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: >-
                    列名（行のフィールドまたはそのエイリアス）を示すヘッダー行を含む、最大5MBのUTF-8
                    CSVファイル。空のセルは送信されなかったものとして扱われます。インポートで読み取られない列は無視されます。
      responses:
        '200':
          description: すべての行が、作成済み、すでに台帳に存在、または以前の行の重複のいずれかでした。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletAddressImportReport'
              example:
                total: 3
                created: 2
                existing: 1
                duplicate: 0
                failed: 0
                rows:
                  - row: 1
                    status: existing
                    entry_id: 11111111-2222-3333-4444-555555555555
                    errors: {}
                    duplicate_of_row: null
                  - row: 2
                    status: created
                    entry_id: 22222222-3333-4444-5555-666666666666
                    errors: {}
                    duplicate_of_row: null
                  - row: 3
                    status: created
                    entry_id: 33333333-4444-5555-6666-777777777777
                    errors: {}
                    duplicate_of_row: null
        '207':
          description: 少なくとも1行が失敗しました。その他の行はインポートされています。失敗した各行には、そのエラーが示されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletAddressImportReport'
              example:
                total: 2
                created: 1
                existing: 0
                duplicate: 0
                failed: 1
                rows:
                  - row: 1
                    status: created
                    entry_id: 44444444-5555-6666-7777-888888888888
                    errors: {}
                    duplicate_of_row: null
                  - row: 2
                    status: failed
                    entry_id: null
                    errors:
                      address:
                        - Send address, address_hash or both.
                    duplicate_of_row: null
        '400':
          description: >-
            リクエスト自体を読み取れません。`entries`と`file`の両方が指定されている、またはどちらも指定されていない、10,000行を超えている、ファイルが5MBを超えている、UTF-8のCSVではない、ヘッダー行がない、または行がない場合です。
          content:
            application/json:
              schema:
                type: object
              example:
                file:
                  - At most 10000 rows per import.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl (JSON)
          source: >-
            curl -X POST
            https://verification.didit.me/v3/travel-rule/wallet-addresses/import/
            \
              -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
              -d '{"entries": [{"address": "0xBeneficiaryWallet01", "chain": "ETH", "holder_name": "Ana Diaz"}, {"address": "rExchangeSharedAddress01", "chain": "XRP", "memo": "104729"}]}'
        - lang: curl
          label: curl (CSV)
          source: >-
            curl -X POST
            https://verification.didit.me/v3/travel-rule/wallet-addresses/import/
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -F 'file=@wallets.csv;type=text/csv'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.travel_rule.wallet_addresses.bulk_import(
                body={
                    "entries": [{
                        "address": "0xBeneficiaryWallet01",
                        "chain": "ETH",
                        "holder_name": "Ana Diaz",
                        "holder_vendor_data": "user-042",
                    }, {
                        "address_hash": "4f7d2e1c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e",
                        "chain": "bitcoin",
                        "holder_vendor_data": "user-043",
                    }, {
                        "address": "rExchangeSharedAddress01",
                        "chain": "XRP",
                        "memo": "104729",
                        "holder_name": "Ana Diaz",
                    }],
                },
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit, { fileFromPath } from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.travelRule.walletAddresses.bulkImport({
              file: await fileFromPath("wallet-addresses.csv"),
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.WalletAddresses.BulkImport(ctx, didit.TravelRuleWalletAddressesBulkImportParams{\n\tFile: didit.Some(didit.FileFromPath(\"wallet-addresses.csv\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.nio.file.Path;

            import me.didit.Didit;

            import me.didit.types.TravelRuleWalletAddressesBulkImportParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.travelRule().walletAddresses().bulkImport(TravelRuleWalletAddressesBulkImportParams.builder()
                    .file(Path.of("wallet-addresses.csv"))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;
            use Didit\File;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->travelRule->walletAddresses->bulkImport([
                'file' => File::fromPath('wallet-addresses.csv'),
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.travel_rule.wallet_addresses.bulk_import(
              body: {
                entries: [{
                  address: "0xBeneficiaryWallet01",
                  chain: "ETH",
                  holder_name: "Ana Diaz",
                  holder_vendor_data: "user-042",
                }, {
                  address_hash: "4f7d2e1c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e",
                  chain: "bitcoin",
                  holder_vendor_data: "user-043",
                }, {
                  address: "rExchangeSharedAddress01",
                  chain: "XRP",
                  memo: "104729",
                  holder_name: "Ana Diaz",
                }],
              }
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.TravelRule.WalletAddresses.BulkImportAsync(new
            TravelRuleWalletAddressesBulkImportParams

            {
                File = FileUpload.FromPath("wallet-addresses.csv"),
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    WalletAddressImportRow:
      type: object
      description: >-
        インポートするウォレット1件です。`address`、`address_hash`、またはその両方で指定します。これらのフィールドのcamelCase形式も受け付けます。`walletAddress`、`walletAddressHash`、`destinationTag`、`externalUserId`も同様に受け付けます。
      properties:
        address:
          type: string
          maxLength: 128
          description: 'ウォレットアドレス。エイリアス: `walletAddress`。'
        address_hash:
          type: string
          description: >-
            小文字化したアドレスのSHA-256。16進数64文字またはbase64の44文字で指定します。これのみを送信すると、アドレスを開示せずにウォレットを登録できます。`address`と一緒に送信する場合は、そのアドレスのハッシュである必要があります。エイリアス：`walletAddressHash`。
        chain:
          type: string
          maxLength: 32
        memo:
          type: string
          maxLength: 256
          description: >-
            宛先タグまたはメモです。XRPでは宛先タグで、0から4294967295までの整数です（JSONの数値も受け付けます）。XLMでは最大28バイトのテキストメモ、64ビットのID、または16進数の32バイトハッシュです。EOSでは最大256バイトです。ATOMでは最大256文字です。HBARでは最大100バイトです。Bitcoin、EVM、Solana、Tron、Litecoin、Bitcoin
            Cash、Dogecoin、Lightningのウォレットはメモを受け付けず、指定すると`400`になります。
        holder_name:
          type: string
          maxLength: 255
        holder_vendor_data:
          type: string
          maxLength: 255
          description: 保有者に対するお客様の内部識別子です。エイリアス：`externalUserId`。
        entity_type:
          type: string
          enum:
            - individual
            - company
          default: individual
        label:
          type: string
          maxLength: 255
        owner_type:
          type: string
          enum:
            - customer
            - internal
            - vasp
          default: customer
        travel_address:
          type: string
          maxLength: 512
        self_declared:
          type: boolean
          default: false
          description: 設定で許可されている場合は、自己申告によって既に認証済みの状態でエントリーを作成します。
    WalletAddressImportReport:
      type: object
      description: インポートの各行がどう処理されたか。送信された順に並びます。
      properties:
        total:
          type: integer
        created:
          type: integer
        existing:
          type: integer
        duplicate:
          type: integer
        failed:
          type: integer
        rows:
          type: array
          items:
            type: object
            properties:
              row:
                type: integer
                description: 行番号です（1から開始）。
              status:
                type: string
                enum:
                  - created
                  - existing
                  - duplicate
                  - failed
                description: >-
                  `created`: ブックに追加されました。`existing`:
                  ウォレットはすでにブックにあり、変更されていません。`duplicate`:
                  このインポートの前の行と重複しています。`failed`: `errors`を参照してください。
              entry_id:
                type: string
                format: uuid
                nullable: true
                description: この行によって作成または検出されたアドレス帳のエントリ。
              errors:
                type: object
                description: '`failed`の行のフィールドエラー。それ以外の場合は空です。'
              duplicate_of_row:
                type: integer
                nullable: true
                description: '`duplicate`行の場合、その行が重複している元の行。'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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