Skip to main content

Signature Matching API

The following document highlights the details of the Signature Matching API.

API Description

Objective

The Signature Matching API compares two signature images to verify their authenticity and detect potential fraud, providing match scores and verification results.

InputOutput
Two images that can be signature images or documents containing signatures The match scores of the images, verification results, and manual review recommendations

API URL

https://ind-engine.thomas.hyperverge.co/v1/signature_matching

API Endpoint

signature_matching

Overview

The Signature Matching 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.

Method - POST

Authentication

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

Headers

HeaderMandatory / OptionalDescriptionInput Format
content-type MandatoryThis parameter defines the media type for the request payloadmultipart/form-data
appId MandatoryThe application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tabThis should be a unique value
appKey MandatoryThe application key shared by HyperVerge. You can find the details in the dashboard's credentials tabThis should be a unique value

Inputs

Compliance Checks

The Signature Matching API performs compliance checks to validate signature image quality. A valid signature image must have:

  • A plain white background
  • Signature in black or blue ink only
  • No other content or details in the background

When you submit a document image (instead of a clean signature image), the background may not be white and may contain other text or details surrounding the signature. In such cases, set the corresponding disableCompliance1 or disableCompliance2 parameter to "yes" to skip compliance validation for that image. This allows the API to process document-based signatures that don't meet the standard compliance requirements.

The following table provides the details of the parameters required for the Signature Matching API's request body:

ParameterMandatory / OptionalTypeDescriptionInput FormatDefault Value
image1MandatoryfileThe first image file, which can be a signature image or a document containing a signatureImage file (JPEG, JPG, or PNG)Not Applicable
image2MandatoryfileThe second image file, which can be a signature image or a document containing a signatureImage file (JPEG, JPG, or PNG)Not Applicable
disableCompliance1OptionalstringDisable compliance validation checks for image1. Set to "yes" if image1 is a document containing a signature (non-white background or additional content)yes/nono
disableCompliance2OptionalstringDisable compliance validation checks for image2. Set to "yes" if image2 is a document containing a signature (non-white background or additional content)yes/nono
enableSignatureDetectionMandatorybooleanEnable signature detection flag. If set to true, it automatically performs signature detection inside the matching API and also matches the 2 imagestrue/falseNot Applicable

Request

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

curl --location 'https://ind-engine.thomas.hyperverge.co/v1/signature_matching' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--form 'image1=@"<Enter_the_signature_image1>"' \
--form 'image2=@"<Enter_the_signature_image2>"' \
--form 'disableCompliance1="<yes/no>"' \
--form 'disableCompliance2="<yes/no>"'\
--form 'enableSignatureDetection="<yes/no>"'

Success Response

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

{
"status": "success",
"statusCode": 200,
"result": {
"score": <Match_Score>,
"match": "<Match_Result>",
"to_be_reviewed": "<Review_Status>"
}
}

Success Response Details

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

ParameterTypeDescription
statusstringThe status of the request
statusCodeintegerThe HTTP status code for the response
resultobjectThe JSON object containing the signature matching details
scorefloatThe match score between the two signatures
matchstringThe match result indicating if signatures match
to_be_reviewedstringThe review status indicating if manual review is required

Failure Response

The following code snippet demonstrates a failure response from the Signature Matching API:

{
"status": "failure",
"statusCode": 400,
"metaData": {
"requestId": "<Request_ID>"
},
"error": {
"message": "No signature detected"
}
}

Error Responses

The following are some error responses from the Signature Matching API:

{
"status": "failure",
"statusCode": 400,
"metaData": {
"requestId": "<Request_ID>"
},
"error": {
"message": "No signature detected"
}
}

Error Response Details

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

Status CodeError MessageError DescriptionError Resolution
400No signature detectedNo signature was detected in the uploaded imageEnsure the uploaded image contains a clear signature
400Multiple signatures detectedMultiple signatures were detected in the uploaded imageEnsure the uploaded image contains only one signature
400Unsupported Document FormatThe document format is not supported, please upload a JPEG, JPG, PNG, or TIFF imageUpload the image in a supported format (JPEG, JPG, PNG, or TIFF)
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid valuesVerify and provide valid appId and appKey credentials
429Rate limit exceededThe rate limit of the Signature Matching API has been exceededRetry the request after some time or contact the HyperVerge team if the issue persists
500Internal Server ErrorKindly check the request headers or contact the HyperVerge team for resolution.Check the request headers or 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: