Skip to main content

MRC OCR API

Objective

The Motor Registration Certificate(MRC) OCR API verifies and extracts information from the user's Vietnamese MRC.

InputOutput
An image or PDF file containing a user's MRCAn array containing detailed information extracted from the document

API Endpoint

readMRC

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.

API Request Details

Method - POST

Headers

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)

Inputs

The following table provides the complete information on the parameters used in the request body for the API calls.

ParameterDescriptionMandatory or OptionalAllowed ValuesDefault Value
image1 The parameter accepts either an image or a pdf file containing the user's MRCMandatoryImage(JPG,JPEG and PNG) or PDF FileNot Applicable
image2 The parameter accepts either an image or a pdf file containing the user's MRCOptionalImage(JPG,JPEG and PNG) or PDF FileNot Applicable
dateFirstRegistrationThis parameter represents the date of the first registration related to the document being processedMandatoryData Type:String Format:DD/MM/YYYYNot Applicable
dateCurrentRegistrationThis parameter repersents the date of the most recent registration pertaining to the document being processedMandatoryData Type:String Format:DD/MM/YYYYNot Applicable
nameThis parameter refers to the full name of the userMandatoryData Type:String Not Applicable

Sample Request

The following code shows a standard cURL request for the API.

curl --location --request POST 'https://apac.docs.hyperverge.co/v1/readMRC' \
--header 'Content-Type: multipart/form-data' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--form 'image1=@"<path_to_image1>"' \
--form 'image2=@"<path_to_image2>"' \
--form 'dateFirstRegistration="<Enter_the_dateFirstRegistration>"' \
--form 'dateCurrentRegistration="<Enter_the_dateCurrentRegistration>"' \
--form 'name="<Enter_the_name>"'

Success Response Sample

The following is a sample of a success response from the API.

{
"status": "success",
"statusCode": "200",
"result": [
{
"type": "mrc_back",
"details": {
"name": {
"to-be-reviewed": "yes",
"value": "<Name_of_the_Individual>",
"conf": 0.4914,
},
"year-current-registration": {
"to-be-reviewed": "no",
"value": "<Year_of_Current_Registration>",
"conf": 1,
},
"price": {
"to-be-reviewed": "yes",
"value": "<Price_Value>",
"conf": 0.6,
},
"<Other_Fields>": "<Other_Values>",
"verified": {
"year-first-registration": "<True_or_False>",
"month-first-registration": "<True_or_False>",
"name": "<True_or_False>",
"month-current-registration": "<True_or_False>",
"year-current-registration": "<True_or_False>",
}
}
},
{
"type": "mrc_front",
"details": {
"mrc-number": {
"to-be-reviewed": "no",
"value": "<MRC_Number>",
"conf": 1,
}
}
}
],
"requestId": "<Request_ID>"
}

Success Response Details

ParameterTypeDescription
nameobjectThe name details
name.to-be-reviewedstringIndicates if the name field is to be reviewed
name.valuestringThe value of the name
name.conffloatThe confidence level of the name
year-current-registrationobjectThe year of current registration details
year-current-registration.to-be-reviewedstringIndicates if the year-current-registration field is to be reviewed
year-current-registration.valuestringThe value of the year of current registration
year-current-registration.conffloatThe confidence level of the year of current registration
priceobjectThe price details
price.to-be-reviewedstringIndicates if the price field is to be reviewed
price.valueintegerThe value of the price
price.conffloatThe confidence level of the price
verifiedobjectVerification details for various fields
verified.year-first-registrationbooleanVerification status for the year of first registration
verified.month-first-registrationbooleanVerification status for the month of first registration
verified.namebooleanVerification status for the name
verified.month-current-registrationbooleanVerification status for the month of current registration
verified.year-current-registrationbooleanVerification status for the year of current registration
mrc-numberobjectThe MRC number details
mrc-number.to-be-reviewedstringIndicates if the MRC number field is to be reviewed
mrc-number.valuestringThe value of the MRC number
mrc-number.conffloatThe confidence level of the MRC number

Failure Response Samples

# If MRC could not be detected in the image, following response is received
{
"status": "success",
"statusCode": "200",
"result": [],
"requestId": "<Request_ID>"
}

Error Response Samples

{
"status": "failure",
"statusCode": 429,
"error": "Rate limit exceeded"
}

Failure and Error Response Details

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

Status CodeError MessageError Description
400API call requires at least one input imageThis error is returned when image is not sent in the API call
400API call handles only upto 2 imagesThis error is returned when more than 2 images are sent in the API call
400image size cannot be greater than 6MBThe maximum size of input image is 6MB. Crossing this will result in this error
429Rate limit exceededYou have exceeded the configured limit on the number of transactions permitted in a minute. Please contact the HyperVerge team for resolution
500/501Internal Server ErrorPlease check the request headers or contact the HyperVerge team for resolution
503Server busyPlease contact the HyperVerge team for resolution
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: