> ## 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：ID 匹配

> Didit 提供基于权威数据源的新加坡征信局数据库核验，身份验证一步完成。按次计费，单价 $4.35 起，无合同、无最低消费。

根据从新加坡征信机构获取的 Credit Header 数据验证输入数据。Didit 通过 `POST /v3/database-validation/` 提供此服务，使您能够将提交的数据与权威数据源进行核对，并获得标准化的匹配结果。

## 覆盖范围

* **覆盖范围：** 未公开
* **国家/地区：** 新加坡
* **服务 ID：** `sgp_credit_bureau`
* **数据领域：** 金融
* **类别：** CreditBureau

## 输入项

| 字段 | 必填 | 示例 |
| - | -: | - |
| `full_name` | 是 | `John Doe` |
| `date_of_birth` | 是 | `1990-01-01` |
| `address.street_1` | 是 | `123 Sample Street` |
| `address.postal_code` | 是 | `10001` |
| `national_id` | 是 | `SAMPLE-NID-12345` |
| `address.street_2` | 否 | `Unit 4` |
| `address.city` | 否 | `Sample City` |
| `address.region` | 否 | `Sample State` |
| `vendor_data` | 否 | `user-1234` |

* **必填输入项：** `full_name`、`date_of_birth`、`address.street_1`、`address.postal_code`、`national_id`
* **可选输入项：** `address.street_2`、`address.city`、`address.region`、`vendor_data`
* **同意：** 必需
* **工作流可用性：** 可在工作流中使用
* **覆盖范围：** 未公开
* **价格：** 每次成功查询 \$4.35

## 请求体参数

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

此数据库服务的 ISO 3166-1 alpha-3 国家代码。

示例：`SGP`

**services** `string` *required* (default: sgp\_credit\_bureau)

包含此服务 ID 的数组。固定服务 ID 可将请求限定在该特定数据库内。

示例：`sgp_credit_bureau`

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

终端用户对此服务的明确同意。

示例：`true`

**full\_name** `string` *required* (default: John Doe)

需要验证的法定全名。

示例：`John Doe`

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

`YYYY-MM-DD` 格式的出生日期。

示例：`1990-01-01`

**address** `object` *required* (default: \{"street\_1":"123 Sample Street","street\_2":"Unit 4","city":"Sample City","region":"Sample State","postal\_code":"10001","country":"US"})

结构化的居住地址对象。请使用 `street_1`、`street_2`、`city`、`region`、`postal_code` 和 `country`。仍接受完整的旧式地址字符串，但不推荐使用。

示例：`{"street_1":"123 Sample Street","street_2":"Unit 4","city":"Sample City","region":"Sample State","postal_code":"10001","country":"US"}`

**national\_id** `string` *required* (default: SAMPLE-NID-12345)

此服务所用的国民身份号码。

示例：`SAMPLE-NID-12345`

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

您为该用户设定的稳定用户标识，例如您内部的用户 ID。Didit 使用它将独立检查关联到同一终端用户，并减少重复检测的干扰。

示例：`user-1234`

## 输入规则与验证说明

* 对于地址类服务，尽可能发送结构化的地址字段，而不是单个 `address` 字符串。
* `address.street_1` 为街道地址，包括门牌号和街道类型。
* `address.street_2` 为公寓、单元、楼栋、楼层或其他额外地址行。仅在您有该信息时发送。
* `address.city` 为城市、郊区、区、地区或社区。
* `address.region` 为州、省、地区或城镇。
* `address.postal_code` 为邮政编码。
* 基于地址的数据库服务至少需要街道地址和邮政编码；在查询数据源之前被拒绝的请求不收费。

## 调用方法

```bash cURL theme={null}
curl -X POST "https://verification.didit.me/v3/database-validation/" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "issuing_state=SGP" \
  -F "services=sgp_credit_bureau" \
  -F "vendor_data=user-1234" \
  -F "consent=true" \
  -F "full_name=John Doe" \
  -F "date_of_birth=1990-01-01" \
  -F 'address={"street_1":"123 Sample Street","street_2":"Unit 4","city":"Sample City","region":"Sample State","postal_code":"10001","country":"US"}' \
  -F "national_id=SAMPLE-NID-12345"
```

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

