Skip to main content

Face and ID - Enrol or Block API

This document outlines the details of the Face and ID - Enrol or Block API.

API Description

Objective

The Face and ID - Enrol or Block API adds a user's record to the deduplication database, with an option to add the application to a blocklist.

InputOutput
The details of the end user along with their selfie image.The enrolment result indicating whether the user was successfully enrolled and their dashboard URL.

API URL

https://ind-orion.hyperverge.co/v2/enrol/application

API Endpoint

enrol/application

Overview

The Face and ID - Enrol or Block 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 Face and ID - Enrol or Block API.

API Request Details

Method - POST

Headers

HeaderMandatory / OptionalDescriptionInput Format
content-typeMandatoryThis parameter defines the media type for the request payloadmultipart/form-data
appIdMandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab.Not Applicable - this is a unique value
appKeyMandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tab.Not Applicable - this is a unique value

Inputs

The following table provides the details of the parameters required for the Face and ID - Enrol or Block API's request body:

ParameterMandatory / OptionalTypeDescriptionInput FormatDefault Value
nameMandatorystringThe name of the customerNot ApplicableNot Applicable
idNumberMandatorystringThe identification number of the customer from the identity documentNot ApplicableNot Applicable
idTypeMandatorystringThe type of the identity documentNot ApplicableNot Applicable
transactionIdMandatorystringThe unique identifier for the customer's applicationNot ApplicableNot Applicable
blockMandatorystringTo add this application to the blocklist if set to yesyes or noNot Applicable
selfieMandatoryfileThe selfie image of the user. The maximum image size is 6 MB.JPEG, PNG, or TIFF image fileNot Applicable
dobOptionalstringThe date of birth of the customerDD-MM-YYYYNot Applicable

General Image Input Guidelines

  • The Face and ID - Enrol or Block API supports JPEG, PNG, and TIFF image inputs.
  • Ensure that the document in the image is legible. This is a rule of thumb for the OCR servers to accurately extract any text from an image.
  • Reduce the size of the image as much as possible to optimise the response time while also ensuring its legibility. Larger image sizes lead to higher uploading and processing time.
  • You can keep the width of the ID card image at least 800 pixels and the JPEG compression quality factor above 80%.
  • For the DL server to extract text from the document, the aspect ratio of the input image should be the same as the aspect ratio of the original document. Utmost care should be taken while resizing the image to maintain the aspect ratio.

Request

The following code snippet demonstrates a standard curl request for the Face and ID - Enrol or Block API:

curl --location --request POST 'https://ind-orion.hyperverge.co/v2/enrol/application' \
--header 'Content-Type: multipart/form-data' \
--header 'appId: <Enter_The_HyperVerge_AppId>' \
--header 'appKey: <Enter_The_HyperVerge_AppKey>' \
--header 'transactionId: <Enter_The_Transaction_ID>' \
--form name="<Customer_Name>" \
--form idNumber="<ID_Number>" \
--form idType="<ID_Type>" \
--form dob="<DD-MM-YYYY>" \
--form transactionId="<Transaction_ID>" \
--form block="no" \
--form 'selfie=@<Path_To_Selfie_Image_File>'

Success Response

The following is a sample success response from the Face and ID - Enrol or Block API:

{
"statusCode": 200,
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"result": {
"data": {
"transactionId": "<Transaction_ID>",
"isEnrolled": {
"value": "yes",
"reason": "NA"
},
"dashboardUrl": "<Dashboard_URL>"
},
"summary": {
"value": "Enrol successful",
"action": "Pass"
}
}
}

Success Response Details

The following table outlines the details of the success response from the Face and ID - Enrol or Block API:

ParameterTypeDescription
statusCodeintegerThe HTTP status code of the response
metaData.requestIdstringThe unique identifier for the request
metaData.transactionIdstringThe transaction ID associated with the request
result.data.transactionIdstringThe transaction ID of the enrolment
result.data.isEnrolled.valuestringIndicates whether the user was enrolled (yes or no)
result.data.isEnrolled.reasonstringThe reason for the enrolment result
result.data.dashboardUrlstringThe URL to view the enrolment record in the Orion dashboard
result.summary.valuestringA human-readable summary of the enrolment outcome
result.summary.actionstringThe action derived from the enrolment result

Error Responses

The following are the error responses from the Face and ID - Enrol or Block API:

{
"status": "failure",
"metaData": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
},
"statusCode": 400,
"error": "\"transactionId\" is required"
}

Error Response Details

A failure or error response from the Face and ID - Enrol or Block API contains a failure status with a relevant status code and error message. The following table lists all error responses:

Status CodeError MessageError DescriptionError Resolution
400"transactionId" is requiredThe request does not contain the transaction identification numberInclude a valid transactionId in the request body
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid valuesProvide valid appId and appKey in the request headers. Check the dashboard's credentials tab
403ForbiddenThe provided credentials do not have access to this APIContact the HyperVerge team for resolution
422Face not detected in Selfie imageThe AI model failed to detect a face in the provided selfie imageEnsure the selfie image contains a clear, front-facing photo of the user
429Requests rate limit exceededThe number of transactions per minute has crossed the limit set for your credentialsContact the HyperVerge team to review your rate limit configuration
500Internal Server ErrorThere is an issue with the service. Kindly contact the HyperVerge Team for support.Contact the HyperVerge team for investigation and resolution
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: