Purpose

This page lists the APIs that are used to Upload, Add, Delete and Edit Files. 

Add and Upload File

Apart from individually Adding and Uploading files, you can also make use of a single API to have these two actions performed.

Request URL

https://people.zoho.com/people/api/files/uploadFileMultipart"?authtoken=<token>&uploadfile=<file>&fileName=<fileName>fileDesc=<fileDesc>&fileType=<fileType>&confidential=<confidential>&roleId=<roleId>&catId=<categoryId>&employeeId=<employeeId>&isreportingTo=<isreportingTo>&notifyToall=<notifyToall>&locationId=<locationId>&newCatName=<newCatName>

Request Parameters

authtokenSpecify the authentication token
upload fileSpecify the upload file
fileName Specify the filename
fileDesc Specify the fileDescription
 
fileType Specify 1 to add Company File (or) Specify 0 to add Hr File
confidential(Company Files)Specify 0 to make Company Files downloadable or Specify 1 to make Company Files non-downloadbale
confidential(HR Files)Specify 0 to make HR Files viewable for Employee or Specify 1 to make HR Files non-viewable for Employee
roleIdSpecify the roleId
catId Specify the filecategoryId
employeeIdSpecify the employeeId
isreportingToSpecify true to tag isreportingto option if reporting can see his/her subordinates files
notifyToallSpecify true to the notifyToall option to sent an email
locationIdSpecify the locationId
newCatNameSpecify the newCategoryname

Response

JSON Response

{"response":{"result":{"FILEID":6000000043065},"message":"Data added successfully","uri":"/api/files/uploadFileMutlipart","status":0}}
 

XML Response

<response uri="/api/files/uploadFileMutlipart">
    <status>0</status>
    <message>Data added successfully</message>
    <result>
        <message>Successfully Added</message>
        <FILEID>6000000043065</FILEID>
    </result>
</response>

Edit File

Request URL

https://people.zoho.com/people/api/files/editFile?authtoken= 7d985878998943g4j09h43dd0b167dda34b&fileName=<fileName>&filePath=<filePath>&fileDesc=<fileDesc>&fileType=<fileType>&confidential=<confidential>&roleId=<roleId>&catId=<categoryId>&employeeId=<employeeId>&isreportingTo=<isreportingTo>&notifyToall=<notifyToall>&locationId=<locationId>&newCatName=<newCatName>&fileId=<fileId>

Request Parameters 

authtokenSpecify the authentication token
fileName   Specify the filename
filePath  Get the filepath from upload file and specify
fileDesc    Specify the fileDescription
fileTypeSpecify 1 to add Company File (or) Specify 0 to add Hr File
confidentialSpecify true to tag an employee confidential file  
roleId      Specify the roleId
catId     Specify the filecategoryId
employeeIdSpecify the employeeId
isreportingToSpecify true to tag isreportingto option if reporting can see his/her subordinates files
notifyToallSpecify true to the notifyToall option to sent an email
locationIdSpecify the locationId
newCatNameSpecify the newCategoryname
fileId   Specify the fileId you want to edit

Example URL

https://people.zoho.com/people/api/files/editFile?

authtoken=7d985878998943g4j09h43dd0b167dda34b&fileName=payslip.png&filePath=4319220/1478050780330/FileCabinet/payslip.png&fileDesc=fileapi&fileType=1(or)0&confidential=0&roleId=6000000043061&catId=6000000043062&employeeId=6000000043063&isreportingTo=0(or)1¬ifyToall=true(or)false&locationId=6000000043064&newCatName=editofferletter&fileId=6000000043065

XML Response

<response uri="/api/files/editFile">
<status>0</status>
<message>
Data updated successfully
<result>
<message>Successfully Updated</message>
<FILEID>6000000043065</FILEID>
</result>
</response>

Delete Files

Request Url 

https://people.zoho.com/people/api/files/deleteFiles?authtoken=<token>& deleteFileId=<fileId>

