Skip to main content

Documents

The document management in InLoox comprises three entities: Document, DocumentFolder, and DocumentFolderStructure. Via the OData API you can upload documents, create links, manage folder structures, and define automatic folder rules.

Entity Overview

EntityDescription
DocumentIndividual document (file, hyperlink, or file link)
DocumentFolderFolder within the project document structure
DocumentFolderStructureAutomatic folder structure rules
info

Documents are always associated with a project. Use ProjectId when filtering to retrieve only documents of a specific project.


Document

A document represents a file, a hyperlink, or a file link stored in a project. Documents support metadata, notes, favorites, and relationships to other entities.

Storage Types

InLoox supports different storage types (StoreType): InLoox cloud storage, SharePoint online, and (exclusively in InLoox Self-Hosted) local file systems. The value of StoreType determines how the document is physically stored.

Data Model

PropertyTypeDescription
DocumentIdGuid (UUID)Unique identifier of the document (primary key).
FileNamestring?File name.
ProjectIdGuid?Associated project.
DocumentFolderIdGuidAssociated folder.
DescriptionHTMLstring?Description as HTML.
OutlookPreviewTextstring?Preview text from Outlook.
IsInternetLinkbooleanIndicates whether the document is a hyperlink.
IsFileLinkbooleanIndicates whether the document is a file link.
IsStandardFilebooleanIndicates whether it is a standard file.
StoreTypeint32Storage type. Values: 0 = Not defined, 1 = File server, 2 = SharePoint online, 3 = InLoox document storage.
PhysicalIdstring?Physical ID in the storage system.
IsOrphanedbooleanIndicates whether the document is orphaned.
SourceFolderstring?Source folder.
DocumentFolderPathstring?Full folder path.
CreatedByContactIdGuid?Creator of the document.
FileTypestring?File type (extension).
Statestring?Document state.
UpdatedAtDateTimeOffset?Timestamp of the last update.
CreatedAtDateTimeOffset?Creation date.

Endpoints

CRUD Operations

List all documents across all projects

GET/odata/Document

Supports OData query parameters.


Get a single document

