Skip to main content

Sales PDF OCR API

This document highlights the Sales PDF OCR API details.

API Description

Objective

The Sales PDF OCR API extracts business critical fields from Sales PDF document and returns it in a JSON format.

InputOutput
A file containing a Sales PDF documentThe textual information extracted from the document

API URL

The URL for the Sales PDF OCR API is:

https://usa-engine.thomas.hyperverge.co/v1/readMCASalesApplication

API Endpoint

The endpoint for the Sales PDF OCR API is:

readMCASalesApplication

Overview

The Sales PDF OCR 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 OptionalTypeDescriptionValid Values
content-type Mandatory string This parameter defines the media type for the request payload.multipart/form-data
appIdMandatorystringThe application ID shared by HyperVergeNot Applicable - this is a unique value.
appKeyMandatorystringThe application key shared by HyperVergeNot Applicable - this is a unique value.
transactionIdMandatorystringThe unique ID for the customer journey.Not Applicable - this is a unique value related to a transaction in your application.

Input

The following table lists the parameter required for the Sales PDF OCR API's request body:

ParameterMandatory or OptionalDescriptionAllowed ValuesDefault Values
pdfFile Mandatory The file containing the Sales PDF documentThe file must be in Portable Document Format (PDF)Not Applicable

Request

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

curl --location --request POST 'https://usa-engine.thomas.hyperverge.co/v1/readMCASalesApplication' \
--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 'pdfFile=@"<path_to_pdf_file>"'

Document Sample

The following is a sample of a Sales PDF Document: sales_pdf_ocr_api

Success Response

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

