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

# ニュージーランド運転免許証（NZTA）認証API

> ニュージーランド運転免許証（NZTA）：Didit経由でニュージーランドの公式データベースを照会。1回$0.35からの従量課金、契約不要、最低利用額なし。

入力データをNZTAの検証サービスに照会して検証します。Diditはこのサービスを`POST /v3/database-validation/`で提供しているため、送信されたデータを公式な情報源と照合し、正規化された照合結果を受け取ることができます。

## カバレッジ

* **カバレッジ：** 100%\*
* **国：** ニュージーランド
* **サービスID：** `nzl_zealand_drivers_licence`
* **データ領域：** 書類
* **カテゴリ：** DriverLicence

## 入力

| フィールド | 必須 | 例 |
| - | -: | - |
| `first_name` | はい | `John` |
| `last_name` | はい | `Doe` |
| `date_of_birth` | はい | `1990-01-01` |
| `driver_license_number` | はい | `SAMPLE-DL-12345` |
| `driver_license_version` | はい | `1` |
| `vendor_data` | いいえ | `user-1234` |

* **必須の入力：** `first_name`、`last_name`、`date_of_birth`、`driver_license_number`、`driver_license_version`
* **任意の入力：** `vendor_data`
* **同意：** 必須
* **ワークフローでの利用：** ワークフローで利用可能
* **カバレッジ：** 100%\*
* **料金：** 成功したクエリ1件あたり\$0.35

## ボディパラメーター

**issuing\_state** `string` *required* (default: NZL)

このデータベースサービスのISO 3166-1 alpha-3国コードです。

例：`NZL`

**services** `string` *required* (default: nzl\_zealand\_drivers\_licence)

このサービスIDを含む配列です。サービスを固定することで、リクエストの対象をこのデータベースだけに限定できます。

例：`nzl_zealand_drivers_licence`

**consent** `boolean` *required* (default: true)

このサービスに対するエンドユーザーの明示的な同意です。

例：`true`

**first\_name** `string` *required* (default: John)

検証する名です。

例：`John`

**last\_name** `string` *required* (default: Doe)

検証する姓です。

例：`Doe`

**date\_of\_birth** `string` *required* (default: 1990-01-01)

`YYYY-MM-DD`形式の生年月日です。

例：`1990-01-01`

**driver\_license\_number** `string` *required* (default: SAMPLE-DL-12345)

運転免許証番号です。

例：`SAMPLE-DL-12345`

**driver\_license\_version** `string` *required* (default: 1)

このデータベースサービスで必須の`driver_license_version`の値です。

例：`1`

**vendor\_data** `string` (default: user-1234)

社内のユーザーIDなど、この人物に対して一貫して使用するユーザー参照です。Diditはこれを使って個別のチェックを同じエンドユーザーに紐付け、重複検出のノイズを減らします。

例：`user-1234`

## 入力ルールと検証に関する注意事項

* 上記のフィールドは、ユーザーまたは書類から取得したとおりにそのまま送信してください。
* Diditはデータベースを照会する前に必須フィールドを検証します。情報源への照会前に拒否されたリクエストには課金されません。

## 呼び出し方法

```bash cURL theme={null}
curl -X POST "https://verification.didit.me/v3/database-validation/" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "issuing_state=NZL" \
  -F "services=nzl_zealand_drivers_licence" \
  -F "vendor_data=user-1234" \
  -F "consent=true" \
  -F "first_name=John" \
  -F "last_name=Doe" \
  -F "date_of_birth=1990-01-01" \
  -F "driver_license_number=SAMPLE-DL-12345" \
  -F "driver_license_version=1"
```

```python Python theme={null}
from didit import Didit

# Reads DIDIT_API_KEY.
client = Didit()

result = client.database_validation.validate(
    issuing_state="NZL",
    services=["nzl_zealand_drivers_licence"],
    consent=True,
    first_name="John",
    last_name="Doe",
    date_of_birth="1990-01-01",
    driver_license_number="SAMPLE-DL-12345",
    driver_license_version="1",
    vendor_data="user-1234",
)
print(result)
```

