A collection of help pages for using the API.
URL | /Api/v2/Company/{companyId}/Document/{documentId} |
Accepted verbs | GET, POST, PUT, DELETE |
Description |
Provides methods to get and administrate documents and folders for a company. |
Get the whole document structure for a company.
Name | Description | Additional information |
---|---|---|
companyId | Company id. |
URI parameter |
The whole document structure in the root folder for the company. See DocumentFolder.
Get a specific DocumentFile or DocumentFolder by its id.
Name | Description | Additional information |
---|---|---|
companyId | Company id. |
URI parameter |
documentId | Id of the document to fetch. |
URI parameter |
The requested DocumentFile or DocumentFolder.
Create a new document or folder. The submitted DocumentFile or DocumentFolder should not specify its id; it will be automatically assigned when it is being created. It is possible to create a path of folders by specifying a segmented path name that does not already exist. For example, in an empty root folder it is possible to create the path '/path/to/some/folder' by creating a folder with that name. It will automatically create the four folders 'path', 'to', 'some' and 'folder' in the specified hierarchy. Although, it is not possible to create tree structures of folders by manually providing child ids in the folder object's child property. It is also possible to bulk create many file and/or folders by posting an array of DocumentFolder and/or DocumentFile.
Name | Description | Additional information |
---|---|---|
companyId | Company id. |
URI parameter |
document | The new DocumentFile or DocumentFolder to create. |
Body data |
The newly created DocumentFile or DocumentFolder. The object will now have an id assigned to it. If the request pretains to bulk create documents, the return value will be an array with the newlty, successfully created DocumentFile or DocumentFolder
Update an existing DocumentFile or DocumentFolder. Files can be moved around in the folder structure by redefining its parent. Changing the children will not affect the folder structure.
Name | Description | Additional information |
---|---|---|
companyId | Company id. |
URI parameter |
document | Updated DocumentFile or DocumentFolder. |
Body data |
The DocumentFile or DocumentFolder with updated.
Delete a document or folder. Deleting a folder with underlying content will result in removal of that whole structure.
Name | Description | Additional information |
---|---|---|
companyId | Company id. |
URI parameter |
documentId | Id of the document to delete. |
URI parameter |