Skip to content

Retrieve a document by id

Request

Retrieve a document by id

Security
OAuth2(Required scopes: documents.read)
Path
idstringrequired

Id of the document to get.

curl -i -X GET \
  'https://api.cloud.hypatos.ai/v2/documents/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Document retrieved.

Bodyapplication/json
idstringrequired
Example:"6040dc9680b782b365ea77d5"
completedAtstring, (date-time)
Example:"1990-12-31T15:59:60-08:00"
completedBystring
createdAtstring, (date-time)required
Example:"1990-12-31T15:59:60-08:00"
createdBystringrequired
fileIdstring

Identifier of the primary file associated with this document.

Example:"5349b4ddd2781d08c09890f4"
caseIdstring or null
Example:"5349b4ddd1111d08c09890f4"
filesArray of objects or null(DocumentFile)

List of files associated with this document, each with their assigned role and main file flag.

Example:
[ { "id": "5349b4ddd2781d08c09890f4", "type": "salesOrder", "mainFile": true }, { "id": "5349b4ddd2781d08c09890f5", "type": "supportingDocument", "mainFile": false } ]
previewFileIdstring or null

Identifier of the preview file for this document, if available.

Example:"5349b4ddd2781d08c09890f6"
entitiesobject
Example:
{ "currency": "EUR", "items": [ { … } ], "number": "2018-DE-0011122351", "qty": 2 }
externalIdstring
Example:"doc-0001"
externalDataobject
Example:
{ "internalSystemId": "sap-01" }
projectIdstring
Example:"6040dc9680b782b365ea77d5"
statestring(DocumentState)required
Enum:"done""doneAutomatically""extracted""failed""inCompletion""junk""new""processing""rejected""reviewRequired"
titlestringrequired
Example:"scan-doc-1.jpg"
updatedAtstring, (date-time)
Example:"1990-12-31T15:59:60-08:00"
updatedBystring
urlstring

URL to access the document

Example:"https://example.com/documents/6040dc9680b782b365ea77d5"
Response
{ "id": "6040dc9680b782b365ea77d5", "completedAt": "1990-12-31T15:59:60-08:00", "completedBy": "string", "createdAt": "1990-12-31T15:59:60-08:00", "createdBy": "string", "fileId": "5349b4ddd2781d08c09890f4", "caseId": "5349b4ddd1111d08c09890f4", "files": [ { … }, { … } ], "previewFileId": "5349b4ddd2781d08c09890f6", "entities": { "currency": "EUR", "items": [ … ], "number": "2018-DE-0011122351", "qty": 2 }, "externalId": "doc-0001", "externalData": { "internalSystemId": "sap-01" }, "projectId": "6040dc9680b782b365ea77d5", "state": "done", "title": "scan-doc-1.jpg", "updatedAt": "1990-12-31T15:59:60-08:00", "updatedBy": "string", "url": "https://example.com/documents/6040dc9680b782b365ea77d5" }