Database Validation (USA)

Database Validation (USA)

Call this API to verify a US National ID (SSN) against the credit-bureau database with a pure API integration. The verification compares the submitted identity attributes against the database record.

  • Get an access token: Token Authentication API
  • Prepare a unique bizId for the business transaction
  • Prepare a unique userId for the user being verified
  • Set region, numberType, numberValue, and provide data.firstName + data.lastName + data.birthday (required); data.address, data.phoneNumber / data.phone, and data.email are optional

Request Example:

curl -X POST \
  https://sg-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/api/database-id-verification \
  -H 'Content-Type: application/json' \
  -H 'X-ACCESS-TOKEN:{Your Access Token}' \
  -d '{
    "bizId": "biz_us_001",
    "userId": "user_us_001",
    "region": "USA",
    "numberType": "NATIONALID",
    "numberValue": "123456789",
    "data": {
      "firstName": "JOHN",
      "lastName": "DOE",
      "birthday": "1990/01/01",
      "phoneNumber": "+15550101000",
      "email": "[email protected]",
      "address": {
        "street1": "123 Sample Street",
        "street2": "Unit 4",
        "city": "New York",
        "region": "NY",
        "postalCode": "10001"
      }
    }
  }'

Request Url

https://sg-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/api/database-id-verification
POST (application/json)

Request Header Parameters

ParameterDescription
X-ACCESS-TOKENstring Please use Token Authentication API to get your access token.

Request Parameters

ParameterDescription
bizIdstring The unique business ID for the transaction that triggered this verification, such as an order ID. Must be non-empty and no longer than 99 characters.
userIdstring The unique user ID for the user performing the verification. Must be non-empty and no longer than 200 characters.
regionstring The supported service region. Refer to ISO ALPHA-3 Country Code. For US verification, must be USA.
numberTypestring The identity number type. Case-sensitive — must be uppercase. See Supported numberType. Any value not in the supported set (or lowercase such as nationalid) will be rejected with PARAMETER_ERROR / Number type and country are not match.
numberValuestring Required. US National ID (SSN). Must be exactly 9 pure digits (\d{9}). Separators such as - or spaces are not accepted and will be rejected with PARAMETER_ERROR / Invalid ID number,please check the format.
dataobject Extended data object for additional verification parameters.
data.firstNamestring Required. Given name.
data.lastNamestring Required. Family name / surname.
data.birthdaystring Required. Date of birth in yyyy/MM/dd format.
data.addressstring or object (optional) Address. A plain string is treated as street line 1. An object may include: street1 , street2 , city, region , postalCode .
data.phoneNumberstring (optional) Phone number.
data.emailstring (optional) Email address.

Supported numberType

numberTyperegionnumberValue formatDescription
NATIONALIDUSAExactly 9 digits (123456789). No dashes or spaces.United States National ID (SSN)

Response Description

ParameterDescription
codeResponse Code.
transactionIdThe request ID of this API call. The max length is 64.
pricingStrategyDeprecated, always returns FREE.
messageStatus Code Explanation.
dataobject The business result of the verification.

Response.data

FieldDescription
signatureIdThe business ID of this verification.
overallResultOverall verification result. One of PASS or FAIL or INCOMPLETE.
errorCodeBusiness-level error code when overallResult is not PASS. Returns an empty string when overallResult is PASS. Possible values: INFO_MISMATCH, INVALID_FORMAT, ERROR.
docDatabaseDetailobject Person information returned by the database when overallResult is PASS. Returns null for non-PASS outcomes (mismatch / incomplete / format failure).

Response.data.docDatabaseDetail

Returned only when overallResult is PASS.

FieldDescription
firstNamestring Given name from the database record.
lastNamestring Family name / surname from the database record.
fullNamestring Full name. If the vendor does not return it, it may be composed from firstName + lastName.
birthdaystring Date of birth, normalized to yyyy/MM/dd.
addressstring Address text returned by the database.
postalCodestring Postal / ZIP code.
statestring State code, for example NY.
streetstring Street line returned by the database.

Response.code

