> ## 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 | 所有者であるUserの現在の`vendor_data`に対する、大文字と小文字を区別しない部分一致 |
| `vendor_user_uuid` | UUID | 所有者であるUserとの完全一致 |
| `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/ja/management-api/biometric-templates/overview.md#テンプレートオブジェクト)を参照してください。

## エラー

| ステータス | 発生条件 |
| - | - |
| `400` | フィルターの値が無効な場合、または`retained_to`が`retained_from`より前の場合 |
| `403` | コンソールのユーザートークンを使用した場合、またはAPIキーが許可されていない場合 |


## OpenAPI

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