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

> GET /v3/biometric-templates/ — قائمة مرقّمة بقوالب الوجه البيومترية الخالية من الصور في Didit، مصفّاة حسب المستخدم والحالة والمصدر والتاريخ.

تُعيد قائمةً مُقسّمة إلى صفحات من القوالب البيومترية التي يحتفظ بها تطبيقك حالياً. لا تُدرَج القوالب المحذوفة نهائياً.

## معاملات الاستعلام

| المعامل | النوع | الوصف |
| - | - | - |
| `vendor_data` | string | مطابقة جزئية لا تراعي حالة الأحرف مع القيمة الحالية لـ `vendor_data` الخاصة بالمستخدم المالك |
| `vendor_user_uuid` | UUID | مطابقة تامة مع المستخدم المالك |
| `status` | enum | `pending`، `active`، `expired`، `held_out_of_use`، `purge_pending`، `purge_failed` |
| `source_type` | enum | `session_delete`، `automatic_retention`، `backfill` |
| `retained_from` | datetime | القوالب المحتفَظ بها في هذا الوقت أو بعده |
| `retained_to` | datetime | القوالب المحتفَظ بها في هذا الوقت أو قبله. يجب ألا يكون أبكر من `retained_from`. |
| `ordering` | enum | `retained_at`، `-retained_at` (الافتراضي)، `expires_at`، `-expires_at` |
| `limit` | integer | حجم الصفحة |
| `offset` | integer | إزاحة الترقيم |

## مثال

```bash theme={null}
curl -X GET "https://verification.didit.me/v3/biometric-templates/?vendor_data=user-42&status=active" \
  -H "x-api-key: YOUR_API_KEY"
```

```json theme={null}
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
      "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f",
      "vendor_data": "user-42",
      "source_type": "session_delete",
      "provenance_reference": "6b1e8d2f-4a3c-4f9e-8c7d-1a2b3c4d5e6f",
      "retention_policy": "retain_until_user_deleted",
      "retention_override": null,
      "retained_at": "2026-08-28T10:15:42.318402Z",
      "expires_at": "2027-08-28T10:15:42.318402Z",
      "retained_by": "3c9e2b1f-7d4a-4e8b-9c1d-5f6a7b8c9d0e",
      "retained_by_type": "API_KEY",
      "instruction_class": "operational_session_delete",
      "instruction_source": "api",
      "instruction_id": "post-approval-cleanup-2026-08",
      "held_out_of_use": false,
      "status": "active",
      "purged_at": null
    }
  ]
}
```

