Update a document's origin system (project-scoped)
PATCH
/api/v1/projects/{projectId}/documents/{id}
const url = 'https://api.yggy.tech/api/v1/projects/example/documents/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"originSystem":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.yggy.tech/api/v1/projects/example/documents/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "originSystem": "example" }'Set or clear the business system a document’s data originates from, scoped to the project.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
id
required
string
Header Parameters
Section titled “Header Parameters ” host
string | null
x-yggy-organization-id
string | null
Request Body required
Section titled “Request Body required ” Media type application/json
object
originSystem
required
Business system the data originates from; null or an empty string clears it
string | null
Example generated
{ "originSystem": "example"}Responses
Section titled “ Responses ”Document updated
Media type application/json
object
success
required
boolean
document
required
object
documentId
required
string
invocationId
string
title
required
string
content
string
source
string
sourceKind
string | null
originSystem
string | null
ownerExternalId
string | null
ownerDisplayName
string | null
contentType
required
string
status
required
string
createdAt
required
string
updatedAt
required
string
tripleCount
number
error
string
code
string
failureMessage
string
storageUrl
string
deletedAt
string
noteKind
string | null
extractionMethod
string
structuredRegions
string | null
provenanceChain
string | null
extractionStats
string | null
processingSummary
string | null
modelUsed
string | null
ocrStrategy
string | null
inferenceMode
string | null
extractionGuidanceRevision
integer | null
guidanceRecommendations
string | null
sourceCreatedAt
string | null
sourceModifiedAt
string | null
sourceAuthor
string | null
sourceMetadata
string | null
attachedTo
object
documentId
required
string
title
required
string
mailAttachments
Array<object>
object
documentId
required
string
title
required
string
status
required
string
projectExternalId
string | null
Example
{ "success": true, "document": { "sourceKind": "UPLOAD", "status": "PENDING", "extractionMethod": "UNSTRUCTURED", "mailAttachments": [ { "status": "PENDING" } ] }}Document not found
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}