Skip to main content
POST
/
v1beta
/
documents
/
{document_id}
/
process
TypeScript
import { Factify } from "@factify/sdk";

const factify = new Factify({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await factify.documents.process({
    documentId: "doc_01h2xcejqtf2nbrexx3vqjhp41",
    body: {
      versionId: "ver_01h2abcd1234efgh5678jkmnpt",
    },
  });

  console.log(result);
}

run();
{
  "document_id": "<string>",
  "status": "PROCESSING_OUTCOME_UNSPECIFIED",
  "version_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Path Parameters

document_id
string
required

Document ID.

Pattern: ^doc_[0-9a-hjkmnp-tv-z]{26}$
Example:

"doc_01h2xcejqtf2nbrexx3vqjhp41"

Body

application/json

ProcessDocumentRequest triggers processing for a document version.

async
boolean

If true, returns immediately without waiting for processing to complete.

version_id
string | null

Optional version ID. If omitted, processes the current version.

Pattern: ^ver_[0-9a-hjkmnp-tv-z]{26}$
Example:

"ver_01h2abcd1234efgh5678jkmnpt"

Response

Success

ProcessDocumentResponse contains the processing result.

document_id
string

Document ID being processed.

status
enum<string>

Outcome of the processing trigger.

Available options:
PROCESSING_OUTCOME_UNSPECIFIED,
PROCESSING_OUTCOME_STARTED,
PROCESSING_OUTCOME_ALREADY_PROCESSING,
PROCESSING_OUTCOME_ALREADY_COMPLETED,
PROCESSING_OUTCOME_FAILED
version_id
string

Version ID being processed.