```javascript Node.js theme={null}
import Didit from "@didit-protocol/sdk-node";

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

const result = await didit.databaseValidation.validate({
  issuing_state: "NZL",
  services: ["nzl_zealand_drivers_licence"],
  consent: true,
  first_name: "John",
  last_name: "Doe",
  date_of_birth: "1990-01-01",
  driver_license_number: "SAMPLE-DL-12345",
  driver_license_version: "1",
  vendor_data: "user-1234",
});
console.log(result);
```

```go Go theme={null}
ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()

result, err := client.DatabaseValidation.Validate(ctx, didit.DatabaseValidationValidateParams{
	IssuingState:         "NZL",
	Services:             didit.Some([]string{"nzl_zealand_drivers_licence"}),
	Consent:              didit.Bool(true),
	FirstName:            didit.String("John"),
	LastName:             didit.String("Doe"),
	DateOfBirth:          didit.String("1990-01-01"),
	DriverLicenseNumber:  didit.String("SAMPLE-DL-12345"),
	DriverLicenseVersion: didit.String("1"),
	VendorData:           didit.String("user-1234"),
})
if err != nil {
	log.Fatal(err)
}
fmt.Printf("%+v\n", result)
```

```java Java theme={null}
import java.time.LocalDate;
import java.util.List;
import me.didit.Didit;
import me.didit.types.DatabaseValidationValidateParams;

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

var result = client.databaseValidation().validate(DatabaseValidationValidateParams.builder()
        .issuingState("NZL")
        .services(List.of("nzl_zealand_drivers_licence"))
        .consent(true)
        .firstName("John")
        .lastName("Doe")
        .dateOfBirth(LocalDate.parse("1990-01-01"))
        .driverLicenseNumber("SAMPLE-DL-12345")
        .driverLicenseVersion("1")
        .vendorData("user-1234")
        .build());
System.out.println(result);
```

```php PHP theme={null}
<?php

require 'vendor/autoload.php';

use Didit\DiditClient;

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

$result = $didit->databaseValidation->validate([
    'issuing_state' => 'NZL',
    'services' => ['nzl_zealand_drivers_licence'],
    'consent' => true,
    'first_name' => 'John',
    'last_name' => 'Doe',
    'date_of_birth' => '1990-01-01',
    'driver_license_number' => 'SAMPLE-DL-12345',
    'driver_license_version' => '1',
    'vendor_data' => 'user-1234',
]);
print_r($result->toArray());
```

```ruby Ruby theme={null}
require "didit"

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

result = didit.database_validation.validate(
  issuing_state: "NZL",
  services: ["nzl_zealand_drivers_licence"],
  consent: true,
  first_name: "John",
  last_name: "Doe",
  date_of_birth: "1990-01-01",
  driver_license_number: "SAMPLE-DL-12345",
  driver_license_version: "1",
  vendor_data: "user-1234"
)
puts result.to_h
```

```csharp .NET theme={null}
using System;
using System.Text.Json;
using Didit;

// Reads DIDIT_API_KEY.
using var client = new DiditClient();

var result = await client.DatabaseValidation.ValidateAsync(new DatabaseValidationValidateParams
{
    IssuingState = "NZL",
    Services = new string[] { "nzl_zealand_drivers_licence" },
    Consent = true,
    FirstName = "John",
    LastName = "Doe",
    DateOfBirth = "1990-01-01",
    DriverLicenseNumber = "SAMPLE-DL-12345",
    DriverLicenseVersion = "1",
    VendorData = "user-1234",
});
Console.WriteLine(JsonSerializer.Serialize(result));
```