Request Parameters

authtokenSpecify the authentication token
deleteFileIdSpecify the file Id you want to delete


Example URL

https://people.zoho.com/people/api/files/deleteFiles?authtoken=7d985878998943g4j09h43dd0b167dda34b&deleteFileId=6000000043065

Note : You can give multiple file ids to delete files.

Upload File

Request URL

https://people.zoho.com/people/api/files/uploadFile?authtoken=<token>&uploadfile=<file>

Request Parameters

authtokenSpecify the authentication token
uploadfileSpecify the upload file


Response

XML Response : -

<response uri="/api/files/uploadFile">
<status>0</status>
<message>Uploaded successfully
<result></result>
<message>Successfully Added</message>
<filepath>4319220/1478050780330/FileCabinet/offerletter.png</filepath></response>
 

JSON Response :-

{"response":{"message":"Uploaded successfully","result":{"FILEPATH":"4319220/1478050780330/FileCabinet/offerletter.png","FILENAME":"offer-letter.png"},"status":0,"uri":"/api/files/uploadFile"}}

Add File

Request URL

https://people.zoho.com/people/api/files/addFile?authtoken=<token>&fileName=<fileName>&filePath=<filePath>&fileDesc=<fileDesc>&fileType=<fileType>&confidential=<confidential>&roleId=<roleId>&catId=<categoryId>&employeeId=<employeeId>&isreportingTo=<isreportingTo>&notifyToall=<notifyToall>&locationId=<locationId>&newCatName=<newCatName>

Request Parameters

authtokenSpecify the authentication token
fileName Specify the filename
filePathGet the filepath from upload file and specify
fileDesc Specify the fileDescription
 
fileType Specify 1 to add Company File (or) Specify 0 to add Hr File
confidential(Company Files)Specify 0 to make Company Files downloadable or Specify 1 to make Company Files non-downloadbale
confidential(HR Files)Specify 0 to make HR Files viewable for Employee or Specify 1 to make HR Files non-viewable for Employee
roleIdSpecify the roleId
catId Specify the filecategoryId
employeeIdSpecify the employeeId
isreportingToSpecify true to tag isreportingto option if reporting can see his/her subordinates files
notifyToallSpecify true to the notifyToall option to sent an email
locationIdSpecify the locationId
newCatNameSpecify the newCategoryname

Example URL

https://people.zoho.com/people/api/files/addFile?authtoken=7d985878998943g4j09h43dd0b167dda34b&fileName=offer-letter.png&fileName=offer-letter.png& filePath=4319220/1478050780330/FileCabinet/offerletter.png&fileDesc=fileapi&fileType=1(or)0&confidential=0&roleId=6000000043061&catId=6000000043062&employeeId=6000000043063& isreportingTo=0(or)&notifyToall=true(or)false&locationId=6000000043064& newCatName=offerletter

Response

XML Response 

<response uri="/api/files/addFile">
<status0></status>
<message>Data added successfully</message>
<result>
<message>Successfully Added</message>
<FILEID>6000000043065</FILEID>
</result>
</response>

JSON Response

{"response":{"message":"Data added successfully","result":{"FILEID":6000000043065},"status":0,"uri":"/api/files/addFile"}}

Get File Categories

Request Url 

https://people.zoho.com/people/api/files/getCategories?authtoken=<token>

Request Parameters 

authtokenSpecify the authentication token


Response

XML Response