# Reads DIDIT_API_KEY.
client = Didit()

result = client.database_validation.validate(
    issuing_state="SGP",
    services=["sgp_credit_bureau"],
    consent=True,
    full_name="John Doe",
    date_of_birth="1990-01-01",
    address={"street_1": "123 Sample Street", "street_2": "Unit 4", "city": "Sample City", "region": "Sample State", "postal_code": "10001", "country": "US"},
    national_id="SAMPLE-NID-12345",
    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: "SGP",
  services: ["sgp_credit_bureau"],
  consent: true,
  full_name: "John Doe",
  date_of_birth: "1990-01-01",
  address: { street_1: "123 Sample Street", street_2: "Unit 4", city: "Sample City", region: "Sample State", postal_code: "10001", country: "US" },
  national_id: "SAMPLE-NID-12345",
  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: "SGP",
	Services:     didit.Some([]string{"sgp_credit_bureau"}),
	Consent:      didit.Bool(true),
	FullName:     didit.String("John Doe"),
	DateOfBirth:  didit.String("1990-01-01"),
	Address:      didit.Some[any](map[string]any{"street_1": "123 Sample Street", "street_2": "Unit 4", "city": "Sample City", "region": "Sample State", "postal_code": "10001", "country": "US"}),
	NationalID:   didit.String("SAMPLE-NID-12345"),
	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("SGP")
        .services(List.of("sgp_credit_bureau"))
        .consent(true)
        .fullName("John Doe")
        .dateOfBirth(LocalDate.parse("1990-01-01"))
        .address(DatabaseValidationValidateParams.Address.ofVariant1(DatabaseValidationValidateParams.Address.Variant1.builder()
                .street1("123 Sample Street")
                .street2("Unit 4")
                .city("Sample City")
                .region("Sample State")
                .postalCode("10001")
                .country("US")
                .build()))
        .nationalId("SAMPLE-NID-12345")
        .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' => 'SGP',
    'services' => ['sgp_credit_bureau'],
    'consent' => true,
    'full_name' => 'John Doe',
    'date_of_birth' => '1990-01-01',
    'address' => ['street_1' => '123 Sample Street', 'street_2' => 'Unit 4', 'city' => 'Sample City', 'region' => 'Sample State', 'postal_code' => '10001', 'country' => 'US'],
    'national_id' => 'SAMPLE-NID-12345',
    '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: "SGP",
  services: ["sgp_credit_bureau"],
  consent: true,
  full_name: "John Doe",
  date_of_birth: "1990-01-01",
  address: { street_1: "123 Sample Street", street_2: "Unit 4", city: "Sample City", region: "Sample State", postal_code: "10001", country: "US" },
  national_id: "SAMPLE-NID-12345",
  vendor_data: "user-1234"
)
puts result.to_h
```

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

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

var result = await client.DatabaseValidation.ValidateAsync(new DatabaseValidationValidateParams
{
    IssuingState = "SGP",
    Services = new string[] { "sgp_credit_bureau" },
    Consent = true,
    FullName = "John Doe",
    DateOfBirth = "1990-01-01",
    Address = new Dictionary<string, object> { ["street_1"] = "123 Sample Street", ["street_2"] = "Unit 4", ["city"] = "Sample City", ["region"] = "Sample State", ["postal_code"] = "10001", ["country"] = "US" },
    NationalId = "SAMPLE-NID-12345",
    VendorData = "user-1234",
});
Console.WriteLine(JsonSerializer.Serialize(result));
```

