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

> Didit के साथ POST /v3/biometric-templates/delete/ से आईडी सूची या फ़िल्टर द्वारा संरक्षित फ़ेस बायोमेट्रिक टेम्पलेट हटाएँ। प्रति टेम्पलेट आइडेम्पोटेंट।

एक कॉल में कई टेम्पलेट पर्ज करता है। या तो स्पष्ट आईडी सूची दें या `delete_all: true`, जिसे वैकल्पिक रूप से उन्हीं फ़िल्टर से सीमित किया जा सकता है जो [List Biometric Templates](https://docs.didit.me/hi/management-api/biometric-templates/list.md) में हैं।

## अनुरोध बॉडी

| फ़ील्ड | प्रकार | विवरण |
| - | - | - |
| `template_uuids` | UUID\[] | पर्ज किए जाने वाले टेम्पलेट। जब `delete_all` `true` न हो, तब यह अनिवार्य है। जिन आईडी को पहले से पर्ज किया जा चुका है, उन्हें `already_purged` के रूप में दर्ज किया जाता है। |
| `delete_all` | boolean | जब `true` हो, तब नीचे दिए गए फ़िल्टर से मेल खाने वाले सभी टेम्पलेट पर्ज हो जाते हैं (कोई फ़िल्टर न दिए जाने पर एप्लिकेशन के सभी टेम्पलेट)। `template_uuids` को अनदेखा किया जाता है। |
| `vendor_data` | string | केवल `delete_all` के साथ: मालिक उपयोगकर्ता के `vendor_data` में केस-इनसेंसिटिव सबस्ट्रिंग मिलान |
| `vendor_user_uuid` | UUID | केवल `delete_all` के साथ: मालिक उपयोगकर्ता का सटीक मिलान |
| `status` | enum | केवल `delete_all` के साथ: `pending`, `active`, `expired`, `held_out_of_use`, `purge_pending`, `purge_failed` |
| `source_type` | enum | केवल `delete_all` के साथ: `session_delete`, `automatic_retention`, `backfill` |
| `retained_from`, `retained_to` | datetime | केवल `delete_all` के साथ: प्रतिधारण तिथि की सीमा |

> [!WARNING]
>
> बिना फ़िल्टर के `delete_all: true` एप्लिकेशन के हर बायोमेट्रिक टेम्पलेट को पर्ज कर देता है, और इसे वापस नहीं लिया जा सकता। पर्ज होने वाली चीज़ों की पुष्टि के लिए पहले उन्हीं फ़िल्टर के साथ [Count Biometric Templates](https://docs.didit.me/hi/management-api/biometric-templates/count.md) चलाएँ।

## उदाहरण

> [tab] आईडी के अनुसार
>
> ```bash theme={null}
> curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"template_uuids": ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"]}'
> ```

> [tab] एक उपयोगकर्ता के सभी टेम्पलेट
>
> ```bash theme={null}
> curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"delete_all": true, "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f"}'
> ```

> [tab] एप्लिकेशन के सभी टेम्पलेट
>
> ```bash theme={null}
> curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \
>   -H "x-api-key: YOUR_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"delete_all": true}'
> ```

```json theme={null}
{
  "results": [
    { "uuid": "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "outcome": "purged" },
    { "uuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "outcome": "already_purged" }
  ]
}
```

टेम्पलेट एक-एक करके पर्ज किए जाते हैं; हर परिणाम `purged` या `already_purged` दर्ज करता है। यदि कोई बायोमेट्रिक स्टोर उपलब्ध नहीं है, तो पहले विफल टेम्पलेट पर कॉल `503` लौटाती है; उसी अनुरोध में पहले पर्ज किए गए टेम्पलेट पर्ज ही रहते हैं, और विफल टेम्पलेट `purge_failed` पर चला जाता है (मिलान से बाहर रखा जाता है)। अनुरोध दोबारा भेजने पर काम पूरा हो जाता है।

## त्रुटियाँ

| स्थिति | कब | बॉडी |
| - | - | - |
| `400` | न `template_uuids` दिया गया है, न `delete_all: true` | `{"template_uuids": ["This field is required unless delete_all is true."]}` |
| `400` | कोई अमान्य फ़िल्टर मान, या `retained_to` का `retained_from` से पहले होना | फ़ील्ड-आधारित सत्यापन त्रुटियाँ |
| `403` | कंसोल उपयोगकर्ता का टोकन इस्तेमाल किया गया हो, या API कुंजी को अनुमति न हो | `{"detail": "You do not have permission to perform this action."}` |
| `503` | एक बायोमेट्रिक स्टोर उपलब्ध नहीं था; अनुरोध दोबारा भेजें | `{"detail": "The biometric-template operation could not finish because an external store is unavailable. The operation is retryable."}` |


## OpenAPI

````yaml hi/openapi-25.json POST /v3/biometric-templates/delete/
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/delete/:
    post:
      tags:
        - Biometric Templates
      summary: प्रतिधारित बायोमेट्रिक टेम्पलेट को बल्क में हटाएं
      description: >-
        सत्र हटाए जाने पर एक ऑप्ट-इन एप्लिकेशन उपयोगकर्ता से जुड़ा हुआ, अलग से
        प्रबंधित और छवि-रहित चेहरे का बायोमेट्रिक टेम्पलेट रखता है (देखें
        `DELETE /v3/session/{sessionId}/delete/`)। टेम्पलेट सीमित `expires_at`
        वाले बायोमेट्रिक डेटा होते हैं; इनमें कभी भी छवियां, सत्र डेटा या पहचान
        फ़ील्ड नहीं होते हैं, और उपयोगकर्ता हटाए जाने, गोपनीयता मिटाए जाने,
        समाप्ति या स्पष्ट पर्ज पर इन्हें पर्ज कर दिया जाता है। ये endpoint केवल
        एप्लिकेशन API कुंजी (`x-api-key`) स्वीकार करते हैं; Business Console
        उपयोगकर्ता token `403` के साथ अस्वीकार कर दिए जाते हैं।


        एक निर्दिष्ट id सूची द्वारा या `delete_all: true` के साथ एक ही कॉल में
        कई टेम्पलेट्स को पर्ज करता है, जिसे वैकल्पिक रूप से सूची endpoint के
        समान फ़िल्टर द्वारा सीमित किया जा सकता है। टेम्पलेट्स को एक-एक करके पर्ज
        किया जाता है और प्रत्येक परिणाम `purged` या `already_purged` रिपोर्ट
        करता है। यदि कोई बायोमेट्रिक स्टोर अनुपलब्ध है, तो कॉल पहले विफल होने
        वाले टेम्पलेट पर `503` लौटाता है: अनुरोध में पहले पर्ज किए गए टेम्पलेट
        पर्ज ही रहते हैं, विफल टेम्पलेट `purge_failed` स्थिति में चला जाता है
        (वह पहले से ही मिलान से बाहर है), और अनुरोध को दोहराने से कार्य पूरा हो
        जाता है।


        **बिना फ़िल्टर के `delete_all: true` एप्लिकेशन के प्रत्येक बायोमेट्रिक
        टेम्पलेट को पर्ज कर देता है और इसे पूर्ववत नहीं किया जा सकता है।** पहले
        समान फ़िल्टर के साथ काउंट endpoint चलाएं।
      operationId: bulk_purge_biometric_templates
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                template_uuids:
                  type: array
                  items:
                    type: string
                    format: uuid
                  minItems: 1
                  description: >-
                    पर्ज किए जाने वाले टेम्पलेट। तब तक आवश्यक है जब तक
                    `delete_all` का मान `true` न हो। पहले से पर्ज की गई ID को
                    `already_purged` के रूप में रिपोर्ट किया जाता है।
                delete_all:
                  type: boolean
                  default: false
                  description: >-
                    जब `true` होता है, तो नीचे दिए गए फ़िल्टर से मेल खाने वाले
                    प्रत्येक टेम्पलेट को हटा देता है (कोई फ़िल्टर न दिए जाने पर
                    एप्लिकेशन के सभी टेम्पलेट)। `template_uuids` को अनदेखा कर
                    दिया जाता है। अपरिवर्तनीय।
                vendor_data:
                  type: string
                  description: >-
                    केवल `delete_all` के साथ: स्वामित्व वाले उपयोगकर्ता के
                    `vendor_data` पर केस-इंसेंसिटिव सबस्ट्रिंग मिलान।
                vendor_user_uuid:
                  type: string
                  format: uuid
                  description: >-
                    केवल `delete_all` के साथ: स्वामित्व वाले उपयोगकर्ता पर सटीक
                    मिलान।
                status:
                  type: string
                  enum:
                    - pending
                    - active
                    - expired
                    - held_out_of_use
                    - purge_pending
                    - purge_failed
                  description: केवल `delete_all` के साथ।
                source_type:
                  type: string
                  enum:
                    - session_delete
                    - automatic_retention
                    - backfill
                  description: केवल `delete_all` के साथ।
                retained_from:
                  type: string
                  format: date-time
                  description: केवल `delete_all` के साथ।
                retained_to:
                  type: string
                  format: date-time
                  description: >-
                    केवल `delete_all` के साथ। `retained_from` से पहले का नहीं
                    होना चाहिए।
            examples:
              By id:
                value:
                  template_uuids:
                    - 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
                    - 1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d
              Every template of one User:
                value:
                  delete_all: true
                  vendor_user_uuid: 2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f
              Every template in the application:
                value:
                  delete_all: true
      responses:
        '200':
          description: प्रति-टेम्पलेट पर्ज परिणाम।
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                          format: uuid
                        outcome:
                          type: string
                          enum:
                            - purged
                            - already_purged
              examples:
                Mixed:
                  value:
                    results:
                      - uuid: 9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b
                        outcome: purged
                      - uuid: 1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d
                        outcome: already_purged
        '400':
          description: सत्यापन त्रुटि — कुछ भी पर्ज नहीं किया गया है।
          content:
            application/json:
              examples:
                Missing selector:
                  value:
                    template_uuids:
                      - This field is required unless delete_all is true.
                Bad range:
                  value:
                    retained_to:
                      - Must be on or after retained_from.
        '403':
          description: >-
            कंसोल उपयोगकर्ता token, या API कुंजी की अनुमति नहीं है। ये endpoints
            केवल एप्लिकेशन API कुंजियों को स्वीकार करते हैं।
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '503':
          description: >-
            बायोमेट्रिक टेम्पलेट को बनाए रखने या हटाने के दौरान एक बायोमेट्रिक
            स्टोर अनुपलब्ध था। कुछ भी हटाया नहीं गया है; वही अनुरोध दोहराएं।
            पुनः प्रयास आइडेम्पोटेंट होते हैं और एक ही टेम्पलेट पर कन्वर्ज होते
            हैं।
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Retryable:
                  value:
                    detail: >-
                      The biometric-template operation could not finish because
                      an external store is unavailable. The operation is
                      retryable.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            https://verification.didit.me/v3/biometric-templates/delete/ \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"delete_all": true, "vendor_user_uuid": "2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.biometric_templates.batch_delete(
                template_uuids=["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"],
            )
            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.batchDelete({
              template_uuids: ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"],
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.BatchDelete(ctx, didit.BiometricTemplatesBatchDeleteParams{\n\tTemplateUUIDs: didit.Some([]string{\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.util.List;

            import me.didit.Didit;

            import me.didit.types.BiometricTemplatesBatchDeleteParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.biometricTemplates().batchDelete(BiometricTemplatesBatchDeleteParams.builder()
                    .templateUuids(List.of("9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"))
                    .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->biometricTemplates->batchDelete([
                'template_uuids' => ['9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b', '1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result = didit.biometric_templates.batch_delete(template_uuids:
            ["9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b",
            "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d"])

            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.BatchDeleteAsync(new
            BiometricTemplatesBatchDeleteParams

            {
                TemplateUuids = new string[] { "9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b", "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        आपकी एप्लिकेशन की API कुंजी, Business Console में Developers -> API keys
        से। प्राथमिक कुंजी के पास पूर्ण एक्सेस होता है। एक नामित कुंजी को स्कोप
        किया जा सकता है: प्रति संसाधन none, read या write, कुछ वर्कफ़्लो या
        स्वीकृत सत्रों तक सीमित, IP पतों की सूची तक सीमित, और समाप्ति तिथि तक
        सीमित। 401 का अर्थ है कि कुंजी गलत है, निरस्त कर दी गई है या उसकी
        समय-सीमा समाप्त हो गई है; 403 का अर्थ है कि कोई कुंजी नहीं भेजी गई थी,
        कुंजी के पास इस संसाधन या कार्रवाई का एक्सेस नहीं है, या अनुरोध उसकी IP
        सूची से बाहर के पते से आया था; सत्र रूट पर 404 का अर्थ है कि सत्र कुंजी
        के वर्कफ़्लो या स्थितियों से बाहर है। मीडिया एक्सेस के बिना एक कुंजी को
        छवि, वीडियो और PDF URL null के रूप में प्राप्त होते हैं, और सत्र write
        के बिना एक कुंजी को सत्र लिंक और token null के रूप में प्राप्त होते हैं।
        देखें https://docs.didit.me/console/api-keys।

````

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