Upload APIs

This topic is deprecated. Please access the new set of "Upload APIs" from over here: "https://www.zoho.com/docs/zoho-docs-api.html#upload

Upload APIs

Zoho's upload APIs allows you to import new spreadsheets and presentations in to your Zoho account in different file formats. As this method involves a write request, you are required to do a HTTPs multi-part form POST with a few additional parameters.

Request URI : (HTTPs POST)

Developers can send the request for uploading documents in the following URI format :

Zoho Sheet (Spreadsheets) :
https://sheet.zoho.com/api/<access>/<format>/uploadbook?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI
Zoho Show (Presentations) :
https://show.zoho.com/api/<access>/<format>/uploadpresentation?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI
 Access : private

HTTPs Method : POST

Response Formats : xml, json

Form Request Parameters Reference

The following are the parameters that needs to be passed in multi-part HTTPs POST request for Writer/Sheet/Show :

Parameter Value
Mandatory. Actual document content to be uploaded to respective Zoho Services (Sheet/Show).
workbookName / presentationname
Optional. Name to be given to this uploaded book will be derived from the file name, by default. Use this parameter if you wish to override the default name.
Optional. contenttype will be derived from the attached file name by default. Use this parameter, if you want to override this.

Possible values for spreadsheets : xls, xlsx, ods, sxc, csv, tsv
Possible values for presentations : ppt, pptx, pps, ppsx, odp, sxi

Multi-part Form Submit - Sample
<form method="POST" action="https://sheet.zoho.com/api/private/xml/uploadbook" enctype="multipart/form-data" 
target="_self" accept-charset="UTF-8">
File : <input type="file" name="content" size="38"> <br>
<input type="hidden" name="apikey" value="[Zoho_API_Key]">
<input type="hidden" name ="authtoken" id="authtoken" value="bad18eba1ff45jk7858b8ae88a77fa30">
<input type="hidden" name ="scope" id="scope" value="DataAPI">
<input type="hidden" name="contenttype" value="[xls|xlsx|ods|sxc|csv|tsv]">
<input type="hidden" name="workbookName" value="[workbookname value]">
<input type="submit" name="submit" value="Upload">
Response Parameters Reference

Common Parameters (Writer/Sheet/Show)

Parameter Value
workbookId / presentationId
Unique ID associated with the spreadsheet or presentation that is being uploaded.
workbookName / presentationName
Name of the spreadsheet or presentation that is being uploaded.

Sprecific Parameters (Zoho Sheet only)

Parameter Value
Number of milliseconds between the spreadsheet's created time and midnight, January 1, 1970 UTC.
Advisory lock for update operation. Ensures that updates made to workbook are consistent.

Sample Response :

The following is a response (both in XML & JSON) for uploading a spreadsheet to a Zoho account.

<?xml version="1.0" encoding="UTF-8" ?> 
<response uri="/api/private/xml/uploadbook">


"uri": "/api/private/json/uploadbook",
Sample Code (C# .NET)

For developers who are using .NET for their integration, we have a comprehensive server-side sample code for the "upload document" method and it can be used for any of the 2 services (Sheet and Show). Details can be found here.

    Post a comment

    Your Name or E-mail ID (mandatory)

    Note: Your comment will be published after approval of the owner.

     RSS of this page