Database Validation

Call this API to verify an identity number (e.g. BVN / NIN) directly against the authoritative national database with a pure API integration.

  • 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, and numberValue

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": "7ac66c0f148de9519b8bd264312c4d64",
    "userId": "8e44f0089b076e18a718eb9ca3d94674",
    "region": "NGA",
    "numberType": "BVN",
    "numberValue": "12345678901"
  }'

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.
numberTypestring The identity number type. Case-sensitive — must be uppercase. See Supported numberType for the full list. Any value not in the supported set (or lowercase such as bvn / nin) will be rejected with PARAMETER_ERROR / Number type and country are not match.
numberValuestring The identity number value. Format depends on numberType. See Supported numberType.

Supported numberType

New identity number types are appended to this table. numberType must match the region column exactly (uppercase).

numberTyperegionnumberValue formatDescription
BVNNGA11-digit numeric stringNigeria Bank Verification Number
NINNGA11-digit numeric stringNigeria National Identity Number

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: NUMBER_NOT_EXIST, BVN_SUSPEND, INFO_ABNORMAL, INVALID_FORMAT, ERROR.
docDatabaseDetailobject The person information returned by the authoritative database.

Response.data.docDatabaseDetail

FieldDescription
firstNamestring Given name.
middleNamestring Middle name. This field may be empty.
lastNamestring Family name or surname.
genderstring Gender returned by the database, for example Male or Female.
birthdaystring Date of birth, normalized to yyyy-MM-dd.
phoneNumber1string Primary phone number.
phoneNumber2string Secondary phone number. This field may be empty.

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 invalid number format 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 missing)
BizId is too long (bizId length exceeds 99)
UserId is invalid (userId is missing)
UserId is too long (userId length exceeds 200)
Region is wrong (missing or not a supported ISO ALPHA-3 code)
numberType is empty
numberType is wrong (length > 30 or not a supported type)
Number type and country are not match (numberType not in supported set for the region, or not uppercase)
Invalid ID number, please check the format (numberValue is empty, or fails format validation for the given numberType — e.g. BVN / NIN must be an 11-digit numeric string)
IAM_FAILEDIAM check failed
ERRORServer error

data.errorCode

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

errorCodeoverallResultDescription
""PASSDatabase lookup succeeded and returned a matching record.
INVALID_FORMATFAILnumberValue failed format validation. For example, BVN and NIN must be 11 digits.
NUMBER_NOT_EXISTFAILThe identity number does not exist in the authoritative database.
BVN_SUSPENDFAILThe BVN is suspended.
INFO_ABNORMALFAILInformation is abnormal on the authoritative database side. Retry later.
ERRORINCOMPLETEThe vendor call failed or timed out, or numberType is not supported by this solution.

Response Examples

SUCCESS

