Creator API

REST API - Edit Records

URL

When accessed by the application owner:

https://creator.zoho.com/api/<ownername>/<format>/<applicationName>/form/<formName>/record/update/

When accessed by a shared user:

https://creator.zoho.com/api/<ownername>/<format>/<applicationName>/view/<viewName>/record/update/

where <ownername> is the admin username which can be obtained using zoho.adminuser or zoho.appuri variables. You can also view your app URL in the URL bar of your browser for example, <https://creator.zoho.com/<ownername>/<applicationname>/...> to obtain the <ownername>.
<applicationName> and <formName> are the link names of your application and form as can be referred from here
and <format> is the type of response format as listed below..

Formats

xml, json

HTTP Method

POST

Parameters

Parameter Name Usage Description
authtoken Required. A valid Auth Token. Refer https://api.creator.zoho.com/Generate-Auth-Token.html for generating authtoken.
scope Required Specify the value as creatorapi
criteria Required.

The criteria must be specified in the format <criteria column name> <operator> <value>
where <criteria column name> is the link name of the field to check <value> against
and <operator> is the operator to use. Some of the expamples for the operators supported are
!=, <=, >=,<, >, =

Example : (Name == "Jean" && DOB == "20-Jul-1981")

<field name> Required. <field name> is the link name of a field. This parameter's value specifies the value to be set for that field. Refer to this page for the link names used in your applications.
formname Optional. Specifies the link name of the form being updated. Required if being updated by a shared user.

Prerequisites

Sample Request

<form method="POST" action="https://creator.zoho.com/api/sampleapps/json/sample/form/Employee/record/update/">
<input type="hidden" name ="authtoken" value="**********">
<input type="hidden" name ="scope" id="scope" value="creatorapi">
<input type="text" name="criteria" value="Name=Gary">

<input type="text" name="Basic" value="20000">
<input type="text" name="Address" value="UK">

<input type="submit" value="Update Record">
</form>

Sample Response

XML response

<response>
     <result>
          <form name="Employee">
               <update>
                     <criteria>Name=Gary</criteria>
                            <newvalues>
                                 <field name="Basic">
                                         <value>20000</value>
                                 </field>
                                 <field name="Address">
                                           <value>UK</value>
                                 </field>
                           </newvalues>
                                  <status>Success</status>
                    </update>
             </form>
      </result>
</response>

JSON response

{"formname":["RestAPI",{"operation":["update",{"newvalues":[{"Basic":"20000","Address":"UK"}],"criteria":"Name=Gary","status":"Success"}]}]}

Note:

  • The owner of the application with authtoken can update a record in a Form.
  • A user with an authtoken and share permission can update a record in a View with record editing enabled.
  • You can update a multiselect field by comma separated values. For example, <input type="text" name="mulSelect" value="A,C" />

Error Codes

If there is an error in the request format, the corresponding error code with error message will be displayed. Please refer to the topic Error codes and descriptions for the list of error codes. If the operation is successful, the response message will be displayed with status as "Success".

Top