Skip to main content
The Documents Data Model simplifies the handling of documents across various accounting platforms, providing a standardized approach to accessing and managing document-related information.
  • Unified document properties: Essential document details, such as file name, file type, file size, and platform ID, are standardized across different accounting platforms
  • Document type association: Documents can be linked to specific document types (e.g., bills, invoices, expenses) using the document_type_id and document_type properties, facilitating easy retrieval and organisation of documents
  • File metadata: The model includes file type (MIME Type) and file size properties, enabling developers to handle documents appropriately and ensure compatibility with their applications
  • Document upload status: When you request for a document to be downloaded, RootFi will download the document then cache the document on to its servers so future calls to download the document will be faster. The document_uploaded property indicates whether RootFi has uploaded the document to its servers
Downloading the DocumentAfter initially syncing the documents data document_uploaded will be false for all the documents. To download the document you must call the Download Documents API. This API will download the document and return a temporary download_url. Subsequent calls to download the document will be faster as the document will be cached on RootFi’s servers.

Attributes

Document Attributes

PropertyTypeDescription
rootfi_idintegerUnique identifier assigned by Commenda for this document
rootfi_created_atstringTimestamp when this record was created in Commenda’s system (ISO 8601)
rootfi_updated_atstringTimestamp when this record was last updated in Commenda’s system (ISO 8601)
rootfi_company_idintegerCompany identifier this document belongs to within Commenda
platform_idstringUnique identifier for this document in the source accounting platform
platform_unique_idstringAlternative unique identifier from the platform (some platforms provide multiple IDs)
file_namestringThe file name of the document
file_typestringThe file type of the document (MIME Type)
file_sizedoubleThe file size of the document in bytes
document_type_idstringThe document type ID of the document
document_typeenumThe document type of the document
document_uploadedbooleanWhether RootFi has uploaded the document to its servers
updated_atstringThe date and time the document was last updated

Document Type Enum Values

ValueDescription
BILLSDocument is associated with a bill
INVOICESDocument is associated with an invoice
EXPENSESDocument is associated with an expense
BILL_CREDIT_NOTESDocument is associated with a bill credit note
INVOICE_CREDIT_NOTESDocument is associated with an invoice credit note
PURCHASE_ORDERSDocument is associated with a purchase order
SALES_ORDERSDocument is associated with a sales order
JOURNAL_ENTRIESDocument is associated with a journal entry

Properties Supported

PropertyTypeDescription
platform_idstringThe Platform’s ID for the document
file_namestringThe file name of the document
file_typestringThe file type of the document (MIME Type)
file_sizedoubleThe file size of the document in bytes
document_type_idstringThe document type ID of the document
document_typeenumThe document type of the document
document_uploadedbooleanWhether RootFi has uploaded the document to its servers
updated_atstringThe date and time the document was last updated
{
  "rootfi_id": 123,
  "rootfi_created_at": "2024-01-25T09:00:00Z",
  "rootfi_updated_at": "2024-01-25T09:00:00Z",
  "rootfi_company_id": 456,
  "platform_id": "123456_1",
  "platform_unique_id": "123456",
  "document_type_id": "123456",
  "file_name": "Documents.csv",
  "file_type": "text/csv",
  "file_size": 254.8828125,
  "document_type": "INVOICES",
  "document_uploaded": false,
  "updated_at": "2021-03-03T10:00:00.000Z"
}