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

# Impor Alamat Dompet API: Buku Alamat Travel Rule

> Impor massal hingga 10.000 dompet ke buku alamat Travel Rule dari JSON atau CSV, berdasarkan alamat atau hash alamat, idempoten, dengan laporan per baris.



Prompt API Impor Alamat Dompet
        Salin prompt ke papan klip



      
      

\<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>



      
      

Tempel ke



## OpenAPI

````yaml id/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 Verifikasi Identitas. Lakukan autentikasi dengan header x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/travel-rule/wallet-addresses/import/:
    post:
      tags:
        - Travel Rule
      summary: Impor alamat dompet secara massal
      description: >-
        Tambahkan hingga 10,000 dompet ke buku alamat Travel Rule Anda dalam
        satu panggilan, sebagai JSON atau file CSV. Dompet dapat dikirim
        berdasarkan alamatnya, berdasarkan SHA-256 dari alamatnya yang diubah ke
        huruf kecil (`address_hash`) untuk menjaga privasi alamat, atau
        keduanya. Impor bersifat idempoten: dompet yang sudah ada di buku
        dilaporkan sebagai `existing` dan dibiarkan apa adanya, sehingga file
        yang sama dapat dikirim lagi. Setiap baris divalidasi secara terpisah,
        sehingga satu baris yang buruk tidak akan pernah menggagalkan baris
        lainnya. Dompet yang diimpor berdasarkan hash-nya hanya cocok dengan
        transfer ke alamat tersebut dan dapat dibuktikan dengan widget
        kepemilikan dompet seperti entri lainnya.
      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: >-
                    File CSV UTF-8 maksimal 5 MB dengan baris header yang
                    menyebutkan nama kolomnya (kolom pada baris tersebut atau
                    aliasnya). Sel kosong dihitung sebagai tidak dikirim; kolom
                    yang tidak dibaca oleh impor akan diabaikan.
      responses:
        '200':
          description: >-
            Setiap baris dibuat, sudah ada di buku, atau merupakan pengulangan
            dari baris sebelumnya.
          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: >-
            Setidaknya satu baris gagal; baris lainnya berhasil diimpor. Setiap
            baris yang gagal mencantumkan kesalahannya.
          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: >-
            Permintaan itu sendiri tidak dapat dibaca: menyertakan `entries` dan
            `file` sekaligus, atau tidak menyertakan keduanya; lebih dari 10,000
            baris; file berukuran lebih dari 5 MB, bukan CSV UTF-8, tanpa baris
            header, atau tanpa baris.
          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: >-
        Satu dompet untuk diimpor: berdasarkan `address`, `address_hash`, atau
        keduanya. Bentuk camelCase dari kolom-kolom ini juga diterima, begitu
        pula `walletAddress`, `walletAddressHash`, `destinationTag`, dan
        `externalUserId`.
      properties:
        address:
          type: string
          maxLength: 128
          description: 'Alamat dompet. Alias: `walletAddress`.'
        address_hash:
          type: string
          description: >-
            SHA-256 dari alamat berhuruf kecil, sebagai 64 karakter heksadesimal
            atau 44 karakter base64. Kirimkan parameter ini saja untuk
            mendaftarkan dompet tanpa mengungkapkan alamatnya; jika dikirim
            bersama `address`, nilainya harus merupakan hash dari alamat
            tersebut. Alias: `walletAddressHash`.
        chain:
          type: string
          maxLength: 32
        memo:
          type: string
          maxLength: 256
          description: >-
            Tag atau memo tujuan. XRP: tag tujuan, bilangan bulat dari 0 hingga
            4294967295 (angka JSON diterima). XLM: memo teks hingga 28 bita, ID
            64-bit, atau hash 32-bita dalam heksadesimal. EOS: hingga 256 bita.
            ATOM: hingga 256 karakter. HBAR: hingga 100 bita. Dompet Bitcoin,
            EVM, Solana, Tron, Litecoin, Bitcoin Cash, Dogecoin, dan Lightning
            tidak memerlukan memo: menyertakan memo menghasilkan `400`.
        holder_name:
          type: string
          maxLength: 255
        holder_vendor_data:
          type: string
          maxLength: 255
          description: 'Pengenal internal Anda untuk pemegang. Alias: `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: >-
            Buat entri yang sudah diverifikasi melalui deklarasi mandiri, jika
            pengaturan Anda mengizinkannya.
    WalletAddressImportReport:
      type: object
      description: Hal yang terjadi pada setiap baris impor, sesuai urutan pengiriman.
      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: Nomor baris, mulai dari 1.
              status:
                type: string
                enum:
                  - created
                  - existing
                  - duplicate
                  - failed
                description: >-
                  `created`: ditambahkan ke buku. `existing`: dompet sudah ada
                  di dalam buku dan dibiarkan tanpa perubahan. `duplicate`:
                  mengulang baris sebelumnya dari impor ini. `failed`: lihat
                  `errors`.
              entry_id:
                type: string
                format: uuid
                nullable: true
                description: >-
                  Entri buku alamat yang dibuat atau ditemukan oleh baris
                  tersebut.
              errors:
                type: object
                description: Error kolom dari baris `failed`; jika tidak, kosong.
              duplicate_of_row:
                type: integer
                nullable: true
                description: Pada baris `duplicate`, baris yang diulanginya.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Kunci API aplikasi Anda, dari Developers -> API keys di Business
        Console. Kunci utama memiliki akses penuh. Kunci bernama dapat diberi
        cakupan: none, read, atau write per sumber daya, dibatasi pada beberapa
        alur kerja atau pada sesi yang disetujui, pada daftar alamat IP, dan
        pada tanggal kedaluwarsa. 401 berarti kuncinya salah, dicabut, atau
        kedaluwarsa; 403 berarti tidak ada kunci yang dikirimkan, kunci tidak
        memiliki akses ke sumber daya atau tindakan ini, atau permintaan datang
        dari alamat di luar daftar IP-nya; 404 pada rute sesi berarti sesi
        berada di luar alur kerja atau status kunci tersebut. Kunci tanpa akses
        media menerima URL gambar, video, dan PDF sebagai null, dan kunci tanpa
        izin tulis sesi menerima tautan sesi dan token sebagai null. Lihat
        https://docs.didit.me/console/api-keys.

````

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