> ## 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 importazione indirizzi wallet: rubrica Travel Rule

> Importa in blocco fino a 10.000 wallet nella rubrica Travel Rule di Didit da JSON o CSV, per indirizzo o hash, in modo idempotente, con report per riga.



Prompt dell'API per importare indirizzi di wallet
        Copia il prompt negli appunti



      
      

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



      
      

Incolla in



## OpenAPI

````yaml it/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 di verifica dell'identità. Autenticati con l'intestazione x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/travel-rule/wallet-addresses/import/:
    post:
      tags:
        - Travel Rule
      summary: Importare indirizzi di wallet in blocco
      description: >-
        Aggiungi fino a 10.000 wallet alla tua rubrica degli indirizzi per la
        Travel Rule in una sola chiamata, in formato JSON o come file CSV. Un
        wallet può essere inviato tramite il suo indirizzo, tramite lo SHA-256
        del suo indirizzo in lettere minuscole (`address_hash`) per mantenerlo
        privato, o entrambi. L'importazione è idempotente: un wallet già
        presente nella rubrica viene segnalato come `existing` e lasciato
        inalterato, consentendo di inviare nuovamente lo stesso file. Ogni riga
        viene convalidata singolarmente, pertanto una riga errata non
        compromette mai le altre. Un wallet importato tramite il relativo hash
        trova corrispondenza solo con i trasferimenti verso quell'indirizzo e
        può essere dimostrato con il widget di titolarità del wallet come
        qualsiasi altra voce.
      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: >-
                    Un file CSV in UTF-8 di massimo 5 MB con una riga di
                    intestazione che elenca le relative colonne (i campi della
                    riga o i loro alias). Le celle vuote contano come non
                    inviate; le colonne non lette dall'importazione vengono
                    ignorate.
      responses:
        '200':
          description: >-
            Ogni riga è stata creata, era già presente nel registro o è una
            ripetizione di una riga precedente.
          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: >-
            Almeno una riga ha avuto esito negativo; le altre sono state
            importate. Ogni riga con esito negativo indica i relativi errori.
          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: >-
            Impossibile leggere la richiesta: sono presenti sia `entries` sia un
            `file`, oppure nessuno dei due; più di 10.000 righe; un file
            superiore a 5 MB, non in formato CSV UTF-8, senza riga di
            intestazione o privo di righe.
          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: >-
        Un singolo wallet da importare: tramite il relativo `address`, il
        relativo `address_hash` o entrambi. Sono accettate anche le forme
        camelCase di questi campi, così come `walletAddress`,
        `walletAddressHash`, `destinationTag` ed `externalUserId`.
      properties:
        address:
          type: string
          maxLength: 128
          description: 'L''indirizzo del wallet. Alias: `walletAddress`.'
        address_hash:
          type: string
          description: >-
            SHA-256 dell'indirizzo in minuscolo, come 64 caratteri esadecimali o
            44 caratteri base64. Invialo da solo per registrare un wallet senza
            rivelarne l'indirizzo; se inviato con `address`, deve essere l'hash
            di quell'indirizzo. Alias: `walletAddressHash`.
        chain:
          type: string
          maxLength: 32
        memo:
          type: string
          maxLength: 256
          description: >-
            Il tag o memo di destinazione. XRP: un destination tag, un numero
            intero da 0 a 4294967295 (è accettato un numero JSON). XLM: un memo
            testuale fino a 28 byte, un ID a 64 bit o un hash di 32 byte in
            formato esadecimale. EOS: fino a 256 byte. ATOM: fino a 256
            caratteri. HBAR: fino a 100 byte. I wallet Bitcoin, EVM, Solana,
            Tron, Litecoin, Bitcoin Cash, Dogecoin e Lightning non supportano
            memo: specificarne uno restituisce un errore `400`.
        holder_name:
          type: string
          maxLength: 255
        holder_vendor_data:
          type: string
          maxLength: 255
          description: >-
            Il tuo identificatore interno per il titolare. 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: >-
            Crea la voce già verificata tramite autodichiarazione, quando le tue
            impostazioni lo consentono.
    WalletAddressImportReport:
      type: object
      description: Cosa è successo a ciascuna riga di un'importazione, nell'ordine inviato.
      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: Il numero della riga, a partire da 1.
              status:
                type: string
                enum:
                  - created
                  - existing
                  - duplicate
                  - failed
                description: >-
                  `created`: aggiunto alla rubrica. `existing`: il wallet è già
                  presente nella rubrica ed è rimasto invariato. `duplicate`:
                  ripete una riga precedente di questa importazione. `failed`:
                  vedi `errors`.
              entry_id:
                type: string
                format: uuid
                nullable: true
                description: La voce della rubrica creata o trovata dalla riga.
              errors:
                type: object
                description: Errori di campo di una riga `failed`; vuoto altrimenti.
              duplicate_of_row:
                type: integer
                nullable: true
                description: Su una riga `duplicate`, la riga che ripete.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        La chiave API della tua applicazione, da Developers -> API keys nella
        Business Console. La chiave primaria ha accesso completo. Una chiave con
        nome può avere un ambito definito: nessuno, lettura o scrittura per
        risorsa, limitata ad alcuni workflow o a sessioni approvate, a un elenco
        di indirizzi IP e a una data di scadenza. 401 indica che la chiave è
        errata, revocata o scaduta; 403 indica che non è stata inviata alcuna
        chiave, che la chiave non ha accesso a questa risorsa o azione, oppure
        che la richiesta proviene da un indirizzo non incluso nel suo elenco IP;
        404 su una route di sessione indica che la sessione non rientra nei
        workflow o negli stati previsti dalla chiave. Una chiave senza accesso
        ai media riceve gli URL di immagini, video e PDF come null, e una chiave
        senza permessi di scrittura sulle sessioni riceve link e token di
        sessione come null. Consulta https://docs.didit.me/console/api-keys.

````

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