راجع [النظرة العامة](https://docs.didit.me/ar/management-api/biometric-templates/overview.md#كائن-القالب) لمعرفة كل الحقول.

## الأخطاء

| الحالة | متى |
| - | - |
| `400` | قيمة تصفية غير صالحة، أو `retained_to` أبكر من `retained_from` |
| `403` | رمز مستخدم لوحة التحكم، أو أن مفتاح API غير مسموح له بهذا الطلب |


## OpenAPI

````yaml ar/openapi-25.json GET /v3/biometric-templates/
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/biometric-templates/:
    get:
      tags:
        - Biometric Templates
      summary: عرض القوالب البيومترية المحتفظ بها
      description: >-
        يحتفظ التطبيق المشترك بقالب بيومتري واحد للوجه مُدار بشكل منفصل وخالٍ من
        الصور ومرتبط بالمستخدم عند حذف الجلسة (راجع `DELETE
        /v3/session/{sessionId}/delete/`). تُعد القوالب بيانات بيومترية ذات
        `expires_at` محدد؛ ولا تحتوي مطلقاً على صور أو بيانات جلسة أو حقول هوية،
        وتُحذف نهائياً عند حذف المستخدم أو محو البيانات للخصوصية أو انتهاء
        الصلاحية أو الحذف النهائي الصريح. تقبل هذه الـ endpoints مفاتيح API
        للتطبيق (`x-api-key`) فقط؛ ويتم رفض رموز مستخدمي Business Console بالرمز
        `403`.


        يُرجع قائمة مقسمة إلى صفحات بالقوالب التي يحتفظ بها التطبيق حالياً. لا
        يتم إدراج القوالب المحذوفة نهائياً.
      operationId: list_biometric_templates
      parameters:
        - in: query
          name: vendor_data
          required: false
          description: >-
            تطابق لسلسلة فرعية غير حساس لحالة الأحرف في `vendor_data` الحالي
            للمستخدم المالك.
          schema:
            type: string
        - in: query
          name: vendor_user_uuid
          required: false
          description: تطابق تام في المستخدم المالك.
          schema:
            type: string
            format: uuid
        - in: query
          name: status
          required: false
          description: حالة دورة الحياة. لا يتم إدراج القوالب التي تم حذفها نهائياً.
          schema:
            type: string
            enum:
              - pending
              - active
              - expired
              - held_out_of_use
              - purge_pending
              - purge_failed
        - in: query
          name: source_type
          required: false
          description: كيفية إنشاء القالب.
          schema:
            type: string
            enum:
              - session_delete
              - automatic_retention
              - backfill
        - in: query
          name: retained_from
          required: false
          description: القوالب التي تم الاحتفاظ بها في هذا الوقت أو بعده.
          schema:
            type: string
            format: date-time
        - in: query
          name: retained_to
          required: false
          description: >-
            القوالب التي تم الاحتفاظ بها في هذا الوقت أو قبله. يجب ألا يسبق
            `retained_from` (`400`).
          schema:
            type: string
            format: date-time
        - in: query
          name: ordering
          required: false
          description: ترتيب الفرز.
          schema:
            type: string
            enum:
              - retained_at
              - '-retained_at'
              - expires_at
              - '-expires_at'
            default: '-retained_at'
        - in: query
          name: limit
          required: false
          description: حجم الصفحة.
          schema:
            type: integer
        - in: query
          name: offset
          required: false
          description: إزاحة التقسيم إلى صفحات.
          schema:
            type: integer
      responses:
        '200':
          description: قوالب مقسمة إلى صفحات.
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    nullable: true
                  previous:
                    type: string
                    nullable: true
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                          format: uuid
                          description: >-
                            معرّف القالب. تم إنشاؤه عشوائياً؛ ولا يتم اشتقاقه من
                            الجلسة المحذوفة أو وجهها.
                        vendor_user_uuid:
                          type: string
                          format: uuid
                          description: المستخدم المالك.
                        vendor_data:
                          type: string
                          nullable: true
                          description: >-
                            بيانات `vendor_data` الحالية للمستخدم، والتي يتم
                            تحديدها عند قراءة القالب (لا يتم نسخها أبداً).
                        source_type:
                          type: string
                          enum:
                            - session_delete
                            - automatic_retention
                            - backfill
                          description: >-
                            كيفية إنشاء القالب: حذف جلسة (عبر API أو Console)،
                            أو نافذة الاحتفاظ بالبيانات التلقائية للتطبيق، أو
                            عملية تعبئة سابقة أجرتها Didit بتوجيه منك.
                        provenance_reference:
                          type: string
                          format: uuid
                          description: >-
                            مرجع مبهم يربط القالب بسجل التدقيق الخاص به. ليس
                            معرّف الجلسة المحذوفة ولا يمكن تحويله إليها.
                        retention_policy:
                          type: string
                          enum:
                            - delete_with_session
                            - retain_until_user_deleted
                          description: سياسة التطبيق في وقت الاحتفاظ.
                        retention_override:
                          type: boolean
                          nullable: true
                          description: >-
                            قيمة `retain_face_embeddings` المرسلة عند الحذف، أو
                            `null` عند تطبيق السياسة.
                        retained_at:
                          type: string
                          format: date-time
                        expires_at:
                          type: string
                          format: date-time
                          description: >-
                            متى تنتهي صلاحية القالب ويتم مسحه تلقائياً. يتم
                            تعيينها دائماً.
                        retained_by:
                          type: string
                          nullable: true
                          description: >-
                            الجهة الرئيسية التي أصدرت التعليمات: معرّف التطبيق
                            لمفاتيح API، أو معرّف عضو Console لإجراءات Console،
                            أو معرّف `service:` للاحتفاظ التلقائي. لا يكون عنوان
                            بريد إلكتروني أبداً.
                        retained_by_type:
                          type: string
                          enum:
                            - API_KEY
                            - CONSOLE_USER
                            - SYSTEM
                        instruction_class:
                          type: string
                          enum:
                            - operational_session_delete
                            - privacy_erasure
                        instruction_source:
                          type: string
                          enum:
                            - api
                            - console
                            - automatic_retention
                            - backfill
                            - privacy_erasure
                            - explicit_template_purge
                            - vendor_user_delete
                            - expiry
                            - reconciliation
                            - migration
                            - system
                        instruction_id:
                          type: string
                          description: >-
                            معرّف `instruction_id` المرسل عند الحذف، أو معرّف تم
                            إنشاؤه بواسطة Didit.
                        held_out_of_use:
                          type: boolean
                          description: >-
                            تكون القيمة `true` فقط أثناء سريان حجز قانوني.
                            ويُستبعد القالب المحجوز من كافة عمليات المطابقة.
                        status:
                          type: string
                          enum:
                            - pending
                            - active
                            - expired
                            - held_out_of_use
                            - purge_pending
                            - purge_failed
                            - purged
                          description: >-
                            فقط القوالب ذات الحالة `active` التي ليست معلقة، ولم
                            تتجاوز `expires_at`، ولا يزال المستخدم الخاص بها
                            موجودًا، تشارك في المطابقة.
                        purged_at:
                          type: string
                          format: date-time
                          nullable: true
              examples:
                One active template:
                  value:
                    count: 1
                    next: null
                    previous: null
                    results:
                      - uuid: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
                        vendor_user_uuid: 2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f
                        vendor_data: user-42
                        source_type: session_delete
                        provenance_reference: 6b1e8d2f-4a3c-4f9e-8c7d-1a2b3c4d5e6f
                        retention_policy: retain_until_user_deleted
                        retention_override: null
                        retained_at: '2026-08-28T10:15:42.318402Z'
                        expires_at: '2027-08-28T10:15:42.318402Z'
                        retained_by: 3c9e2b1f-7d4a-4e8b-9c1d-5f6a7b8c9d0e
                        retained_by_type: API_KEY
                        instruction_class: operational_session_delete
                        instruction_source: api
                        instruction_id: post-approval-cleanup-2026-08
                        held_out_of_use: false
                        status: active
                        purged_at: null
        '400':
          description: >-
            قيمة تصفية غير صالحة، أو `retained_to` يسبق `retained_from`. أخطاء
            التحقق من الصحة مفهرسة حسب الحقل.
          content:
            application/json:
              examples:
                Bad range:
                  value:
                    retained_to:
                      - Must be on or after retained_from.
        '403':
          description: >-
            token مستخدم Console، أو مفتاح API غير مسموح به. تقبل هذه endpoints
            مفاتيح API الخاصة بالتطبيق فقط.
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/biometric-templates/?vendor_data=user-42&status=active'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            for item in client.biometric_templates.list():
                print(item)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            for await (const item of didit.biometricTemplates.list()) {
              console.log(item);
            }
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.BiometricTemplates.ListAutoPaging(ctx, didit.BiometricTemplatesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}"
        - lang: java
          label: Java
          source: |-
            import me.didit.Didit;

            // Reads DIDIT_API_KEY.
            Didit client = new Didit();

            for (var item : client.biometricTemplates().list()) {
                System.out.println(item);
            }
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            foreach ($didit->biometricTemplates->list() as $item) {
                print_r($item->toArray());
            }
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            didit.biometric_templates.list.auto_paging_each do |item|
              puts item.to_h
            end
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            await foreach (var item in await
            client.BiometricTemplates.ListAsync())

            {
                Console.WriteLine(JsonSerializer.Serialize(item));
            }
components:
  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.