<response uri="/api/files/getCategories">
<status>0</status>
<message>Data fetched successfully</message>
<result>
[{"CatID":"3000000012007","CatName":"OfferLetter"},{"CatID":"3000000036001","CatName":"Payslip"},
</result>
</response>

JSON Response

{"response":{"message":"Data fetched successfully","result":{"CatID":3000000012007,"CatName":"OfferLetter"},"status":0,"uri":"/api/files/getCategories"}}

GetFiles 

Request URL 

https://people.zoho.com/people/api/files/getAllFiles?authtoken=<token>&fileType=<fileType>&start=<start>&limit=<limit>&roleId=<roleId>&catId=<catId>&employeeId=<employeeId>&locationId=<locationId>&filterBy=<filterBy>

Request Parameters 

authtokenSpecify the authentication token
fileType  Specify 1 to get Company Files (or)   Specify 0 to get Hr Files  
startSpecify the start limit
limit  Specify the end limit
roleId Specify the roleId
catId  Specify the filecategoryid  
employeeId Specify the employeeId
locationId  

Specify the locationId

filterBy     Specify the filter like shown as ('all','my','subordinates','allrole','myrole'),

Example URL

https://people.zoho.com/people/api/files/getAllFiles?authtoken=7d985878998943g4j09h43dd0b167dda34b&fileType=0&start=0&limit=25&roleId=6000000043061&catId=6000000043062&employeeId=6000000043063&locationId=6000000043064&filterBy=my

Response 

XML Response

<response uri="/api/files/getAllFiles">
<status>0</status>
<message>Data fetched successfully</message>
<result>

[{"fileName":"payslip.html","fileCatName":"3","filePath":"1480399880022FileCabinet/payslip.txt","fileRoleID":"","fileDate":"11-29-2016","fileDesc":"","fileLocationID":"","decryptfilePath":"1480399880022FileCabinet/payslip.txt","fileCreateByName":"","fileConfident":0,"fileCategoryID":"2790000000304003","fileOwnerID":"","isreportingTo":0,"fileUsageSpace":1313890,"fileType":1,"fileID":"27900000003390032"},

{"fileName":"offerletter.txt","fileCatName":"offerletter","filePath":"1480399918832FileCabinet/offerletter.txt","fileRoleID":"","fileDate":"11-29-2016","fileDesc":"","fileLocationID":"","decryptfilePath":"1480399918832FileCabinet/offerletter.txt","fileCreateByName":"","cats":[{"getFileCatName":"3","getFileCatId":"2790000000304009"},{"getFileCatName":"99","getFileCatId":"2790000000145005"}],"fileConfident":0,"fileCategoryID":"2790000000145005","fileOwnerID":"","isreportingTo":0,"fileUsageSpace":1313790,"fileType":1,"fileID":"27900000003380023"}]

</result>
</response>

JSON Response

{"response":{"result":[{"fileOwnerName":"John g","fileName":"Payslip","fileCatName":"Payroll","filePath":"14748722981FileCabinet/usecase.rtf","fileRoleID":"","fileDate":"11-30-2016","fileDesc":"","fileLocationID":"","decryptfilePath":"1479448722981FileCabinet/usecase.rtf","fileCreateByName":"","cats":[{"getFileCatName":"Payroll","getFileCatId":"2790000000340001"}],"fileConfident":0,"fileCategoryID":"2790000000340001","fileOwnerID":"2790000000092117","isreportingTo":0,"fileUsageSpace":13137890,"fileType":0,"fileID":"2790000000331011"}],"message":"Data fetched successfully","uri":"/api/files/getAllFiles","status":0}}

Note : If you want xml response provide xml in url

View File

Request Url 

https://people.zoho.com/people/api/files/viewFile?authtoken=<token>& fileId=<fileId>

Request Parameters

authtokenSpecify the authentication token
FileIdSpecify the file Id you want to view


Example URL

https://people.zoho.com/people/api/files/viewFile?authtoken=7d985878998943g4j09h43dd0b167dda34b&fileId=6000000043065

Download File

Request Url 

https://people.zoho.com/people/api/files/downloadFile?authtoken=<token>& fileId=<fileId>

Request Parameters

authtokenSpecify the authentication token
FileIdSpecify the file Id you want to download


Example URL

https://people.zoho.com/people/api/files/downloadFile?authtoken=7d985878998943g4j09h43dd0b167dda34b&fileId=6000000043065