Factify API is currently in Beta.
import { Factify } from "@factify/sdk";
const factify = new Factify({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await factify.documentService.get({
documentId: "<id>",
});
console.log(result);
}
run();{
"document": {
"access_level": "private",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "user_01h2xcejqtf2nbrexx3vqjhp41",
"name": "<string>",
"type": "user"
},
"id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"processing_status": "processing",
"title": "Q4 2024 Financial Report",
"url": "https://app.factify.com/d/01h2xcejqtf2nbrexx3vqjhp41",
"current_version": {
"id": "ver_01h2abcd1234efgh5678jkmnpt"
},
"description": "Quarterly financial report for Q4 2024",
"general_access": "private",
"last_viewed_at": "2023-11-07T05:31:56Z",
"permission_set": {
"attach_policy": true,
"comment_private": true,
"comment_public": true,
"copy_content": true,
"create_version": true,
"export": true,
"grant_access": true,
"list_versions": true,
"manage_access": true,
"open": true,
"screenshot": true,
"trash": true,
"view": true,
"view_analytics": true,
"view_leads": true,
"view_timeline": true
},
"shared_at": "2023-11-07T05:31:56Z",
"thumbnail_url": "<string>",
"trashed_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Retrieve a document by ID.
import { Factify } from "@factify/sdk";
const factify = new Factify({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await factify.documentService.get({
documentId: "<id>",
});
console.log(result);
}
run();{
"document": {
"access_level": "private",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "user_01h2xcejqtf2nbrexx3vqjhp41",
"name": "<string>",
"type": "user"
},
"id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"processing_status": "processing",
"title": "Q4 2024 Financial Report",
"url": "https://app.factify.com/d/01h2xcejqtf2nbrexx3vqjhp41",
"current_version": {
"id": "ver_01h2abcd1234efgh5678jkmnpt"
},
"description": "Quarterly financial report for Q4 2024",
"general_access": "private",
"last_viewed_at": "2023-11-07T05:31:56Z",
"permission_set": {
"attach_policy": true,
"comment_private": true,
"comment_public": true,
"copy_content": true,
"create_version": true,
"export": true,
"grant_access": true,
"list_versions": true,
"manage_access": true,
"open": true,
"screenshot": true,
"trash": true,
"view": true,
"view_analytics": true,
"view_leads": true,
"view_timeline": true
},
"shared_at": "2023-11-07T05:31:56Z",
"thumbnail_url": "<string>",
"trashed_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Bearer authentication header of the form Bearer
Document ID. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}
^doc_[0-9a-hjkmnp-tv-z]{26}$Success
GetDocumentResponse contains the requested document.
The requested document.
Show child attributes