{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "ed8b21c0c87ad617",
        "overallResult": "PASS",
        "errorCode": "",
        "docDatabaseDetail": {
            "firstName": "Thomas",
            "middleName": "Alva",
            "lastName": "Edison",
            "gender": "Male",
            "birthday": "1847-02-11",
            "phoneNumber1": "2348012345678",
            "phoneNumber2": ""
        }
    },
    "extra": null,
    "transactionId": "ed8b21c0c87ad617",
    "pricingStrategy": "FREE"
}
{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "5f5496256c9ae8a6",
        "overallResult": "FAIL",
        "errorCode": "NUMBER_NOT_EXIST",
        "docDatabaseDetail": {
            "firstName": null,
            "middleName": null,
            "lastName": null,
            "gender": null,
            "birthday": null,
            "phoneNumber1": null,
            "phoneNumber2": null
        }
    },
    "extra": null,
    "transactionId": "6dcbbcd9710b7215",
    "pricingStrategy": "FREE"
}
{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "ed8b21c0c87ad617",
        "overallResult": "FAIL",
        "errorCode": "BVN_SUSPEND",
        "docDatabaseDetail": {
            "firstName": null,
            "middleName": null,
            "lastName": null,
            "gender": null,
            "birthday": null,
            "phoneNumber1": null,
            "phoneNumber2": null
        }
    },
    "extra": null,
    "transactionId": "ed8b21c0c87ad617",
    "pricingStrategy": "FREE"
}
{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "ed8b21c0c87ad617",
        "overallResult": "FAIL",
        "errorCode": "INFO_ABNORMAL",
        "docDatabaseDetail": {
            "firstName": null,
            "middleName": null,
            "lastName": null,
            "gender": null,
            "birthday": null,
            "phoneNumber1": null,
            "phoneNumber2": null
        }
    },
    "extra": null,
    "transactionId": "ed8b21c0c87ad617",
    "pricingStrategy": "FREE"
}
{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "ed8b21c0c87ad617",
        "overallResult": "INCOMPLETE",
        "errorCode": "ERROR",
        "docDatabaseDetail": {
            "firstName": null,
            "middleName": null,
            "lastName": null,
            "gender": null,
            "birthday": null,
            "phoneNumber1": null,
            "phoneNumber2": null
        }
    },
    "extra": null,
    "transactionId": "ed8b21c0c87ad617",
    "pricingStrategy": "FREE"
}
{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "ed8b21c0c87ad617",
        "overallResult": "FAIL",
        "errorCode": "INVALID_FORMAT",
        "docDatabaseDetail": null
    },
    "extra": null,
    "transactionId": "ed8b21c0c87ad617",
    "pricingStrategy": "FREE"
}

PARAMETER_ERROR

{
    "code": "PARAMETER_ERROR",
    "message": "BizId is wrong (bizId is missing)",
    "data": null,
    "extra": null,
    "transactionId": "20278fe987234752",
    "pricingStrategy": "FREE"
}
{
    "code": "PARAMETER_ERROR",
    "message": "BizId is too long (bizId length exceeds 99)",
    "data": null,
    "extra": null,
    "transactionId": "20278fe987234752",
    "pricingStrategy": "FREE"
}
{
    "code": "PARAMETER_ERROR",
    "message": "UserId is invalid (userId is missing)",
    "data": null,
    "extra": null,
    "transactionId": "0efa02349b10bd2e",
    "pricingStrategy": "FREE"
}
{
    "code": "PARAMETER_ERROR",
    "message": "UserId is too long (userId length exceeds 200)",
    "data": null,
    "extra": null,
    "transactionId": "0efa02349b10bd2e",
    "pricingStrategy": "FREE"
}
{
    "code": "PARAMETER_ERROR",
    "message": "Region is wrong (missing or not a supported ISO ALPHA-3 code)",
    "data": null,
    "extra": null,
    "transactionId": "0f74aeb4dd3f1d48",
    "pricingStrategy": "FREE"
}
{
    "code": "PARAMETER_ERROR",
    "message": "numberType is empty",
    "data": null,
    "extra": null,
    "transactionId": "2ad35b5ef69fc8c4",
    "pricingStrategy": "FREE"
}
{
    "code": "PARAMETER_ERROR",
    "message": "numberType is wrong (length > 30 or not a supported type)",
    "data": null,
    "extra": null,
    "transactionId": "2ad35b5ef69fc8c4",
    "pricingStrategy": "FREE"
}
{
    "code": "PARAMETER_ERROR",
    "message": "Number type and country are not match (numberType not in supported set for the region, or not uppercase)",
    "data": null,
    "extra": null,
    "transactionId": "2ad35b5ef69fc8c4",
    "pricingStrategy": "FREE"
}
{
    "code": "PARAMETER_ERROR",
    "message": "Invalid ID number, please check the format (numberValue is empty, or fails format validation for the given numberType — e.g. BVN / NIN must be an 11-digit numeric string)",
    "data": null,
    "extra": null,
    "transactionId": "2ad35b5ef69fc8c4",
    "pricingStrategy": "FREE"
}

IAM_FAILED

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

ERROR

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