> ## 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 لتحديث اتصال بنكي وبدء المزامنة فوراً: تُعيد 202 مع sync_id، أو 200 مع المزامنة المكتملة عند الانتظار حتى 25 ثانية.

تطلب endpoint «تحديث اتصال البنك» إجراء مزامنة الآن، وتُرجع `202` مع `sync_id`.
أرسل `"wait": true` لانتظار مدة تصل إلى 25 ثانية والحصول على المزامنة المكتملة في استدعاء واحد، دون أي رسوم إضافية.
يقيّد البنك الوصول دون إشراف، لذلك قد يُرجِع الاستدعاء `429 refresh_limit_reached` مع `Retry-After`.
راجع [تحديث البيانات البنكية عند الطلب](https://docs.didit.me/ar/use-cases/refresh-bank-data-on-demand.md).


## OpenAPI

````yaml ar/openapi-25.json POST /v3/bank/connections/{id}/refresh/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: واجهة برمجة تطبيقات التحقق من الهوية. صادِق باستخدام الترويسة x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags:
  - name: Bank Data
    description: >-
      Bank Link والاتصالات والحسابات والأرصدة والمعاملات والمؤسسات والتغطية.
      بيانات البنك متاحة للتطبيقات التجريبية. ترد استدعاءات التطبيق الحي بـ
      `404` إلى أن يُعلن الوصول الحي. لا تُحتسب أي رسوم في البيئة التجريبية.
      يحتاج الاستدعاء الذي يتم بمفتاح API إلى مفتاح يتضمن إذن بيانات البنك
      (`bank-data`): القراءة للقراءات، والكتابة للعمليات التي تغيّر شيئاً. فحص
      الحساب هو الاستثناء: يحتاج إلى صلاحية الكتابة على الجلسات، أو الوصول
      الكامل، وليس إذن بيانات البنك. بيانات البنك غير مشمولة بالوصول الكامل:
      يُرفض مفتاح الوصول الكامل، ويرد الاستدعاء بـ `403 bank_data_access_denied`
      إلى أن تنشئ مفتاحاً يتضمن الإذن. ترفض بيانات البنك الخام (الحسابات
      والأرصدة والمعاملات وموجز التغييرات) أيضاً الطلب الذي لا يتضمن مفتاح API.


      تحمل كل حالات الرفض ضمن `/v3/bank/`، باستثناء رفض فحص الحساب، جسم JSON
      نفسه (`code`، `message`، `request_id`، `field`، `next_action`،
      `retry_after`). يرد مسار ليس عملية، أو معرّف ليس UUID، أو مورد فرعي غير
      معروف، بـ `404 not_found` لكل طريقة، ويرد أي خطأ غير متوقع بـ `500
      internal_error` مع `request_id`. حيثما لا تكون بيانات البنك متاحة، ترد كل
      عملية بـ `404` القياسي للمنصة، تماماً كما يرد المسار غير المعروف.
paths:
  /v3/bank/connections/{id}/refresh/:
    post:
      tags:
        - Bank Data
      summary: تحديث اتصال بنكي
      description: >-
        مزامنة فورية: تقرأ من البنك بيانات جديدة في أي لحظة. تعيد `202` مع
        `sync_id`، وإذا كانت مزامنة تعمل بالفعل فستحصل على `sync_id` نفسه، لا
        على مهمة ثانية. مع `"wait": true` في الجسم، أو الترويسة `Prefer:
        wait=<seconds>` (حتى 25)، ينتظر الاستدعاء حتى 25 ثانية ويعيد `200` مع
        المزامنة المكتملة (`outcome` وأعداد كل حساب و`balances_changed`)، فيحصل
        الطلب الواحد على بيانات حديثة. إذا لم يرد البنك خلال تلك المدة يعيد
        `202`: اقرأ المزامنة بـ `get_sync_run` باستخدام `sync_id`، أو اشترك في
        `bank.sync.completed`. يُرسل `bank.data.updated` فقط عندما تخزن المزامنة
        تغييرات.


        تُحتسب المزامنات الفورية ضمن السعر الشهري للاتصال، مثل المزامنات
        التلقائية، فلا تُفرض أي رسوم إضافية. الحد الوحيد هو حد البنك. تحدّ
        البنوك القراءات التي تجري دون حضور الشخص، مثلاً بأربع مرات يوميا (ويفعل
        بنك Didit التجريبي في البيئة التجريبية الشيء نفسه). تُخصم أولا المزامنات
        التلقائية لليوم (`sync.frequency_per_day`)، والباقي متاح لك، لذا تُظهر
        `sync.budgets` المتبقي، وتُظهر `sync.live_syncs_left_today` عدد
        المزامنات الفورية المتبقية اليوم. لا تستخدم الجدولة التلقائية آخر
        قراءتين في اليوم، فتبقى دائما مزامنتان فوريتان متاحتان. عند نفاد
        الميزانية يعيد الاستدعاء `429 refresh_limit_reached` مع `Retry-After`
        (عدد الثواني حتى تتجدد الميزانية، من 1 إلى 86400) وكائن `sync` يتضمن
        `live_syncs_left_today` و`budgets`. هذا الحد سقف يحدده البنك، وليس وعدا
        بعدد معين من المزامنات.


        عندما تخزن المزامنة تغييرات، يُخبرك `bank.data.updated` بذلك؛ ثم اقرأ
        خلاصة التغييرات.


        يتطلب مفتاح API صلاحية بيانات البنك (`bank-data`) بوضع الكتابة لهذه
        العملية، لأنها تُغيّر شيئا. لا يتضمن مفتاح الوصول الكامل هذه الصلاحية:
        امنحها صراحة عند إنشاء المفتاح، وإلا أعاد الاستدعاء `403
        bank_data_access_denied`.


        تحديث اتصال محذوف يعيد `409 connection_not_active`.
      operationId: refreshBankConnection
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: معرّف الاتصال.
        - $ref: '#/components/parameters/IdempotencyKey'
        - name: Prefer
          in: header
          required: false
          schema:
            type: string
            example: wait=25
          description: >-
            `wait=<seconds>` يُبقي الطلب معلقاً لمدة تصل إلى ذلك العدد من
            الثواني، بحد أقصى 25، مثل `wait: true` في نص الطلب.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankRefreshRequest'
            examples:
              Wait for the result:
                summary: انتظر النتيجة
                value:
                  wait: true
      responses:
        '200':
          description: انتهت المزامنة خلال 25 ثانية.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankSyncCompleted'
              examples:
                Finished:
                  summary: مزامنة مباشرة مكتملة
                  value:
                    id: d4a9e7b2-1c58-4f03-96ab-5e2d8c7f0b14
                    connection_id: 5e1d2a70-6b3c-4f8e-a1d9-0c7b2e4f8a36
                    trigger: requested
                    status: succeeded
                    started_at: '2026-11-21T12:30:02Z'
                    finished_at: '2026-11-21T12:30:09Z'
                    results:
                      - account_id: a71f0c2e-4d85-4b1a-9e63-2f8c0d5b7a14
                        resource: transactions
                        outcome: succeeded
                        added: 3
                        modified: 0
                        removed: 1
                        error: null
                    outcome: succeeded
                    balances_changed: true
                    error: null
        '202':
          description: >-
            تم قبول التحديث: في قائمة الانتظار أو قيد التشغيل بالفعل. مع `wait`،
            لم يرد البنك خلال 25 ثانية: اقرأ المزامنة باستخدام `sync_id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankRefreshAccepted'
              examples:
                Queued:
                  summary: أُضيفت مزامنة إلى قائمة الانتظار
                  value:
                    sync_id: d4a9e7b2-1c58-4f03-96ab-5e2d8c7f0b14
                    status: queued
                    next_refresh_at: null
        '400':
          description: >-
            محتوى الطلب غير صالح، فمثلًا `wait` ليست قيمة منطقية. يحدد `field`
            الحقل المعني.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDataError'
              examples:
                Invalid request:
                  summary: طلب غير صالح
                  value:
                    code: invalid_request
                    message: The request is not valid.
                    request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
                    field: wait
                    next_action: null
                    retry_after: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/BankDataAccessDenied'
        '404':
          description: المورد غير موجود في هذا التطبيق وهذه البيئة.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDataError'
              examples:
                Not found:
                  summary: غير موجود
                  value:
                    code: not_found
                    message: The resource does not exist.
                    request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
                    field: null
                    next_action: null
                    retry_after: null
        '409':
          description: >-
            لا يمكن تحديث الاتصال: `connection_not_active` (مُلغى أو موقوف أو
            فاشل أو محذوف) أو `consent_expired` (جدّد الموافقة أولًا).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDataError'
              examples:
                Not active:
                  summary: غير نشط
                  value:
                    code: connection_not_active
                    message: This connection is not active.
                    request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
                    field: null
                    next_action: create_link
                    retry_after: null
                Consent expired:
                  summary: انتهت صلاحية الموافقة
                  value:
                    code: consent_expired
                    message: The consent ended. Renew the connection to sync again.
                    request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
                    field: null
                    next_action: renew_connection
                    retry_after: null
        '429':
          description: استُنفدت ميزانية المصرف لعمليات الجلب التي تُجرى دون حضور الشخص.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankRefreshLimitError'
              examples:
                Refresh limit reached:
                  summary: تم بلوغ حد التحديث
                  value:
                    code: refresh_limit_reached
                    message: >-
                      The bank's limit on fetches without the person present is
                      used up for today.
                    request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
                    field: null
                    next_action: retry_later
                    retry_after: 3600
                    sync:
                      live_syncs_left_today: 0
                      budgets:
                        - scope: connection
                          resource: all
                          limit: 4
                          remaining: 0
                          resets_at: '2026-11-22T00:00:00Z'
          headers:
            Retry-After:
              description: عدد الثواني التي تنتظرها قبل السؤال مجدداً.
              schema:
                type: integer
        '500':
          $ref: '#/components/responses/BankDataInternalError'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/bank/connections/5e1d2a70-3b94-4c1f-8a6e-d2f07b9c1e35/refresh/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.bank.refresh_connection(
                "11111111-2222-3333-4444-555555555555",
                wait=True,
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const result = await
            didit.bank.refreshConnection("11111111-2222-3333-4444-555555555555",
            {
              wait: true,
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Bank.RefreshConnection(ctx, \"11111111-2222-3333-4444-555555555555\", didit.BankRefreshConnectionParams{\n\tBody: didit.BankRefreshRequest{\n\t\tWait: didit.Bool(true),\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.BankRefreshConnectionParams;

            import me.didit.types.BankRefreshRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.bank().refreshConnection("11111111-2222-3333-4444-555555555555",
            BankRefreshConnectionParams.builder()
                    .wait_(true)
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $result =
            $didit->bank->refreshConnection('11111111-2222-3333-4444-555555555555',
            [
                'wait' => true,
            ]);

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.bank.refresh_connection(
              "11111111-2222-3333-4444-555555555555",
              wait: true
            )
            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.Bank.RefreshConnectionAsync("11111111-2222-3333-4444-555555555555",
            new BankRefreshRequest

            {
                Wait = true,
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        مفتاح اختياري لأمان إعادة المحاولة تختاره لعملية واحدة، بحد أقصى 255
        حرفًا (يصلح UUID). الطلب المكرَّر بالمفتاح نفسه والـ endpoint والاستعلام
        والمحتوى يُجاب بالاستجابة الأولى نفسها، بالحالة والمحتوى نفسيهما، ولا
        يُنفَّذ ولا يُحتسب مرة ثانية. استخدام المفتاح نفسه مع endpoint أو
        استعلام أو محتوى مختلف يعيد `409` مع `idempotency_key_reused`، وبينما
        الطلب الأول ما زال قيد التنفيذ يعيد `409` مع
        `idempotency_key_in_progress` ومعه `Retry-After`. لا يُخزَّن الطلب
        الفاشل (أي `4xx` أو `5xx`)، لذا يمكنك إرساله مرة أخرى بالمفتاح نفسه.
        المفاتيح تخص تطبيقك، سواء استدعيت بمفتاح API أو بـ token الوصول. راجع
        [إعادة المحاولة
        وidempotency](/ar/integration/api-errors#إعادة-المحاولة-وidempotency).
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    BankRefreshRequest:
      type: object
      description: نص اختياري لطلب التحديث.
      properties:
        wait:
          type: boolean
          default: false
          description: >-
            `true` يُبقي الطلب معلقاً لمدة تصل إلى 25 ثانية ويُجيب بـ `200` مع
            المزامنة المكتملة، فيعيد الطلب الواحد بيانات حديثة. إذا لم يرد البنك
            خلال تلك المدة يُجيب الطلب بـ `202`: اقرأ المزامنة باستخدام
            `get_sync_run` مع `sync_id`، أو اشترك في `bank.sync.completed`.
            يُرسل `bank.data.updated` فقط عندما تخزّن المزامنة تغييرات. يؤدي
            الرأس `Prefer: wait=<seconds>` (حتى 25) الوظيفة نفسها.
    BankSyncCompleted:
      allOf:
        - $ref: '#/components/schemas/BankSyncRun'
        - type: object
          properties:
            outcome:
              type: string
              enum:
                - succeeded
                - partial
                - failed
              description: كيف انتهت المزامنة.
            balances_changed:
              type: boolean
              description: هل تغيّر أي رصيد.
          required:
            - outcome
            - balances_changed
      description: >-
        مزامنة مكتملة تعيدها عملية تحديث مع `wait`: تشغيل المزامنة مع `outcome`
        الخاص بها، وأعداد كل حساب في `results` و`balances_changed`.
    BankRefreshAccepted:
      type: object
      description: >-
        قُبل طلب التحديث. أي استدعاء ثانٍ أثناء تشغيل مزامنة يعيد `sync_id`
        نفسه.
      properties:
        sync_id:
          type: string
          description: المزامنة التي أُدرجت في قائمة الانتظار، أو المزامنة الجارية حالياً.
          format: uuid
        status:
          type: string
          enum:
            - queued
            - running
        next_refresh_at:
          type: string
          description: >-
            أقرب لحظة يمكن طلب تحديث جديد فيها. تكون `null` ما لم تُستنفد
            الميزانية.
          format: date-time
          nullable: true
      required:
        - sync_id
        - status
        - next_refresh_at
    BankDataError:
      type: object
      description: جسم الخطأ لكل عملية من عمليات بيانات البنك. جميع الحقول موجودة دائماً.
      properties:
        code:
          type: string
          enum:
            - ongoing_access_not_available
            - segment_not_available
            - window_not_available
            - history_window_ambiguous
            - redirect_url_not_registered
            - link_origin_not_allowed
            - bank_data_access_denied
            - connection_not_active
            - consent_expired
            - renewal_not_needed
            - renewal_window_expired
            - access_removed
            - refresh_limit_reached
            - cursor_expired
            - page_expired
            - invalid_cursor
            - page_token_mismatch
            - contract_rate_missing
            - insufficient_credits
            - invalid_request
            - not_found
            - internal_error
          description: >-
            رمز الخطأ بصيغة يمكن للآلة قراءتها. اعتمد على هذا الرمز في التفريع،
            ولا تعتمد على `message` أبداً.
        message:
          type: string
          description: شرح بلغة بسيطة للمطوّر. قد تتغير الصياغة؛ لا تحلّلها برمجياً.
        request_id:
          type: string
          description: معرّف هذا الطلب. اذكره عند التواصل مع الدعم.
        field:
          type: string
          description: >-
            حقل الطلب المطلوب تصحيحه، إذا كان الخطأ متعلقاً بحقل واحد. وإلا
            فتكون القيمة `null`.
          nullable: true
        next_action:
          type: string
          enum:
            - retry_later
            - renew_connection
            - create_link
            - restart_from_cursor
            - restart_read
            - top_up_balance
            - enable_bank_data_access
            - contact_support
            - null
          description: >-
            ما الذي ينبغي فعله تاليًا، حتى يتمكن العميل من التصرف دون تخمين.
            القيمة `null` عندما لا توجد خطوة تالية قياسية.
          nullable: true
        retry_after:
          type: integer
          description: >-
            عدد الثواني التي تنتظرها قبل إعادة المحاولة. يُضبط عند أخطاء حد
            المعدل والأخطاء المؤقتة، وإلا فهو `null`.
          nullable: true
      required:
        - code
        - message
        - request_id
        - field
        - next_action
        - retry_after
      example:
        code: ongoing_access_not_available
        message: >-
          This bank cannot keep access open. Use access one_time or choose
          another bank.
        request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
        field: institution_id
        next_action: create_link
        retry_after: null
    BankRefreshLimitError:
      allOf:
        - $ref: '#/components/schemas/BankDataError'
        - type: object
          properties:
            sync:
              type: object
              description: حدود المزامنة الحالية للاتصال.
              properties:
                live_syncs_left_today:
                  type: integer
                  nullable: true
                  minimum: 0
                budgets:
                  type: array
                  items:
                    $ref: '#/components/schemas/BankSyncBudget'
              required:
                - live_syncs_left_today
                - budgets
          required:
            - sync
      description: >-
        خطأ تجاوز حد التحديث، ويتضمّن حدود `sync` الخاصة بالربط. يحمل الرأس
        `Retry-After` عدد الثواني حتى تُعاد تهيئة الحصة، بين 1 و86400.
    BankSyncRun:
      type: object
      description: مزامنة واحدة لربط. تُدرج المزامنات الأولية والمجدولة والمطلوبة فقط.
      properties:
        id:
          type: string
          format: uuid
        connection_id:
          type: string
          format: uuid
        trigger:
          type: string
          enum:
            - initial
            - scheduled
            - requested
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - partial
            - failed
        started_at:
          type: string
          format: date-time
          nullable: true
        finished_at:
          type: string
          format: date-time
          nullable: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/BankSyncRunResult'
          description: ما الذي نفّذته عملية التشغيل، لكل حساب ومورد.
        error:
          type: object
          nullable: true
          description: >-
            سبب فشل التشغيل ككل. القيمة `null` عندما لا يفشل. أخطاء الحسابات
            والموارد الفردية موجودة في `results`.
          properties:
            code:
              type: string
            message:
              type: string
            at:
              type: string
              format: date-time
          required:
            - code
            - message
            - at
      required:
        - id
        - connection_id
        - trigger
        - status
        - started_at
        - finished_at
        - results
        - error
    BankSyncBudget:
      type: object
      description: حصة واحدة من حد البنك على عمليات الجلب في غياب الشخص.
      properties:
        scope:
          type: string
          enum:
            - connection
            - account
          description: ما الذي يحتسب البنك الميزانية عليه.
        resource:
          type: string
          enum:
            - all
            - accounts
            - balances
            - transactions
        account_id:
          type: string
          description: الحساب، عندما تكون `scope` بقيمة `account`.
          format: uuid
          nullable: true
        limit:
          type: integer
          description: >-
            عدد المرات اليومية التي يحق فيها لـ Didit جلب البيانات من البنك دون
            حضور الشخص، وفق تعريف البنك. هذا سقف يحدده البنك، وليس وعداً.
        remaining:
          type: integer
          description: >-
            عدد عمليات التحديث المتاحة لك في النافذة الحالية. عمليات القراءة
            المخصّصة للمزامنات التلقائية مخصومة مسبقاً، ولا تستهلك المزامنة
            التلقائية آخر قراءتين في اليوم، لذا يبقى دائماً تحديثان عند الطلب
            متاحين.
        resets_at:
          type: string
          description: متى تُعاد تهيئة النافذة الزمنية.
          format: date-time
      required:
        - scope
        - resource
        - limit
        - remaining
        - resets_at
    BankSyncRunResult:
      type: object
      properties:
        account_id:
          type: string
          description: القيمة `null` لنتيجة على مستوى الاتصال كله.
          format: uuid
          nullable: true
        resource:
          type: string
          enum:
            - accounts
            - balances
            - transactions
        outcome:
          type: string
          enum:
            - succeeded
            - failed
            - skipped
        added:
          type: integer
        modified:
          type: integer
        removed:
          type: integer
        error:
          allOf:
            - $ref: '#/components/schemas/BankSyncError'
          nullable: true
          description: مطلوب عندما تكون `outcome` بقيمة `failed`.
      required:
        - account_id
        - resource
        - outcome
        - added
        - modified
        - removed
        - error
    BankSyncError:
      type: object
      description: سبب فشل المزامنة.
      properties:
        code:
          type: string
          description: رمز خطأ Didit.
        message:
          type: string
          description: شرح بلغة بسيطة.
        at:
          type: string
          description: متى حدث. القيمة `null` في نتيجة الحساب الفردية.
          format: date-time
          nullable: true
      required:
        - code
        - message
        - at
  responses:
    Unauthorized:
      description: غير مُصرَّح به
      content:
        application/json:
          examples:
            Invalid API Key:
              summary: مفتاح API غير صالح
              value:
                detail: Invalid API Key.
    BankDataAccessDenied:
      description: >-
        لا يملك مفتاح API صلاحية بيانات البنك (`bank-data`)، أو، بالنسبة
        للبيانات الخام في تطبيق إنتاجي، يكون الإعداد "Bank data in the API"
        متوقفا. بيانات البنك ليست جزءا من الوصول الكامل: يُرفض بهذا النص مفتاح
        الوصول الكامل، ومفتاح مقيّد بموارد أخرى، وطلب مصادق عليه دون مفتاح API
        (بيانات اعتماد العميل عند طلب البيانات الخام)، لذا أنشئ مفتاحا وامنحه
        الصلاحية صراحة. يحدث الرفض قبل أي بحث، لذا لا يدل على وجود الكائن أو
        عدمه.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BankDataError'
          examples:
            Bank data not allowed:
              summary: بيانات البنك غير مسموح بها
              value:
                code: bank_data_access_denied
                message: >-
                  Bank data calls need an API key that carries the Bank data
                  permission.
                request_id: 3f6a1c8e-92b5-4d07-a1e3-8c4b7f0d2e59
                field: null
                next_action: enable_bank_data_access
                retry_after: null
    BankDataInternalError:
      description: >-
        حدث خطأ من جهة Didit. أي خطأ غير متوقع تحت `/v3/bank/` يُعاد بصيغة خطأ
        Bank، وليس بصفحة HTML أبداً: أرفق `request_id` عند التواصل مع الدعم.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BankDataError'
          examples:
            Internal error:
              summary: خطأ غير متوقع
              value:
                code: internal_error
                message: >-
                  Something went wrong on our side. Quote the request_id to
                  support.
                request_id: 3f6a1c8e92b54d07a1e38c4b7f0d2e59
                field: null
                next_action: contact_support
                retry_after: null
  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، ويتلقى المفتاح الذي لا
        يملك صلاحية كتابة الجلسات روابط الجلسات والرموز بقيمة null. راجع
        https://docs.didit.me/console/api-keys.

````

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