Dukcapil Validation Sandbox API

Only for integration test. Sandbox check results are pre-determined you won't be charged for checks in sandbox. Access Key and token are generated from IdentifAI admin.

Sandbox and Live Differences

This particular Rest API is only applicable for integration testing only, not intended for live production. Because this Sandbox API is intended for simulation purposes, the payload response for the similarity result will be expressed with a random number. If you'd like to find out more about our AI engine's performance, please visit section API documentation.

The key differences between sandbox and live checks are:

  • sandbox check data is not processed by the Dukcapil gateway service — this means that sandbox responses are faster than live responses and the result of similarity comes from Nodeflux Server.

  • sandbox check results are pre-determined

  • sandbox applicants are isolated from the live environment

  • you won't be charged for checks in the sandbox

Notes for authorization header:

  • Please use this authorization key: NODEFLUX-HMAC-SHA256 Credential=99PUNS2OETT3WX63JI7C2XXI3/20210128/nodeflux.api.v1beta1.ImageAnalytic/StreamImageAnalytic, SignedHeaders=x-nodeflux-timestamp, Signature=6af43efaa635f9e6ed9c7e51a0ad408c8dfca353c8928d2f997c9ade1af69cee

  • Use this x-nodeflux-timestamp : 20210128T112002Z

post
Dukcapil Validation Sandbox API

https://api.cloud.nodeflux.io/v1/analytics/dukcapil-validation
This endpoint allows you to get a free trial Dukcapil Validation for integration of this endpoint to hit the sandbox environment. You do not need to do authorization to use this particular Sandbox API.
Request
Response
Request
Headers
Authorization
required
string
"authorization key (please use authorization key in the notes above)"
x-nodeflux-timestamp
required
string
"please use nodeflux timestamp in the notes above"
Content-Type
required
string
application/json
Body Parameters
images
required
string
The base64 encoded image jpeg string and it should follow the data URI scheme format
nik
optional
string
16 digit of NIK (Citizen ID number)
transaction_id
optional
string
random transaction-id
transaction_source
optional
string
Device for requesting API
Response
200: OK
Face Matching Success
{
"job": {
"id": <job_id>,
"result": {
"status": "success",
"analytic_type": "DUKCAPIL_VALIDATION",
"result": [
{
"dukcapil_validation": {
"similarity": 0.8
}
}
]
}
},
"message": "Dukcapil Validation Success",
"ok": true
}

Request Body

The request body should follow this format:

{
"additional_params":{
"nik": "{16 digits of NIK}",
"transaction_id": "{random digit}",
"transaction_source": "{device}"
},
"images": [
"{INSERT_JPEG_IMAGE_AS_BASE64_STRING_FOR_SELFIE_PHOTO}"
]
}

Example

Predetermined Positive Response

To help you test integration in the sandbox API, you can trigger pre-determined report responses by changed the NIK parameter that give you a random result of similarity result.

{
"additional_params": {
"nik": "3515176106970002",
"transaction_id": "3174096112900001",
"transaction_source": "mobile"
},
"images": [
"data:image/jpeg;base64,iVB\
ORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEU\
AAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8\
yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAEl\
FTkSuQmCC"
]
}

The base64 encoded jpeg string should follow the data URI scheme format. See below:

data:[<media type>][;base64],<data>

Predetermined Error Response Example

4xx: Invalid Response from Gateway

To test the negative response for error code 4xx Invalid Response from Gateway, input this NIK:7654321098765432, then you will get this response:

{
"job": {
"id": <job_id>,
"result": {
"status": "incompleted",
"analytic_type": "DUKCAPIL_VALIDATION",
"result": []
}
},
"message": "Invalid Response from Gateway",
"ok": true
}

5xx: Dukcapil Gateway Not Responding

To test the negative response for error code 5xx Dukcapil Gateway Not Responding, input this NIK:1111111111111111, then you will get this response:

{
"job": {
"id": <job_id>,
"result": {
"status": "failed",
"analytic_type": "DUKCAPIL_VALIDATION",
"result": []
}
},
"message": "Gateway not Responding",
"ok": true
}