每次成功调用都会返回 HTTP `200`。**`outcome_code`** 字段会告诉您实际发生了什么，例如，可区分真实的生物识别不匹配（`BIOMETRIC_NO_MATCH`）与无法读取的自拍照（`BIOMETRIC_IMAGE_UNUSABLE`）。页面中显示的 `status` 为默认功能状态；您配置的[部分匹配 / 无匹配操作](https://docs.didit.me/zh/core-technology/database-validation/database-validation-warnings.md)可以覆盖它。

**`MATCH`**：注册机构确认了身份，且所有被检查的字段均匹配。

```json 200 OK — MATCH theme={null}
{
  "request_id": "req_01H…",
  "status": "Approved",
  "issuing_state": "SGP",
  "match_type": "full_match",
  "validations": [
    {
      "outcome_code": "MATCH",
      "service_id": "sgp_credit_bureau",
      "service_name": "Singapore Credit Bureau",
      "source_data": {
        "address": "123 Sample Street",
        "address_match_score": "1.000",
        "city": "Sample City",
        "date_of_birth": "1990-01-01",
        "identification_number": "SAMPLE-ID-12345",
        "postal_code": "10001",
        "street": "sample_value",
        "verifications": {
          "address": true,
          "date_of_birth": true,
          "full_name": true,
          "identification_number": true
        }
      },
      "validation": {
        "address": "full_match",
        "date_of_birth": "full_match",
        "full_name": "full_match",
        "identification_number": "full_match"
      }
    }
  ]
}
```

**`PARTIAL_MATCH`**：已找到身份识别号码，但一个或多个个人字段（通常为姓名或出生日期）未完全匹配。

```json 200 OK — PARTIAL_MATCH theme={null}
{
  "request_id": "req_01H…",
  "status": "In Review",
  "issuing_state": "SGP",
  "match_type": "partial_match",
  "validations": [
    {
      "outcome_code": "PARTIAL_MATCH",
      "service_id": "sgp_credit_bureau",
      "service_name": "Singapore Credit Bureau",
      "source_data": {
        "address": "123 Sample Street",
        "address_match_score": "1.000",
        "city": "Sample City",
        "date_of_birth": "1990-01-01",
        "identification_number": "SAMPLE-ID-12345",
        "postal_code": "10001",
        "street": "sample_value",
        "verifications": {
          "address": true,
          "date_of_birth": true,
          "full_name": false,
          "identification_number": true
        }
      },
      "validation": {
        "address": "full_match",
        "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": "SGP",
  "match_type": "no_match",
  "validations": [
    {
      "outcome_code": "NO_MATCH",
      "service_id": "sgp_credit_bureau",
      "service_name": "Singapore Credit Bureau",
      "source_data": {
        "address": "NO_MATCH",
        "date_of_birth": "NO_MATCH",
        "full_name": "NO_MATCH",
        "identification_number": "NO_MATCH"
      },
      "validation": {
        "address": "no_match",
        "date_of_birth": "no_match",
        "full_name": "no_match",
        "identification_number": "no_match"
      }
    }
  ]
}
```

## 返回数据

`source_data` 中实际返回的字段取决于登记机构的返回内容。为 `sgp_credit_bureau` 生成的示例目前记录了以下标准化结构：

* `address`
* `address_match_score`
* `city`
* `date_of_birth`
* `identification_number`
* `postal_code`
* `street`

## 定价与 SLA

只有当 Didit 从核验来源收到明确的结果时，Singapore Credit Bureau 查询才会计费。

* **单次调用价格：** \$4.35 USD。
* **计费：** 按每次成功的查询计费。若登记机构无法访问、缺少必填字段，或请求在到达来源之前即被拒绝，则不收费。
* **延迟：** 典型 p95 \< 2 s。
* **可用性：** Didit 方面每季度的可用性为 99.9%；下游来源的可用性因国家/地区和数据集而异。

## 延伸阅读

* [新加坡数据库核验概览](https://docs.didit.me/api-reference/database-validation/singapore.md)
* [数据库核验概览](https://docs.didit.me/zh/core-technology/database-validation/overview.md)
* [结果代码](https://docs.didit.me/zh/core-technology/database-validation/database-validation-outcome-codes.md)


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