Skip to content
Guides

ComIDP API

Upload the source file and process it. The executeType field is used to specify the file processing method, and the parameter field is used to pass a JSON string to set the processing parameters for the file.

Request Method

  • Request Method:POST
  • Parameter Passing Method:Body (form-data)

Request Address

sh
http://localhost:7000/file/handle

Request Parameters

Parameter NameData TypeDescriptionRequired
fileFileThe uploaded file.Yes
executeTypeStringType of file execution, e.g. documentAI/ocr.Yes
passwordStringPassword to open the file.No
languageIntegerInterface error prompt language (1 = English, 2 = Chinese).No
parameterStringFile processing parameters.No
resultFileNameStringName for the returned downloadable file.No

Send a Request

To use ComIDP, please send a request to /file/handle, including the needed files and parameters. Before starting, please make sure the ComPDFKit On-premises is launched and running successfully.

Recognizing with Local Files

Send a request to /file/handle and attach the file:

shell
curl -f -X POST http://localhost:7000/file/handle \
-H "Content-Type: multipart/form-data" \
-F file=@"image.png" \
-F executeType="documentAI/ocr" \
-F parameter="{ \"lang\": \"auto\" }" \
> result.json