Building a Historic Database
To run repeat user checks and fraud checks, the service requires historic data to compare against. Hence, after an instance is provisioned, it should be indexed to create a historic database.
Note: Indexing an instance is an optional step. However, the service will not produce any matches on an un-indexed instance since it does not have any a-priori information to compare against.
How a Document is Indexed
Sample Index
Recall: Fields which are indexed are specified in the instance created in the previous step.
Reusing the sample instance from the previous step, we have the following fields
Identity Owner | ID Document |
---|---|
givenName | givenName |
middleName | middleName |
familyName | familyName |
dateOfBirth | dateOfBirth |
addressLine1 | addressLine1 |
addressLine2 | addressLine2 |
dateOfExpiry | |
licenceNumber | |
passportNumber | |
issuingAuthority |
A face is always indexed from the document submitted. If a face is not found, then the service will return a validation error.
On passing the above document through our OCR service (which repeat user service internally consumes), the following data is extracted,
{
"documentType": "DRIVERS_LICENCE",
"countryCode": "AUS",
"pageCount": "1",
"confidence": 0.99,
"textract": [
{
"key": "givenName",
"value": "Sam",
"confidence": "0.99"
},
{
"key": "middleName",
"value": "Sample",
"confidence": "0.99"
},
{
"key": "familyName",
"value": "Sample",
"confidence": "0.99"
},
{
"key": "dateOfBirth",
"value": "1980-01-01",
"confidence": "0.99"
},
{
"key": "dateOfExpiry",
"value": "2022-03-03",
"confidence": "0.99"
},
{
"key": "licenceNumber",
"value": "123456789",
"confidence": "0.99"
},
{
"key": "addressLine1",
"value": "",
"confidence": 0.0
},
{
"key": "addressLine2",
"value": "",
"confidence": 0.0
}
]
}
The above extracted data is mapped to identity owner and ID document fields, which is then hashed. The resultant indexed record will be,
{
"instanceId": "1234-5678-1256",
"externalAttributes": {},
"recordId": "12345",
"identityOwner": {
"face": {
"faceId": "Face1234",
"collectionId": "collection1",
"confidence": 0.99
},
"fields": [
{
"key": "givenName",
"value": "e96e02d8e47f2a7c03be5117b3ed175c52aa30fb22028cf9c96f261563577605",
"confidence": 0.99
},
{
"key": "middleName",
"value": "af2bdbe1aa9b6ec1e2ade1d694f41fc71a831d0268e9891562113d8a62add1bf",
"confidence": 0.99
},
{
"key": "familyName",
"value": "af2bdbe1aa9b6ec1e2ade1d694f41fc71a831d0268e9891562113d8a62add1bf",
"confidence": 0.99
},
{
"key": "dateOfBirth",
"value": "ace3fca547f2115d71ef02a4a0835642e6f38e97f843f1c5f001ce9059c5c442",
"confidence": 0.99
},
{
"key": "addressLine1",
"value": null,
"confidence": 0.0
},
{
"key": "addressLine2",
"value": null,
"confidence": 0.0
}
]
},
"idDocument": {
"face": {
"faceId": "Face1234",
"collectionId": "collection1",
"confidence": 0.99
},
"fields": [
{
"key": "givenName",
"value": "e96e02d8e47f2a7c03be5117b3ed175c52aa30fb22028cf9c96f261563577605",
"confidence": 0.99
},
{
"key": "middleName",
"value": "af2bdbe1aa9b6ec1e2ade1d694f41fc71a831d0268e9891562113d8a62add1bf",
"confidence": 0.99
},
{
"key": "familyName",
"value": "af2bdbe1aa9b6ec1e2ade1d694f41fc71a831d0268e9891562113d8a62add1bf",
"confidence": 0.99
},
{
"key": "dateOfBirth",
"value": "ace3fca547f2115d71ef02a4a0835642e6f38e97f843f1c5f001ce9059c5c442",
"confidence": 0.99
},
{
"key": "addressLine1",
"value": null,
"confidence": 0.0
},
{
"key": "addressLine2",
"value": null,
"confidence": 0.0
},
{
"key": "dateOfExpiry",
"value": "fa43b1cef4f133b9b7e3a81dec96eca4455eb15a82de15676954fcc8607cc0cb",
"confidence": 0.99
},
{
"key": "licenceNumber",
"value": "15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225",
"confidence": 0.99
},
{
"key": "passportNumber",
"value": null,
"confidence": 0.0
},
{
"key": "issuingAuthority",
"value": null,
"confidence": 0.0
},
]
},
"traceId": "4242ecfa-91a1-4aca-86a1-b6fdc3c3fc3f",
"timestamp": "1998-12-23T11:47:15.140Z"
}
{
"instanceId": "1234-5678-1256",
"externalAttributes": {},
"recordId": "12345",
"identityOwner": {
"face": {
"faceId": "Face1234",
"collectionId": "collection1",
"confidence": 0.99
},
"fields": [
{
"key": "givenName",
"value": "Sam",
"confidence": 0.99
},
{
"key": "middleName",
"value": "Sample",
"confidence": 0.99
},
{
"key": "familyName",
"value": "Sample",
"confidence": 0.99
},
{
"key": "dateOfBirth",
"value": "1980-01-01",
"confidence": 0.99
},
{
"key": "addressLine1",
"value": null,
"confidence": 0.0
},
{
"key": "addressLine2",
"value": null,
"confidence": 0.0
}
]
},
"idDocument": {
"face": {
"faceId": "Face1234",
"collectionId": "collection1",
"confidence": 0.99
},
"fields": [
{
"key": "givenName",
"value": "Sam",
"confidence": 0.99
},
{
"key": "middleName",
"value": "Sample",
"confidence": 0.99
},
{
"key": "familyName",
"value": "Sample",
"confidence": 0.99
},
{
"key": "dateOfBirth",
"value": "1980-01-01",
"confidence": 0.99
},
{
"key": "addressLine1",
"value": null,
"confidence": 0.0
},
{
"key": "addressLine2",
"value": null,
"confidence": 0.0
},
{
"key": "dateOfExpiry",
"value": "2022-03-03",
"confidence": 0.99
},
{
"key": "licenceNumber",
"value": "123456789",
"confidence": 0.99
},
{
"key": "passportNumber",
"value": null,
"confidence": 0.0
},
{
"key": "issuingAuthority",
"value": null,
"confidence": 0.0
},
]
},
"traceId": "4242ecfa-91a1-4aca-86a1-b6fdc3c3fc3f",
"timestamp": "1998-12-23T11:47:15.140Z"
}
Address, passport number and issuing authority are not extracted from the above document since they are missing from the document. These fields are indexed as null.
Additionally, the response of Index Record API is stateless. Since the values are hashed when stored in the historic database, this response can never be regenerated.
Refer to the Index Records API for further details.
Updated 11 months ago