成功した呼び出しはすべてHTTP `200`を返します。実際に何が起きたかは**`outcome_code`**フィールドで判断できます。たとえば、実際の生体情報の不一致(`BIOMETRIC_NO_MATCH`)と、セルフィーを読み取れなかった場合(`BIOMETRIC_IMAGE_UNUSABLE`)を区別できます。表示される`status`は機能のデフォルトのステータスであり、設定済みの[部分一致/不一致時のアクション](https://docs.didit.me/ja/core-technology/database-validation/database-validation-warnings.md)によって上書きされる場合があります。

**`MATCH`**：レジストリが本人であることを確認し、チェックしたすべてのフィールドが一致しました。

```json 200 OK — MATCH theme={null}
{
  "request_id": "req_01H…",
  "status": "Approved",
  "issuing_state": "NZL",
  "match_type": "full_match",
  "validations": [
    {
      "outcome_code": "MATCH",
      "service_id": "nzl_zealand_drivers_licence",
      "service_name": "New Zealand Drivers Licence (NZTA)",
      "source_data": {
        "date_of_birth": "1990-01-01",
        "first_name": "John",
        "full_name": "John Doe",
        "identification_number": "SAMPLE-ID-12345",
        "last_name": "Doe",
        "name_match_score": "1.000",
        "verifications": {
          "date_of_birth": true,
          "full_name": true,
          "identification_number": true
        }
      },
      "validation": {
        "date_of_birth": "full_match",
        "full_name": "full_match",
        "identification_number": "full_match"
      }
    }
  ]
}
```

**`PARTIAL_MATCH`**：識別番号は見つかりましたが、1つ以上の個人情報フィールド(通常は氏名または生年月日)が完全には一致しませんでした。

```json 200 OK — PARTIAL_MATCH theme={null}
{
  "request_id": "req_01H…",
  "status": "In Review",
  "issuing_state": "NZL",
  "match_type": "partial_match",
  "validations": [
    {
      "outcome_code": "PARTIAL_MATCH",
      "service_id": "nzl_zealand_drivers_licence",
      "service_name": "New Zealand Drivers Licence (NZTA)",
      "source_data": {
        "date_of_birth": "1990-01-01",
        "first_name": "John",
        "full_name": "John Doe",
        "identification_number": "SAMPLE-ID-12345",
        "last_name": "Doe",
        "name_match_score": "1.000",
        "verifications": {
          "date_of_birth": true,
          "full_name": false,
          "identification_number": true
        }
      },
      "validation": {
        "date_of_birth": "full_match",
        "full_name": "no_match",
        "identification_number": "full_match"
      }
    }
  ]
}
```

**`NO_MATCH`**：送信されたデータに一致する結果がレジストリから返されませんでした。

```json 200 OK — NO_MATCH theme={null}
{
  "request_id": "req_01H…",
  "status": "Declined",
  "issuing_state": "NZL",
  "match_type": "no_match",
  "validations": [
    {
      "outcome_code": "NO_MATCH",
      "service_id": "nzl_zealand_drivers_licence",
      "service_name": "New Zealand Drivers Licence (NZTA)",
      "source_data": {
        "date_of_birth": "NO_MATCH",
        "full_name": "NO_MATCH",
        "identification_number": "NO_MATCH"
      },
      "validation": {
        "date_of_birth": "no_match",
        "full_name": "no_match",
        "identification_number": "no_match"
      }
    }
  ]
}
```

## 返却されるデータ

`source_data`に表示される具体的なフィールドは、レジストリが返す内容によって異なります。`nzl_zealand_drivers_licence`の生成済みサンプルでは、現在次の正規化された形式が記載されています。

* `date_of_birth`
* `first_name`
* `full_name`
* `identification_number`
* `last_name`
* `name_match_score`

## 料金とSLA

New Zealand Drivers Licence(NZTA)のクエリは、Diditが検証元から確定した結果を取得した場合にのみ課金されます。

* **呼び出し1件あたりの料金：** \$0.35 USD。
* **請求：** 成功したクエリ1件ごと。レジストリに接続できない場合、必須フィールドが不足している場合、またはリクエストが情報源に到達する前に拒否された場合は課金されません。
* **レイテンシー：** 通常、p95は2秒未満です。
* **可用性：** Didit側で四半期あたり99.9%。連携先の検証元の可用性は国とデータセットによって異なります。

## 関連情報

* [ニュージーランドのデータベース検証の概要](https://docs.didit.me/api-reference/database-validation/new-zealand.md)
* [データベース検証の概要](https://docs.didit.me/ja/core-technology/database-validation/overview.md)
* [結果コード](https://docs.didit.me/ja/core-technology/database-validation/database-validation-outcome-codes.md)


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