GET/odata/Document({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentId.

Create a new document

POST/odata/Document
ParameterTypeRequiredDescription
BodyDelta<ApiDocument>JSON object with the document properties.

Update a document

PATCH/odata/Document({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentId.
BodyDelta<ApiDocument>JSON object with the fields to update.

Delete a document

DELETE/odata/Document({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentId.
warning

Deleting a document cannot be undone.


Comments

Add a comment to a document

POST/odata/Document({key})/AddNote
ParameterTypeRequiredDescription
keyGuidThe DocumentId.
BodyobjectJSON object with the following fields:

htmlText (string, required) — HTML-formatted comment content.
notificationContactIds (Guid[], required) — Contact IDs to notify (can be empty []).

Delete a comment from a document

GET/odata/Document/DeleteNote(noteRelationId={noteRelationId})
ParameterTypeRequiredDescription
noteRelationIdGuidThe ID of the comment relation.
warning

Deleting a comment cannot be undone.


Get all documents for a specific object

GET/odata/Document({key})/GetDocumentsForObject()
ParameterTypeRequiredDescription
keyGuidThe object ID.

Get linked items of a document

GET/odata/Document({key})/GetRelatedItems()
ParameterTypeRequiredDescription
keyGuidThe DocumentId.

Favorites

Toggle the favorite status of a document

GET/odata/Document({key})/ToggleFavorite(isFavorite={isFavorite})
ParameterTypeRequiredDescription
keyGuidThe DocumentId.
isFavoritebooleantrue to mark as favorite, false to remove.

Create a file link

POST/odata/Document/AddFileLink
ParameterTypeRequiredDescription
BodyobjectJSON object with the following fields:

projectId (Guid, required) — The project to add the file link to.
linkAddress (string, required) — The URL/address of the linked file.
parentFolderId (Guid?, optional) — Parent folder; if omitted, the link is created in the root folder.

Create a hyperlink (URL)

POST/odata/Document/AddHyperlink
ParameterTypeRequiredDescription
BodyobjectJSON object with the following fields:

projectId (Guid, required) — The project to add the hyperlink to.
linkAddress (string, required) — The URL of the hyperlink.
parentFolderId (Guid?, optional) — Parent folder; if omitted, the hyperlink is created in the root folder.

Update an existing file link or hyperlink (URL)

POST/odata/Document/ChangeFileLink
ParameterTypeRequiredDescription
BodyobjectJSON object with the following fields:

documentId (Guid, required) — The existing document whose file link is to be updated.
linkAddress (string, required) — The new URL/path for the file link.

Special Functions

Get the maximum file upload size

GET/odata/Document/GetFileUploadSizeLimit()

Get tracked documents of a project

GET/odata/Document/GetTrackedDocumentsForProject(projectId={projectId})
ParameterTypeRequiredDescription
projectIdGuidThe project ID.

Check whether a document with a specific internet message ID exists in the project

GET/odata/Document/HasDocumentWithInternetMessageIdInProject(internetMessageId={internetMessageId},projectId={projectId})
ParameterTypeRequiredDescription
internetMessageIdstringThe internet message ID (from email header).
projectIdGuidThe project ID.
Email Tracking

Use HasDocumentWithInternetMessageIdInProject to check whether an email has already been saved in the project. Use GetTrackedDocumentsForProject to list all tracked email documents of a project.


DocumentFolder

Data Model

PropertyTypeDescription
DocumentFolderIdGuid (UUID)Unique identifier of the folder.
ParentDocumentFolderIdGuid?Parent folder (null = root folder).
FolderNamestring?Folder name.
RelativePathstring?Relative path of the folder.
ProjectIdGuid?Associated project.
IsOrphanedbooleanIndicates whether the folder is orphaned.
CreatedDateDateTimeOffsetCreation date.

Endpoints

List all document folders

GET/odata/DocumentFolder

Get a single folder

GET/odata/DocumentFolder({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentFolderId.

Create a new folder

POST/odata/DocumentFolder
ParameterTypeRequiredDescription
BodyDelta<ApiDocumentFolder>JSON object with the folder properties.

Update a folder

PATCH/odata/DocumentFolder({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentFolderId.
BodyDelta<ApiDocumentFolder>JSON object with the fields to update.

Delete a folder

DELETE/odata/DocumentFolder({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentFolderId.
warning

Deleting a folder also removes all documents contained within it. This action cannot be undone.


DocumentFolderStructure

The DocumentFolderStructure entity defines automatic folder structure rules that are applied when creating new projects.

Data Model

PropertyTypeDescription
DocumentStructureIdGuid (UUID)Unique identifier of the folder structure rule.
FolderPathstring?Folder path that is automatically created.
RuleFieldstring?Field on which the rule is based.
RuleExpressionstring?Rule expression for automatic creation.
info

Folder structure rules automate directory creation. When a project matches the defined RuleField and RuleExpression, the associated folder hierarchy is automatically created. These rules can be configured under Account Settings > Documents.

Endpoints

List all folder structure rules

GET/odata/DocumentFolderStructure

Get a single folder structure rule by ID

GET/odata/DocumentFolderStructure({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentStructureId.

Create a new folder structure rule

POST/odata/DocumentFolderStructure
ParameterTypeRequiredDescription
BodyDelta<ApiDocumentFolderStructure>JSON object with the rule properties.

Update a folder structure rule

PATCH/odata/DocumentFolderStructure({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentStructureId.
BodyDelta<ApiDocumentFolderStructure>JSON object with the fields to update.

Delete a folder structure rule

DELETE/odata/DocumentFolderStructure({key})
ParameterTypeRequiredDescription
keyGuidThe DocumentStructureId.
warning

Deleting a folder structure rule cannot be undone.


OData Query Examples

All documents of a project

GET /odata/Document?$filter=ProjectId eq 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
GET /odata/Document?$filter=IsInternetLink eq true

Filter documents by file type

GET /odata/Document?$filter=FileType eq '.pdf'

Folder structure of a project

GET /odata/DocumentFolder?$filter=ProjectId eq 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'&$orderby=RelativePath
POST /odata/Document/AddHyperlink
Content-Type: application/json

{
"Url": "https://example.com/specification",
"DisplayName": "Technical Specification",
"ProjectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"DocumentFolderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Create a new folder

POST /odata/DocumentFolder
Content-Type: application/json

{
"FolderName": "Contracts",
"ProjectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ParentDocumentFolderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}