This API returns two layers of status codes. The top-level code only reflects infrastructure-level or request-level failures. Business verification results, including vendor mismatches and vendor failures, are returned in data.overallResult and data.errorCode when the top-level code is SUCCESS.

Top-level code

Status CodeMessage
SUCCESSOK. The request reached business processing. The actual verification result is returned in data.overallResult and data.errorCode.
PARAMETER_ERRORBizId is wrong
BizId is too long
UserId is invalid
The userId length cannot exceed 200.
Region is wrong
Number type is empty
Number type is wrong
Number type and country are not match (numberType not in supported set for the region, or not uppercase, or region/numberType combination not allowed for US)
Invalid ID number,please check the format (numberValue is missing, or not exactly 9 digits)
Invalid input,please check the format (data.firstName / data.lastName missing, or birthday/dateOfBirth missing / not yyyy/MM/dd / not a valid calendar date)
IAM_FAILEDIAM check failed
ERRORServer error

data.errorCode

This section applies only when the top-level code is SUCCESS.

errorCodeoverallResultDescription
""PASSDatabase lookup succeeded and the submitted information matches the record. docDatabaseDetail contains the matched person fields.
INFO_MISMATCHFAILSubmitted identity attributes do not match the database record (vendor non-match / partial match). docDatabaseDetail is null.
INVALID_FORMATFAILDownstream rejected the payload as invalid format / empty required fields after the request passed local parameter checks. docDatabaseDetail is null.
ERRORINCOMPLETEThe vendor call failed, timed out, or returned an unhandled / processing status (e.g. registry unavailable). docDatabaseDetail is null.

Response Examples

SUCCESS

pass

{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "a1b2c3d4e5f6g7h8",
        "overallResult": "PASS",
        "errorCode": "",
        "docDatabaseDetail": {
            "firstName": "John",
            "lastName": "Doe",
            "fullName": "John Doe",
            "birthday": "1990/01/01",
            "address": "123 Sample Street",
            "postalCode": "10001",
            "state": "NY",
            "street": "123 Sample Street Unit 4"
        }
    },
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

info mismatch

{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "a1b2c3d4e5f6g7h8",
        "overallResult": "FAIL",
        "errorCode": "INFO_MISMATCH",
        "docDatabaseDetail": null
    },
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

invalid format (downstream)

{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "a1b2c3d4e5f6g7h8",
        "overallResult": "FAIL",
        "errorCode": "INVALID_FORMAT",
        "docDatabaseDetail": null
    },
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

incomplete

{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "a1b2c3d4e5f6g7h8",
        "overallResult": "INCOMPLETE",
        "errorCode": "ERROR",
        "docDatabaseDetail": null
    },
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

PARAMETER_ERROR

invalid national id number

{
    "code": "PARAMETER_ERROR",
    "message": "Invalid ID number,please check the format",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

required field missing (firstName / lastName / birthday) or invalid birthday format

{
    "code": "PARAMETER_ERROR",
    "message": "Invalid input,please check the format",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

bizId is wrong

{
    "code": "PARAMETER_ERROR",
    "message": "BizId is wrong",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

bizId is too long

{
    "code": "PARAMETER_ERROR",
    "message": "BizId is too long",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

userId is invalid

{
    "code": "PARAMETER_ERROR",
    "message": "UserId is invalid",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

userId is too long

{
    "code": "PARAMETER_ERROR",
    "message": "The userId length cannot exceed 200.",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

region is wrong

{
    "code": "PARAMETER_ERROR",
    "message": "Region is wrong",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

numberType is empty

{
    "code": "PARAMETER_ERROR",
    "message": "Number type is empty",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

numberType is wrong

{
    "code": "PARAMETER_ERROR",
    "message": "Number type is wrong",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

number type and country are not match

{
    "code": "PARAMETER_ERROR",
    "message": "Number type and country are not match",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

IAM_FAILED

{
    "code": "IAM_FAILED",
    "message": "IAM check failed",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}

ERROR

{
    "code": "ERROR",
    "message": "Server error",
    "data": null,
    "extra": null,
    "transactionId": "a1b2c3d4e5f6g7h8",
    "pricingStrategy": "FREE"
}


Did this page help you?