Skip to main content

Dukcapil With FaceMatch API

This document highlights the Dukcapil with Face Match API details.

API Description

Objective

The Dukcapil with Face Match API verifies an Indonesian ID card by matching the provided selfie with official records. It returns a match result and score in the response.

InputOutput
The selfie and Indonesian ID card number of the userThe face match results, including the match status (true/false) and score
info
Dukcapil is the Indonesian government institution that handles citizenship-related services such as issuing passports, birth certificates, death certificates, and more.

API URL

https://ind-thomas.hyperverge.co/v1/dukcapilWithFacematch

API Endpoint

dukcapilWithFacematch

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

ParameterMandatory or OptionalDescriptionAllowed Values
content-type MandatoryThis parameter defines the media type for the request payloadapplication/json
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value.
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.This should be a unique value
transactionIdMandatoryA unique identifier for tracking a user journeyThis should be both unique and easily associated with the user's journey in your application(s)

Input

The following table outlines the parameter required in the API's request body:

ParameterDescriptionMandatory or OptionalAllowed ValuesDefault Value
idThe Indonesian ID card number of the userMandatoryNot ApplicableNot Applicable
imageThe selfie of the ID card holderMandatoryAllowed formats: png, jpg, jpeg, pdfNot Applicable

Request

The following code snippet demonstrates a standard curl request for the API:

curl --location --request POST 'https://ind.thomas.hyperverge.co/v1/dukcapilWithFacematch' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"id": "<Enter_the_ID>",
"image": "<Enter_the_base64_image_data>"
}'

Success Response

The following code snippet demonstrates a success response from the API:

{
"status": "success",
"statusCode": "200",
"result": {
"message": "<Message_About_The_Result>",
"details": {
"score": "<Score>",
"match": "<Match_status>",
},
"s3Url": "<S3_URL_link>"
},
},
"metaData": {
"requestId": "<Unique_Request_Identifier>",
"transactionId": "<Unique_Transaction_Identifier>"
}

Success Response Details

The following table outlines the details of the success response from the API:

ParameterTypeDescription
statusstringThe status of the API response
statusCodeintegerThe HTTP status code of the response
resultobjectThe object containing the verification results
result.statusstringThe status of the verification process
result.messageobjectThe object containing the match results
result.message.scoreintegerThe confidence score of the face match
result.message.matchbooleanIndicates whether the face match was successful
result.s3UrlstringThe URL of the input image stored in S3
metaDataobjectThe object containing metadata for the request
metaData.requestIdstringThe unique identifier for the request
metaData.transactionIdstringThe transaction ID associated with the request

Failure Responses

The following are failure responses from the API:

{
"status": "success",
"statusCode": "200",
"result": {
"status": "INVALID_REQUEST",
"message": "nik format is not valid"
}
}

Error Responses

The following are the error responses from the API:

{
"message": "Image not found",
"statusCode": 400,
"status": "failure",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Failure and Error Response Details

A failure or error response from the module contains a failure status, with a relevant status code and error message. The following table lists all error responses:

Status CodeError MessageError Description
200nik format* is not validThe request has an invalid nik format
200input image detect face failThe request is invalid as it did not detect any face
200image larger than 2MThe request is invalid as the image size is larger than 2MB
400Image not foundThe selfie of the user is missing in the API request made
400Invalid file type for: imageThe image entered is not one of the required formats: jpeg, jpg, png, or pdf
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid values
500Internal Server ErrorPlease check the request headers or contact the HyperVerge team for resolution
info
*nik format: A NIK format refers to the specific format used for an Indonesian citizen's identity card number, called "Nomor Induk Kependudukan" (NIK), which is a 16-digit code consisting of a region code, date of birth, and a serial number; essentially, it's the Indonesian equivalent of a social security number, displayed on their KTP (Kartu Tanda Penduduk) or identity card.
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: