REST API
SOAP API
FAQ
Changelog
Terms & Conditions
Help Center
REST API
SOAP API
FAQ
Changelog
Terms & Conditions
Help Center
  • Getting Started
  • AuthenticateService
  • AccountService
  • AttachmentService
  • BudgetService
  • ClientService
  • CompanyService
  • FileService
  • InvoiceService
  • PaymentService
  • PersonService
  • ProductService
  • ProjectService
  • SalesOppService
  • TemplateService
  • TimeService
  • TransactionService

FileService

WebService for administration of files on the file area and the project files.

The WebService is divided into two parts. FileService for uploading and downloading of files, and FileInfoService for information about categories and files.

FileServiceFileService WSDL

FileInfoServiceFileInfoService WSDL

Data Types

Guides

Uploading a new file

In order to upload a new file, determin where the file should be located. For this the GetFolderContentInfo should be used to get e.g. the FolderId needed. To start a file upload call AppendChunk. The response contains a tmpId that is used for the subsequent file chunk uploads. Once all the data have been transmitted, call the Save method with the tmpId and the FileInfo (filename, FolderId) to save the file.

Updating a file

To update a file. Delete the file and then reupload it.

Deleting a file

To delete a file, call the Delete method and specifying the FileId and the FolderId.

Warning

Please note: The Delete methods requires administrator privileges. To get these rights contact our support at support@24SevenOffice.com

Getting folder and file info

You use the GetFolderContentInfo method to get information about files and folders. The response will give you a FileId and a FolderId that is used when downloading files.

You have a number of search parameters available, e.g. Customers, Projects, Dates etc. The TypeOfResult parameter lets you choose if you want Files, Folders or All (both files and folders) in the response.

If you set FolderId to 0 you'll get the files and folders from the shared folder in the file module.

Warning

Please note: When using the search parameters, ProjectId will take precedence over FolderId so these cannot be combined. First you would search for ProjectId information and then use the return data to get specific FolderId data without adding the ProjectId as a search parameter.

Downloading files

Before downloading files you should have identified them through requests to GetFolderContentInfo. This method will provide you with the FolderId and FileId that you need for downloading files. You can then make a request to PrepareFileDownload with the FolderId and FileId which will return a TmpId that you use for the actual download. If the file is large, now is a good time to get a refill on your coffee, this could take a while. Once you get a response with the TmpId you can proceed with the actual file download.

In order to download the file content you send a request to [DownloadFileChunk] with the TmpId and ChunckNum (Yes, ChunckNum is written wrong here, so if you're not using a SOAP framework and typing in all property names by hand, beware). Each chunk is 546533 bytes. You start by setting ChunckNum to 0 and then work your way up, so 0, 1, 2, 3 etc. Once a chunk is less than 546533 bytes you're at the end of the download. When you stitch together these parts you'll have a complete file on your end.

Checking a file hash

When you have uploaded a new file, you can check the content of the file by using the HashFile method.
The HashFile requires a tempId which you get from the AppendChunk method.
Please note that this needs to be done before you use the Save method since the save will delete all temporary data.

Methods

FileService

MethodInput typeReturn typeDescription
GetMaxRequestLength-LongUploading
AppendChunkAppendChunkStringUploading
AppendChunkByLengthAppendChunkByLengthStringUploading
SaveSaveVoidSave the appended file
PrepareFileDownloadPrepareFileDownloadGetFileInfoDownloading
DownloadFileChunckDownloadFileChunckByte[]Downloading
HashFileHashFileByte[]Uploading and Downloading
EndFileDownloadEndFileDownloadVoidDownloading

FileInfoService

MethodInput typeReturn typeDescription
GetFolderContentInfoParametersGetFolderContentInfoResultGets the location of the files/folders
ReleaseFileReleaseFileBoolean
DeleteDeleteBooleanDeletes the specified file/folder
GetFileInfoGetFileInfoFile
FileSizeFileSizeInt
Last Updated: 1/7/26, 2:26 PM
Prev
CompanyService
Next
InvoiceService