Skip to main content
PATCH
/
documents
/
{documentId}
cURL
curl --request PATCH \
  --url https://api.cradl.ai/{basePath}/documents/{documentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "groundTruth": [
    {
      "label": "<string>",
      "value": "<string>",
      "pages": [
        123
      ],
      "rawValue": "<string>",
      "confidence": 0.5
    }
  ],
  "metadata": {},
  "retentionInDays": 913,
  "name": "<string>",
  "description": "<string>",
  "datasetId": "<string>"
}
'
{
  "updatedTime": "<string>",
  "metadata": {},
  "retentionInDays": 913,
  "updatedBy": "<string>",
  "description": "<string>",
  "createdBy": "<string>",
  "name": "<string>",
  "createdTime": "<string>",
  "documentId": "<string>",
  "contentMD5": "<string>",
  "ocrFileUrl": "<string>",
  "agentRunId": "<string>",
  "content": "<string>",
  "groundTruth": [
    {
      "label": "<string>",
      "value": "<string>",
      "pages": [
        123
      ],
      "rawValue": "<string>",
      "confidence": 0.5
    }
  ],
  "consentId": "<string>",
  "datasetId": "<string>",
  "fileUrl": "<string>",
  "contentType": "application/pdf",
  "annotationFileUrl": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.cradl.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

Content-Type
string
required

Path Parameters

documentId
string
required

Body

application/json
groundTruth
object[] | null
metadata
object
retentionInDays
integer
Required range: 1 <= x <= 1825
name
string | null
Maximum string length: 4096
description
string | null
Maximum string length: 4096
datasetId
string
Pattern: ^(cradl|las):dataset:[a-f0-9]{32}$

Response

200 response

updatedTime
string | null
required
Pattern: ^[0-9]{4}-?[0-9]{2}-?[0-9]{2}( |T)?[0-9]{2}:?[0-9]{2}:?[0-9]{2}(.[0-9]{1,6})?(Z|[+][0-9]{2}(:|)[0-9]{2})$
metadata
object
required
retentionInDays
integer
required
Required range: 1 <= x <= 1825
updatedBy
string | null
required
Maximum string length: 4096
description
string | null
required
Maximum string length: 4096
createdBy
string
required
Maximum string length: 4096
name
string | null
required
Maximum string length: 4096
createdTime
string
required
Pattern: ^[0-9]{4}-?[0-9]{2}-?[0-9]{2}( |T)?[0-9]{2}:?[0-9]{2}:?[0-9]{2}(.[0-9]{1,6})?(Z|[+][0-9]{2}(:|)[0-9]{2})$
documentId
string
required
Pattern: ^(cradl|las):document:[a-f0-9]{32}$
contentMD5
string | null
Maximum string length: 4096
ocrFileUrl
string | null
Pattern: ^http://localhost.*|^https://.*
agentRunId
string | null
Pattern: ^((cradl|las):organization:[a-z0-9-_]+/)?cradl:agent:[a-z0-9-_]+/cradl:run:[a-z0-9-_]+$
content
string | null
Required string length: 1 - 6250000
groundTruth
object[]
Pattern: ^las:consent:[a-f0-9]{32}$
datasetId
string
Pattern: ^(cradl|las):dataset:[a-f0-9]{32}$
fileUrl
string | null
Pattern: ^http://localhost.*|^https://.*
contentType
enum<string> | null
Available options:
application/pdf,
image/jpeg,
image/png,
image/tiff,
image/webp,
message/rfc822
annotationFileUrl
string | null
Pattern: ^http://localhost.*|^https://.*