> ## 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: دفتر عناوين Travel Rule

> استورد حتى 10,000 محفظة بشكل مجمّع إلى دفتر عناوين Travel Rule من JSON أو CSV، بالعنوان أو بتجزئة العنوان، مع ضمان عدم التكرار وتقرير لكل صف في Didit.



برومبت واجهة 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 ar/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: >-
        أضف ما يصل إلى 10,000 محفظة إلى دفتر عناوين Travel Rule الخاص بك في
        استدعاء واحد، بصيغة JSON أو كملف CSV. يمكن إرسال المحفظة عبر عنوانها، أو
        عبر تجزئة SHA-256 لعنوانها المكتوب بأحرف صغيرة (`address_hash`) للحفاظ
        على خصوصية العنوان، أو كلاهما معاً. عملية الاستيراد تتسم بالـ
        idempotency: يتم الإبلاغ عن المحفظة الموجودة بالفعل في الدفتر على أنها
        `existing` وتُترك دون تعديل، بحيث يمكن إرسال الملف نفسه مرة أخرى. يتم
        التحقق من صحة كل صف على حدة، لذا فإن وجود صف غير صالح لا يؤدي أبداً إلى
        فشل الصفوف الأخرى. المحفظة المستوردة عبر قيمتها المجزأة تتطابق فقط مع
        التحويلات إلى ذلك العنوان ويمكن إثباتها باستخدام أداة إثبات ملكية
        المحفظة مثل أي إدخال آخر.
      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: >-
                    ملف CSV بترميز UTF-8 بحجم لا يتجاوز 5 ميغابايت مع صف رأس
                    يحدد أسماء أعمدته (حقول الصفوف أو أسمائها المستعارة). تُعتبر
                    الخلايا الفارغة كأنها لم تُرسل؛ وتتجاهل عملية الاستيراد
                    الأعمدة التي لا تقرؤها.
      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: >-
            فشل صف واحد على الأقل؛ وتم استيراد الصفوف الأخرى. يحدد كل صف فاشل
            أخطاءه.
          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 صف؛ ملف يتجاوز 5 ميغابايت، أو ليس
            بتنسيق 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: >-
        محفظة واحدة للاستيراد: من خلال `address` الخاص بها، أو `address_hash`
        الخاص بها، أو كليهما. تُقبل أيضًا صيغ camelCase لهذه الحقول، وكذلك
        `walletAddress` و`walletAddressHash` و`destinationTag`
        و`externalUserId`.
      properties:
        address:
          type: string
          maxLength: 128
          description: 'عنوان المحفظة. الاسم المستعار: `walletAddress`.'
        address_hash:
          type: string
          description: >-
            تجزئة SHA-256 للعنوان بحروف صغيرة، في صورة 64 حرفاً بنظام hex أو 44
            حرفاً بنظام base64. أرسله بمفرده لتسجيل محفظة دون الكشف عن عنوانها؛
            وإذا أُرسل مع `address`، فيجب أن يكون تجزئة ذلك العنوان. الاسم
            البديل: `walletAddressHash`.
        chain:
          type: string
          maxLength: 32
        memo:
          type: string
          maxLength: 256
          description: >-
            وسم الوجهة (destination tag) أو المذكرة (memo). في XRP: وسم وجهة،
            وهو عدد صحيح من 0 إلى 4294967295 (يُقبل رقم JSON). في XLM: مذكرة
            نصية تصل إلى 28 بايت، أو معرف 64 بت أو تجزئة 32 بايت بصيغة hex. في
            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 الخاص بتطبيقك، من Developers -> API keys في Business Console.
        يمتلك المفتاح الأساسي وصولاً كاملاً. يمكن تحديد نطاق المفتاح المسمى: لا
        شيء، أو قراءة، أو كتابة لكل مورد، ومحدوداً ببعض مسارات العمل أو بالجلسات
        المقبولة، وبقائمة من عناوين IP، وبتاريخ انتهاء الصلاحية. يشير 401 إلى أن
        المفتاح غير صحيح أو ملغى أو منتهي الصلاحية؛ ويشير 403 إلى أنه لم يتم
        إرسال أي مفتاح، أو أن المفتاح ليس لديه حق الوصول إلى هذا المورد أو
        الإجراء، أو أن الطلب جاء من عنوان خارج قائمة عناوين IP الخاصة به؛ ويشير
        404 في مسار جلسة إلى أن الجلسة خارج مسارات العمل أو الحالات الخاصة
        بالمفتاح. يتلقى المفتاح الذي لا يمتلك حق الوصول إلى الوسائط عناوين URL
        للصور ومقاطع الفيديو وملفات PDF كـ null، ويتلقى المفتاح الذي لا يمتلك
        إذن كتابة للجلسات روابط الجلسة وtoken كـ null. راجع
        https://docs.didit.me/console/api-keys.

````

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