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

# إرسال الأشخاص الرئيسيين في التحقق من الشركات (KYB) عبر API

> أعلِن عن الأشخاص الرئيسيين المُعدّين لجلسة KYB وابدأ التحقق KYC لكل طرف يحتاج إليه، باستخدام Didit.



## OpenAPI

````yaml ar/openapi-25.json POST /v3/session/{sessionId}/kyb/parties/submit/
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/session/{sessionId}/kyb/parties/submit/:
    post:
      tags:
        - Sessions
      summary: إرسال مسودات أطراف KYB
      description: >-
        اعتماد المسودات المخزنة باعتبارها الأشخاص الرئيسيين للشركة. هذه هي خطوة
        الأشخاص الرئيسيين المستضافة تحت مفتاح API الخاص بك: تحدد Didit من خلال
        إعدادات الأدوار وحدود الملكية لسير العمل الأطراف التي يجب التحقق منها،
        وتنشئ جلسة KYC فردية واحدة (أو جلسة KYB فرعية لمالك اعتباري) لكل منهم،
        وترسل رسائل البريد الإلكتروني التي يطلبها سير العمل، وتُقدّم الجلسة إلى
        المرحلة التالية. تتم فوترة كل جلسة فرعية كما هو الحال في المسار
        المستضاف. يتم استهلاك المسودات. تكرار الاستدعاء بعد إرسال ناجح لا يغيّر
        شيئاً ويرد بـ `200` مع `already_submitted: true` والأطراف الموجودة
        بالفعل. يجب أن تكون الجلسة في خطوة الأشخاص الرئيسيين. أرسل
        `kyc_session_url` الخاص بكل شخص إليه، أو قم بتضمينه. يتطلب
        `write:businesses`.
      operationId: post_v3_session_kyb_parties_submit
      parameters:
        - name: sessionId
          in: path
          required: true
          description: >-
            معرّف UUID لجلسة التحقق من الشركات (KYB). يجب أن تنتمي إلى التطبيق
            الخاص بمفتاح API.
          schema:
            type: string
            format: uuid
            example: 33333333-4444-5555-6666-777777777777
        - name: node_id
          in: query
          required: false
          description: >-
            عقدة سير العمل الخاصة بخطوة KYB. لازمة فقط عندما يحتوي سير العمل على
            أكثر من عقدة KYB واحدة؛ افتراضياً، تستخدم Didit عقدة الجلسة نفسها.
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                locale:
                  type: string
                  maxLength: 10
                  description: >-
                    اللغة المستخدمة لترجمة استجابة الخطوة التي تنتقل إليها
                    الجلسة.
            example:
              locale: es
      responses:
        '200':
          description: الأطراف المُصرّح بها (أو المُصرّح بها مسبقاً).
          content:
            application/json:
              schema:
                type: object
                properties:
                  valid:
                    type: boolean
                  next_step:
                    type: string
                    nullable: true
                    description: الخطوة التي توجد بها الجلسة.
                  status:
                    type: string
                    description: حالة جلسة الشركة.
                  advanced:
                    type: boolean
                    description: >-
                      تكون `true` عندما يُقر هذا الاستدعاء بالأطراف ويتقدّم
                      بالجلسة.
                  already_submitted:
                    type: boolean
                    description: >-
                      تكون `true` عندما تكون الأطراف قد تم الإقرار بها بواسطة
                      استدعاء سابق.
                  kyb_key_people_status:
                    type: string
                  parties:
                    type: array
                    items:
                      $ref: '#/components/schemas/KYBKeyPeopleParty'
              example:
                valid: true
                next_step: FINISHED
                status: In Progress
                advanced: true
                already_submitted: false
                kyb_key_people_status: In Progress
                parties: []
        '401':
          description: >-
            انتهت صلاحية مفتاح API محدد النطاق. هذه هي الحالة الوحيدة التي تُرجع
            `401`: بينما يُرجع المفتاح المفقود أو غير الصالح أو الملغى الرمز
            `403`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              examples:
                Expired key:
                  summary: انقضى تاريخ الانتهاء للمفتاح
                  value:
                    detail: This API key has expired.
        '402':
          description: لم يتبقَّ لدى المؤسسة أي رصيد لجلسات التحقق الفرعية.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              example:
                detail: Insufficient credits.
        '403':
          description: >-
            فشل في المصادقة أو التفويض. يؤدي المفتاح المفقود إلى إرجاع `403`،
            وكذلك المفتاح التابع لتطبيق آخر، أو المفتاح محدد النطاق الذي يفتقر
            إلى الإذن الذي يتطلبه هذا endpoint، أو الطلب الوارد من خارج قائمة IP
            المسموح بها للمفتاح؛ بينما يؤدي المفتاح الخاطئ أو الملغى أو منتهي
            الصلاحية إلى إرجاع `401`. يمكنك التمييز بينها من خلال `detail`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              examples:
                Missing or invalid credentials:
                  summary: لا يوجد رأس x-api-key، أو فشل التحقق من صحة المفتاح
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Other application:
                  summary: مفتاح صالح ينتمي إلى تطبيق مختلف عن الجلسة
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without decisions write:
                  summary: 'المفتاح محدد النطاق يفتقر إلى decisions: write'
                  value:
                    detail: This API key has no write access to decisions.
                IP not allowed:
                  summary: الطلب وارد من خارج قائمة IP المسموح بها للمفتاح
                  value:
                    detail: This API key can't be used from this IP address.
        '404':
          description: >-
            الجلسة غير موجودة، أو تم حذفها، أو تنتمي إلى تطبيق آخر، أو أنها خارج
            حدود مفتاح ذي نطاق محدد؛ لا توجد تفاصيل تميز بين هذه الحالات.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              example:
                detail: Session not found.
        '409':
          description: >-
            `kyb_no_party_drafts`: لا يوجد شيء لتقديمه.
            `kyb_parties_already_submitted`: تمت إضافة مسودات بعد التصريح
            بالأطراف. `kyb_step_mismatch`: الجلسة ليست في خطوة الأشخاص الرئيسيون
            (يحدد `next_step` خطوتها). `kyb_session_not_writable`: الجلسة
            مكتملة.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
                  code:
                    type: string
                  next_step:
                    type: string
              example:
                detail: There are no draft parties to submit.
                code: kyb_no_party_drafts
        '429':
          description: >-
            تم تجاوز حد المعدل: 300 طلب كتابة (POST وPATCH وDELETE) في الدقيقة
            لكل مفتاح API. انتظر عدد الثواني المحدد في `Retry-After` قبل إعادة
            المحاولة؛ تُظهر رؤوس `X-RateLimit-*` الميزانية.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: رسالة خطأ سهلة القراءة.
              examples:
                Rate limited:
                  summary: استُنفدت الميزانية المخصصة للدقيقة الحالية
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      requests per minute.
          headers:
            Retry-After:
              description: عدد الثواني الواجب انتظارها قبل إعادة المحاولة.
              schema:
                type: integer
                minimum: 1
                example: 30
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.submit_kyb_parties(
                "33333333-4444-5555-6666-777777777777",
                locale="es",
            )
            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.sessions.submitKybParties("33333333-4444-5555-6666-777777777777",
            {
              locale: "es",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.SubmitKYBParties(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsSubmitKYBPartiesParams{\n\tLocale: didit.String(\"es\"),\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.SessionsSubmitKybPartiesParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().submitKybParties("33333333-4444-5555-6666-777777777777",
            SessionsSubmitKybPartiesParams.builder()
                    .locale("es")
                    .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->sessions->submitKybParties('33333333-4444-5555-6666-777777777777',
            [
                'locale' => 'es',
            ]);

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

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

            result = didit.sessions.submit_kyb_parties(
              "33333333-4444-5555-6666-777777777777",
              locale: "es"
            )
            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.Sessions.SubmitKybPartiesAsync("33333333-4444-5555-6666-777777777777",
            new SessionsSubmitKybPartiesParams

            {
                Locale = "es",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    KYBKeyPeopleParty:
      type: object
      description: >-
        طرف من الأشخاص الرئيسيين (Key People) في جلسة التحقق من الشركات (KYB)،
        مع التحقق الفرعي التابع له. يظهر الطرف نفسه في
        `key_people_checks[].submitted.parties[]` لقرار جلسة الشركة.
      required:
        - uuid
        - entity_type
        - source
        - name
        - is_active
        - is_skipped
        - requires_verification
        - roles
        - kyc_session_deleted
        - kyb_sub_session_deleted
      properties:
        uuid:
          type: string
          format: uuid
          description: معرّف الطرف.
        entity_type:
          type: string
          enum:
            - person
            - company
          description: ما إذا كان الطرف فرداً أو شركة.
        source:
          type: string
          enum:
            - REGISTRY
            - USER
          description: '`REGISTRY`: مأخوذ من سجل الشركات. `USER`: مُدخل في شاشة Key People.'
        name:
          type: string
          description: اسم العرض للطرف.
        first_name:
          type: string
          nullable: true
          description: الاسم الأول (للأشخاص).
        last_name:
          type: string
          nullable: true
          description: اسم العائلة (للأشخاص).
        company_name:
          type: string
          nullable: true
          description: اسم الشركة (أطراف الشركات).
        registration_number:
          type: string
          nullable: true
          description: رقم تسجيل الشركة (أطراف الشركات).
        email:
          type: string
          format: email
          nullable: true
          description: البريد الإلكتروني الذي يتم إرسال رابط التحقق إليه.
        nationality:
          type: string
          nullable: true
          description: الجنسية للأفراد، ودولة التأسيس للشركات.
        phone_number:
          type: string
          nullable: true
          description: رقم الهاتف الذي تم جمعه للطرف المعني.
        date_of_birth:
          type: string
          format: date
          nullable: true
          description: تاريخ الميلاد (للأشخاص).
        position:
          type: string
          nullable: true
          description: المسمى الوظيفي بنص حر (للأشخاص).
        custom_fields:
          type: object
          additionalProperties: true
          description: حقول مخصصة محددة في سير العمل تم جمعها للطرف، ومفهرسة بمفتاح الحقل.
        is_active:
          type: boolean
          description: ما إذا كان الطرف نشطاً.
        is_skipped:
          type: boolean
          description: ما إذا كان الطرف معفياً من التحقق. تؤدي إعادة الإنشاء إلى مسحها.
        requires_verification:
          type: boolean
          description: ما إذا كانت قواعد الدور والملكية تتطلب عملية تحقق لهذا الطرف.
        roles:
          type: array
          description: الأدوار التي يشغلها الطرف في الشركة.
          items:
            type: object
            required:
              - role
              - ownership_percent
              - voting_percent
            properties:
              role:
                type: string
                enum:
                  - director
                  - non_executive_director
                  - secretary
                  - chairman
                  - ubo
                  - shareholder
                  - representative
                  - founder
                  - legal_advisor
                  - authorized_signatory
                  - trustee
                  - beneficiary
                  - settlor
                  - protector
                  - company_officer
                  - investor
                  - other
                description: رمز الدور.
              ownership_percent:
                type: number
                nullable: true
                description: نسبة الملكية لهذا الدور، عندما تكون معروفة.
              voting_percent:
                type: number
                nullable: true
                description: نسبة حقوق التصويت لهذا الدور، عند معرفتها.
        kyc_session_id:
          type: string
          format: uuid
          nullable: true
          description: جلسة KYC فردية فرعية (الأفراد).
        kyc_session_status:
          type: string
          nullable: true
          enum:
            - Not Started
            - In Progress
            - Approved
            - Declined
            - In Review
            - Expired
            - Abandoned
            - Kyc Expired
            - Resubmitted
            - Awaiting User
            - null
          description: >-
            حالة جلسة KYC الفرعية. تحتفظ الجلسة المحذوفة بالحالة التي كانت عليها
            عند حذفها.
        kyc_session_url:
          type: string
          format: uri
          nullable: true
          description: >-
            الرابط المستضاف لجلسة KYC الفرعية. يكون `null` عند عدم وجود جلسة أو
            إذا تم حذفها، وكذلك لمفتاح API ذي نطاق محدد دون صلاحية `sessions:
            write`.
        kyc_session_deleted:
          type: boolean
          description: تم حذف جلسة KYC الفرعية، لذا لا يمكن تسويتها أبداً.
        kyb_sub_session_id:
          type: string
          format: uuid
          nullable: true
          description: جلسة KYB فرعية (أطراف الشركات).
        kyb_sub_session_status:
          type: string
          nullable: true
          enum:
            - Not Started
            - In Progress
            - Approved
            - Declined
            - In Review
            - Expired
            - Abandoned
            - Kyc Expired
            - Resubmitted
            - Awaiting User
            - null
          description: حالة جلسة KYB الفرعية.
        kyb_sub_session_url:
          type: string
          format: uri
          nullable: true
          description: >-
            الرابط المستضاف لجلسة KYB الفرعية، مع تطبيق نفس قواعد `null` الخاصة
            بـ `kyc_session_url`.
        kyb_sub_session_deleted:
          type: boolean
          description: المقابل الخاص بطرف الشركة لـ `kyc_session_deleted`.
        verification_workflow_type:
          type: string
          nullable: true
          enum:
            - kyc
            - kyb
            - adaptive_age_verification
            - biometric_authentication
            - address_verification
            - questionnaire_verification
            - email_verification
            - phone_verification
            - null
          description: نوع سير العمل الذي تشغله الجلسة الفرعية.
        verification_workflow_id:
          type: string
          format: uuid
          nullable: true
          description: سير العمل الذي تشغّله الجلسة الفرعية.
        verification_workflow_label:
          type: string
          nullable: true
          description: تسمية سير العمل هذا.
        verification_workflow_features:
          type: array
          nullable: true
          description: ميزات سير عمل الجلسة الفرعية مع حالتها الحالية.
          items:
            type: object
            required:
              - feature
              - status
            properties:
              feature:
                type: string
                description: رمز الميزة، على سبيل المثال `ID_VERIFICATION` أو `LIVENESS`.
              status:
                type: string
                description: حالة الميزة، وتكون `Not Finished` حتى يتم تشغيلها.
        didit_internal_id:
          type: string
          format: uuid
          nullable: true
          description: معرّف Didit للشخص الذي تم التحقق منه، بمجرد معرفته.
  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.