Skip to main content

Warehouse Receipt OCR

API Description

Objective

The Warehouse Receipt OCR API extracts data from warehouse receipt documents using Optical Character Recognition (OCR) technology and returns the information in JSON format.

InputOutput
The warehouse receipt imageStructured data including receipt number, warehouse details, commodity information, insurance details, and financial values. The complete list of output fields is available in the Success Response Details section
Warehouse Receipt

A Warehouse Receipt is a document that serves as proof of ownership for commodities stored in a warehouse. This receipt contains detailed information about the stored goods, warehouse details, insurance coverage, and financial terms.

API URL

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

API Endpoint

readWHReceipt

Overview

The Warehouse Receipt OCR API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should send all data in JSON format 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 OptionalDescriptionValid Values
content-type Mandatory This parameter defines the media type for the request payload.application/json
appId MandatoryApplication ID shared by HyperVergeN/A. This is a unique value.
appKey MandatoryApplication Key shared by HyperVergeN/A. This is a unique value.
transactionId MandatoryUnique transaction identifier for trackingN/A. This should be a unique value.

Input

The following table provides the details of the parameters required for the Warehouse Receipt OCR API's request body:

ParameterMandatory or OptionalDescription Allowed ValuesDefault Value
image Mandatory The warehouse receipt image to be processed for OCR extractionThe file format can be JPG, JPEG, PNG, or PDFNot Applicable

Request

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

curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/readWHReceipt' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_Transaction_ID>' \
--data '{
"image": @"<Warehouse_Receipt_Image>"'
}'
Document Sample

The following is a Warehouse Receipt:
warehouse_receipt_ocr_api|

Success Response

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

{
"status": "success",
"statusCode": 200,
"result": {
"details": [
{
"fieldsExtracted": {
"receiptNumber": {
"value": "<Receipt_Number>"
},
"CARNumber": {
"value": "<CAR_Number>"
},
"SRNumber": {
"value": "<SR_Number>"
},
"dateOfIssue": {
"value": "<Date_Of_Issue>"
},
"dateOfDeposit": {
"value": "<Date_Of_Deposit>"
},
"warehouseName": {
"value": "<Warehouse_Name>"
},
"warehouseAddress": {
"value": "<Warehouse_Address>"
},
"warehouseDistrict": {
"value": "<Warehouse_District>"
},
"warehouseState": {
"value": "<Warehouse_State>"
},
"depositorName": {
"value": "<Depositor_Name>"
},
"commodityName": {
"value": "<Commodity_Name>"
},
"commodityVariety": {
"value": "<Commodity_Variety>"
},
"units": {
"value": "<Units>"
},
"marketRate": {
"value": "<Market_Rate>"
},
"netWeight": {
"value": "<Net_Weight>"
},
"commodityValue": {
"value": "<Commodity_Value>"
},
"receiptValidityStartDate": {
"value": "<Receipt_Validity_Start_Date>"
},
"receiptValidityEndDate": {
"value": "<Receipt_Validity_End_Date>"
},
"fireInsurancePolicyNumber": {
"value": "<Fire_Insurance_Policy_Number>"
},
"fireInsuranceValidityStartDate": {
"value": "<Fire_Insurance_Validity_Start_Date>"
},
"fireInsuranceValidityEndDate": {
"value": "<Fire_Insurance_Validity_End_Date>"
},
"burglaryInsurancePolicyNumber": {
"value": "<Burglary_Insurance_Policy_Number>"
},
"burglaryInsuranceValidityStartDate": {
"value": "<Burglary_Insurance_Validity_Start_Date>"
},
"burglaryInsuranceValidityEndDate": {
"value": "<Burglary_Insurance_Validity_End_Date>"
},
"lenderName": {
"value": "<Lender_Name>"
},
"digitallySignedBy": {
"value": "<Digitally_Signed_By>"
},
"digitalSignatureDate": {
"value": "<Digital_Signature_Date>"
}
},
"type": "Warehouse Receipt"
}
]
},
"metadata": {
"requestId": "<Request_ID>",
"transactionId": "<Transaction_ID>"
}
}

Success Response Details

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

ParameterTypeDescription
statusstringThe status of the request
statusCodeintegerThe status code of the response
resultobjectThe result object containing the extracted warehouse receipt details
detailsarrayThe array containing the extracted document details
fieldsExtractedobjectThe object containing all extracted fields from the warehouse receipt
receiptNumberobjectThe unique receipt number assigned to the warehouse receipt
CARNumberobjectThe CAR (Central Agricultural Repository) number associated with the receipt
SRNumberobjectThe SR (Storage Receipt) number for the warehouse receipt
dateOfIssueobjectThe date when the warehouse receipt was issued
dateOfDepositobjectThe date when the commodity was deposited in the warehouse
warehouseNameobjectThe name of the warehouse where the commodity is stored
warehouseAddressobjectThe complete address of the warehouse facility
warehouseDistrictobjectThe district where the warehouse is located
warehouseStateobjectThe state where the warehouse is located
depositorNameobjectThe name of the individual or entity who deposited the commodity
commodityNameobjectThe name of the commodity stored in the warehouse
commodityVarietyobjectThe specific variety or type of the commodity
unitsobjectThe number of units of the commodity stored
marketRateobjectThe current market rate per unit of the commodity
netWeightobjectThe net weight of the commodity in the specified units
commodityValueobjectThe total value of the commodity based on quantity and market rate
receiptValidityStartDateobjectThe start date from which the warehouse receipt is valid
receiptValidityEndDateobjectThe end date until which the warehouse receipt remains valid
fireInsurancePolicyNumberobjectThe policy number for fire insurance coverage of the commodity
fireInsuranceValidityStartDateobjectThe start date of fire insurance coverage
fireInsuranceValidityEndDateobjectThe end date of fire insurance coverage
burglaryInsurancePolicyNumberobjectThe policy number for burglary insurance coverage of the commodity
burglaryInsuranceValidityStartDateobjectThe start date of burglary insurance coverage
burglaryInsuranceValidityEndDateobjectThe end date of burglary insurance coverage
lenderNameobjectThe name of the lending institution if the receipt is pledged as collateral
digitallySignedByobjectThe name of the person who digitally signed the warehouse receipt
digitalSignatureDateobjectThe date when the warehouse receipt was digitally signed
typestringThe type of document that was processed
metadataobjectThe metadata object containing request tracking information
requestIdstringThe unique identifier for the request
transactionIdstringThe transaction identifier for tracking

Error Responses

The following are some error responses from the API:

{
"status": "failure",
"statusCode": 400,
"error": "API call requires one input image"
}

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 CodeErrorError Description
400API call requires one input imageThe request is missing the required image input parameter
400Image size cannot be greater than 6MBThe request contains an image file that exceeds the maximum allowed size of 6MB
401Missing/Invalid credentialsThe request is either missing the mandatory appId and appKey combination or has invalid values
422Document Not DetectedThe request contains an image where no warehouse receipt document could be identified or detected
500Internal Server ErrorThe request has an internal server error. Please check the request headers or contact the HyperVerge team for investigation
503Service UnavailableThe Warehouse Receipt OCR service is currently unavailable. Please try again later or contact the HyperVerge team for investigation
Important Notes
  • If multiple images are sent to the server in the same call, only one of the images will be read. Hence it is advisable to only send one image per call.
  • For PDF documents, if the document has multiple pages, only the first three pages will be processed.
  • The API supports JPG, PNG, and PDF file formats for input images.
  • All extracted field values are returned as strings, even for numeric fields.
  • Empty fields will be returned with empty string values.
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: