Skip to content

Request processing of a file

Request

Request a processing of a file that was previously uploaded. The fileId in the request body is representing the identifier of the file that was returned by the upload endpoint. As a result of this request a document will be created and its identifier will be returned in the response. The projectId in the request body is an identifier of the project to create the document in.

Security
OAuth2(Required scopes: documents.write)
Bodyapplication/jsonrequired

Payload for processing the given file

fileIdstringrequired
Example:"5349b4ddd2781d08c09890f4"
projectIdstringrequired
Example:"00000020f51bb4362eee2a4d"
externalIdstring

External id of the file. Can be used if you want to link the file with an identifier in your system.

Example:"doc-0001"
externalDataobject(DocumentsUpdateExternalDataRequest)

External data to be associated with the document. The data are provided as a flat JSON object. The properties of that object are case-insensitive. The maximum amount of properties is limited to 20.

curl -i -X POST \
  https://api.cloud.hypatos.ai/v2/documents/process-file \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fileId": "5349b4ddd2781d08c09890f4",
    "projectId": "00000020f51bb4362eee2a4d",
    "externalId": "doc-0001",
    "externalData": {
      "key1": "value1",
      "key2": "value2"
    }
  }'

Responses

Processing accepted

Bodyapplication/json
documentIdstringrequired
Example:"6040dc9680b782b365ea77d5"
fileIdstringrequired
Example:"5349b4ddd2781d08c09890f4"
projectIdstringrequired
Example:"00000020f51bb4362eee2a4d"
Response
{ "documentId": "6040dc9680b782b365ea77d5", "fileId": "5349b4ddd2781d08c09890f4", "projectId": "00000020f51bb4362eee2a4d" }