> ## 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が保持する顔の生体認証テンプレート1件を、所有ユーザー、取得元、有効期限、ステータスとともに取得します。

テンプレートを1件返します。[Delete Session](https://docs.didit.me/ja/sessions-api/delete-session.md)が返す`biometric_template_uuid`、[顔検索の一致結果](https://docs.didit.me/ja/core-technology/face-search/report-face-search.md)の`biometric_template_id`、または[一覧](https://docs.didit.me/ja/management-api/biometric-templates/list.md)から取得したIDを使用してください。

```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
}
```

レスポンスには、画像、ベクトル、削除されたセッションのID、本人を特定するデータは一切含まれません。すべてのフィールドについては[概要](https://docs.didit.me/ja/management-api/biometric-templates/overview.md#テンプレートオブジェクト)を参照してください。

## エラー

| ステータス | 発生条件 | ボディ |
| - | - | - |
| `403` | コンソールのユーザートークンを使用した場合、またはAPIキーに権限がない場合 | `{"detail": "You do not have permission to perform this action."}` |
| `404` | 存在しないテンプレート、別のアプリケーションのテンプレート、またはパージ済みのテンプレートの場合 | `{"detail": "Biometric template not found."}` |


## OpenAPI

````yaml ja/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/`を参照）、ユーザーに紐づけて、個別に管理される画像を含まない顔の生体認証テンプレートを1つ保持します。テンプレートは有限の`expires_at`を持つ生体データです。画像、セッションデータ、本人情報のフィールドは一切含まず、ユーザーの削除、プライバシー消去、有効期限切れ、または明示的なパージによって完全に削除されます。これらのエンドポイントはアプリケーションのAPIキー（`x-api-key`）のみを受け付け、Business
        Consoleのユーザートークンは`403`で拒否されます。


        テンプレートを1件返します。レスポンスには画像、ベクトル、削除されたセッションのID、本人情報のデータは一切含まれません。
      operationId: get_biometric_template
      parameters:
        - in: path
          name: template_uuid
          required: true
          description: >-
            テンプレートID。セッション削除エンドポイントが返す`biometric_template_uuid`、顔検索の一致結果の`biometric_template_id`、または一覧エンドポイントで返される値です。
          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: テンプレートID。ランダムに生成され、削除されたセッションやその顔から導出されたものではありません。
                  vendor_user_uuid:
                    type: string
                    format: uuid
                    description: 所有者のUser。
                  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: >-
                      テンプレートをその監査証跡に紐付ける不透明な参照です。削除されたセッションのidではなく、そのidに解決することもできません。
                  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キーの場合はアプリケーションID、Consoleでのアクションの場合はConsoleメンバーID、自動保持の場合は`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が生成したIDです。
                  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: >-
                      マッチングの対象になるのは、保留されておらず、`expires_at`を過ぎておらず、ユーザーがまだ存在する`active`テンプレートのみです。
                  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: >-
            コンソールユーザートークンが使用されたか、APIキーが許可されていません。これらのエンドポイントはアプリケーションの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キーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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