> ## 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/{template_uuid}/ — استرجاع قالب وجه بيومتري محفوظ واحد من Didit مع المستخدم المالك ومصدره وتاريخ انتهائه وحالته.

يُرجِع قالباً بيومترياً واحداً. استخدم `biometric_template_uuid` الذي تُرجعه [حذف الجلسة](https://docs.didit.me/ar/sessions-api/delete-session.md)، أو `biometric_template_id` في [نتيجة مطابقة في البحث بالوجه](https://docs.didit.me/ar/core-technology/face-search/report-face-search.md)، أو معرّفاً من [القائمة](https://docs.didit.me/ar/management-api/biometric-templates/list.md).

```bash theme={null}
curl -X GET https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \
  -H "x-api-key: YOUR_API_KEY"
```

```json theme={null}
{
  "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#كائن-القالب) لمعرفة كل حقل.

## الأخطاء

| الحالة | متى | نص الاستجابة |
| - | - | - |
| `403` | token الخاص بمستخدم لوحة التحكم، أو لا يُسمح لمفتاح API بهذا الإجراء | `{"detail": "You do not have permission to perform this action."}` |
| `404` | قالب غير معروف، أو قالب يخص تطبيقاً آخر، أو قالب تمت إزالته نهائياً | `{"detail": "Biometric template not found."}` |


## OpenAPI

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


        يُرجع قالباً واحداً. لا تتضمن الاستجابة مطلقاً صورة أو متجهاً أو معرّف
        الجلسة المحذوفة أو بيانات الهوية.
      operationId: get_biometric_template
      parameters:
        - in: path
          name: template_uuid
          required: true
          description: >-
            معرّف القالب، كما يتم إرجاعه في `biometric_template_uuid` بواسطة
            endpoints حذف الجلسة، أو `biometric_template_id` عند وجود نتيجة
            مطابقة في البحث بالوجه، أو endpoint القائمة.
          schema:
            type: string
            format: uuid
            example: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
      responses:
        '200':
          description: القالب.
          content:
            application/json:
              schema:
                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:
                Active template:
                  value:
                    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
        '403':
          description: >-
            token مستخدم Console، أو مفتاح API غير مسموح به. تقبل هذه endpoints
            مفاتيح API الخاصة بالتطبيق فقط.
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            قالب غير معروف، أو قالب لتطبيق آخر، أو (في طلبات `GET`) قالب تم حذفه
            نهائيًا.
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Biometric template not found.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.biometric_templates.retrieve(
                "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
            )
            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.biometricTemplates.retrieve("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b");

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.Retrieve(ctx, \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.biometricTemplates().retrieve("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b");

            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->biometricTemplates->retrieve('9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b');

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


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result =
            didit.biometric_templates.retrieve("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b")

            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.BiometricTemplates.RetrieveAsync("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b");

            Console.WriteLine(JsonSerializer.Serialize(result));
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.