{
"status": "success",
"statusCode": 200,
"result": {
"details": [
{
"fieldsExtracted": {
"businessLegalName": {
"value": "<Business_Legal_Name>",
"confidence": "High",
"score": 1
},
"businessDBA": {
"value": "<Business_DBA_Name>",
"confidence": "High",
"score": 0.99
},
"federalTaxID": {
"value": "<Federal_Tax_ID>",
"confidence": "High",
"score": 1
},
"companyType": {
"value": "<Company_Type>",
"confidence": "High",
"score": 0.8
},
"businessPhone": {
"value": "<Business_Phone_Number>",
"confidence": "High",
"score": 0.78
},
"businessEmail": {
"value": "<Business_Email_Address>",
"confidence": "High",
"score": 0.75
},
"incorporationDate": {
"value": "<Incorporation_Date_in_DD/MM/YYYY_Format>",
"confidence": "High",
"score": 0.87
},
"businessAddress": {
"value": "<Business_Address>",
"confidence": "High",
"score": 0.8
},
"businessLocationCity": {
"value": "<Business_City>",
"confidence": "High",
"score": 0.99
},
"businessLocationState": {
"value": "<Business_State>",
"confidence": "High",
"score": 1
},
"businessLocationZipCode": {
"value": "<Business_Zip_Code>",
"confidence": "High",
"score": 0.99
},
"businessDomainName": {
"value": "<Business_Domain_URL>",
"confidence": "High",
"score": 0.99
},
"monthlyRevenue": {
"value": "<Monthly_Revenue>",
"confidence": "High",
"score": 0.75
},
"annualRevenue": {
"value": "<Annual_Revenue>",
"confidence": "High",
"score": 0.98
},
"amountRequested": {
"value": "<Amount_Requested>",
"confidence": "High",
"score": 0.99
},
"ownerName": {
"value": "<Owner's_Name>",
"confidence": "High",
"score": 1
},
"ownerPhone": {
"value": "<Owner's_Phone_Number>",
"confidence": "High",
"score": 0.75
},
"ownerEmail": {
"value": "<Owner's_Email>",
"confidence": "High",
"score": 0.75
},
"ownerSocialSecurityNumber": {
"value": "<Owner's_Social_Security_Number>",
"confidence": "High",
"score": 1
},
"ownerDateOfBirth": {
"value": "<Owner's_Date_Of_Birth_in_DD/MM/YYYY_Format>",
"confidence": "High",
"score": 0.99
},
"ownershipPercentage": {
"value": "<Owner's_Percentage_Ownership>",
"confidence": "High",
"score": 1
},
"ownerAddress": {
"value": "<Owner's_Address>",
"confidence": "High",
"score": 0.9
},
"ownerResidenceCity": {
"value": "<Owner's_City>",
"confidence": "High",
"score": 1
},
"ownerResidenceState": {
"value": "<Owner's_State>",
"confidence": "High",
"score": 1
},
"ownerResidenceZipCode": {
"value": "<Owner's_Zip_Code>",
"confidence": "High",
"score": 1
},
"owner2Name": {
"value": "<Second_Owner's_Name>",
"confidence": "High",
"score": 1
},
"owner2Phone": {
"value": "<Second_Owner's_Phone_Number>",
"confidence": "High",
"score": 0.75
},
"owner2Email": {
"value": "<Second_Owner's_Email_Address>",
"confidence": "High",
"score": 0.75
},
"owner2SocialSecurityNumber": {
"value": "<Second_Owner's_Social_Security_Number>",
"confidence": "High",
"score": 1
},
"owner2DateOfBirth": {
"value": "<Second_Owner_Date_Of_Birth_in_DD/MM/YYYY_Format>",
"confidence": "High",
"score": 1
},
"owner2OwnershipPercentage": {
"value": "<Second_Owner's_Partnership_Percentage>",
"confidence": "High",
"score": 0.75
},
"owner2Address": {
"value": "<Second_Owner's_Address>",
"confidence": "High",
"score": 0.93
},
"owner2ResidenceCity": {
"value": "<Second_Owner's_City>",
"confidence": "High",
"score": 1
},
"owner2ResidenceState": {
"value": "<Second_Owner's_State>",
"confidence": "High",
"score": 1
},
"owner2ResidenceZipCode": {
"value": "<Second_Owner's_Zip_Code>",
"confidence": "High",
"score": 1
}
},
"signatureValidation": {
"validSignature": "<Valid_Signature_Status>",
"signatureType": "<Signature_Type>"
},
"type": "<Form_Type>"
}
],
"summary": {
"action": "<Summary_Action>",
"details": []
}
},
"metadata": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Success Response Details

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

ParameterTypeDescription
statusstringThe status of the request
statusCodeintegerThe HTTP status code of the request
requestIdstringA unique identifier for the request
transactionIdstringA unique transaction identifier
typestringThe type of the form submitted
validSignaturestringIndicates if the submitted signature is valid
signatureTypestringThe type of signature used.
info
It can be one of the following: docusign, digital with ip address, physical, or empty
businessLegalNamestringThe registered legal name of the business
businessDBAstringThe 'Doing Business As' name of the business
federalTaxIDstringThe Federal Tax Identification Number of the business
companyTypestringThe type of business entity
businessPhonestringThe contact phone number of the business
businessEmailstringThe contact email address of the business
incorporationDatestringThe date the business was incorporated
businessAddressstringThe registered address of the business
businessLocationCitystringThe city where the business is located
businessLocationStatestringThe state where the business is located
businessLocationZipCodestringThe ZIP code of the business location
businessDomainNamestringThe website URL of the business
monthlyRevenuestringThe estimated monthly revenue of the business
annualRevenuestringThe estimated annual revenue of the business
amountRequestedstringThe loan amount requested
ownerNamestringThe name of the primary business owner
ownerPhonestringThe phone number of the primary business owner
ownerEmailstringThe email address of the primary business owner
ownerSocialSecurityNumberstringThe Social Security Number of the primary business owner
ownerDateOfBirthstringThe date of birth of the primary business owner
ownershipPercentagestringThe percentage of business ownership held by the primary owner
ownerAddressstringThe residential address of the primary business owner
ownerResidenceCitystringThe city of residence of the primary business owner
ownerResidenceStatestringThe state of residence of the primary business owner
ownerResidenceZipCodestringThe ZIP code of the primary business owner's residence
owner2NamestringThe full name of the second business owner
owner2PhonestringThe contact phone number of the second business owner
owner2EmailstringThe contact email address of the second business owner
owner2SocialSecurityNumberstringThe social security number of the second business owner
owner2DateOfBirthstringThe date of birth of the second business owner
owner2OwnershipPercentagestringThe percentage of business ownership held by the second owner
owner2AddressstringThe residential address of the second business owner
owner2ResidenceCitystringThe city of the second business owner's residence
owner2ResidenceStatestringThe state of the second business owner's residence
owner2ResidenceZipCodestringThe ZIP code of the second business owner's residence
summaryobjectThe summary object suggests the final action for the user's application
info
If the sample meets all verification criteria and can be processed without manual intervention, the summary.action field is set to "Pass". If the sample requires further review or manual verification, the summary.action field is set to "Manual_review".
actionstringThe final decision or action taken based on the assessment

Failure Response

When the image is not of a Sales PDF document, the JSON output might contain null or random values.

Error Responses

The following are some error responses from the Sales PDF OCR API:

{
"status": "failure",
"statusCode": 400,
"error": "Invalid input passed for field 'pdfFile'",
}

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
400Invalid input passed for field 'pdfFile'The input value is not a valid entry
400Invalid file type for: 'pdfFile'The input file type is invalid
422Document Not DetectedThe input file in the request is not a valid Sales PDF document
5xxInternal Server ErrorThere was an error with HyperVerge's server. Please contact the HyperVerge team
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: