Skip to navigation

Create a document from a file

View as Markdown

Files an uploaded file (POST /files) as a document of a company. It arrives in Gautieji like any other document and is read by OCR. A file becomes at most one document.

Authentication

AuthorizationBearer

Skaitra API key (skt_…).

OR
AuthorizationBearer

OAuth 2.1 access token issued for the Skaitra resource (/mcp); see /.well-known/oauth-protected-resource.

Headers

Idempotency-KeystringOptional<=200 characters

Any unique value; a retry with the same key returns the first result.

Request

This endpoint expects an object.
fileIdstringRequired1-200 characters
companyIdstringRequired1-200 characters
filenamestringOptional1-255 characters

Response

OK
idstring
accountingDocumentIdinteger or null-9007199254740991-9007199254740991
companyIdstring or null
namestring
originalFilenamestring
sourcestring
receivedAtstring
stageenum
destinationenum or null
Allowed values:
duplicateOfDocumentIdstring or null
fileobject or null
createdAtstring
updatedAtstring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
412
Precondition Failed Error
422
Unprocessable Entity Error
428
Precondition Error