Blogs   Forums   Creator Home Toll Free : 888 900 9646

API Home >> Creator API  >> REST API >> REST API Methods >> Update Record (Get Method)




 


Update Record  (Get method)


The GET calling convention is supported for testing purpose only.  For production purpose, use HTTP POST method.

Overview

Zoho Creator REST style Web API allows client applications to update records from a Zoho Creator form, using the HTTP GET method. The records that satisfy the given criteria will be updated. You can specify multiple criteria using "AND"/ "OR" operator. In return the user gets a formatted XML/CSV/JSON response from the called method.

Who can update a record ?

Only the owner of the application with valid APIKey can update a record in ZohoCreator.


Update record using record id

Request URL

XML 

http://creator.zoho.com/api/
test/xml/<applicationName>/<formName>/<recordId>/update/apikey=<API Key>&<setColumnName>=<newValue>

CSV

http://creator.zoho.com/api/
test/csv/<applicationName>/<formName>/<recordId>/update/apikey=<API Key>&<setColumnName>=<newValue>

JSON

http://creator.zoho.com/api/
test/json/<applicationName>/<formName>/<recordId>/update/apikey=<API Key>&<setColumnName>=<newValue>


Request Parameters


The request parameters comprises of criteria and reloperator.

Field
Description
applicationName
The name of the application.
formName
The name of the form in the application.
recordID
The unique record id generated by Zoho Creator for each record in the form.
setColumnName
The column name to be updated.
newValue
The new value to be updated for this column.


Sample Request

 


http://creator.zoho.com/api/test/xml/recruitment/Employee/4000000002208/update/
apikey=a14289d3322417901bea85df60f96101&Name=Vishal



Sample Response

The following is the XML response for the above request:

 


<?xml version="1.0" encoding="UTF-8" ?>

<response>
 <result>
 <form name="Employee">
 <update>
 
<criteria>
 <fieldname="ID" compOperator="EQUALS" value="4000000002208" />
      </criteria>
    
<newvalues>
    <field name="Name">
         <value>Vishal</value>
      </field>
</newvalues>
      
     <
status>Success</status>

</update>
 </form>
 </result>
 </response>
 

 

Equivalent CSV response

 


Form Name, Operation
Employee,update
Status,Criteria
Success,[ID EQUALS 2000000003003 SET Name = Vishal ]



Equivalent JSON response

 


{
    "formname":
        [
            "Employee",
                {
                    "operation":
                        [
                            "update",
                                {
                                    "Criteria":
                                        [
                                            "ID EQUALS 2000000003003"
                                        ]
                                },
                                {
                                    "newvalues":
                                        [
                                             {
                                                 "Name":"Vishal"
                                             }
                                        ]
                                },
                                {
                                    "status":
                                        [
                                            "Success"
                                        ]
                                }
                       ]
              }
        ]
}





Update record with criteria using AND operator


XML:

http://creator.zoho.com/api/test/xml/<applicationName>/<formName>/
update/matchall/<criteriaString>/
apikey=<API Key>&<setColumnName>=<newValue>

CSV:

http://creator.zoho.com/api/test/csv/<applicationName>/<formName>/
update/matchall/<criteriaString>/
apikey=<API Key>&<setColumnName>=<newValue>

JSON:

http://creator.zoho.com/api/test/json/<applicationName>/<formName>/
update/matchall/<criteriaString>/
apikey=<API Key>&<setColumnName>=<newValue>


Request Parameters

The request parameters comprises of criteria and reloperator.

Field
Description
applicationName
The name of the application.
formName
The name of the form in the application.
criteriaString
The criteria must be specified in the format "<criteria column name> <operator> <value>"

where,

<Criteria Column Name >
: 
The column name used to specify the update criteria.
<operator>:The operator used in the criteria.
 <value> : The criteria column value.
setColumnName
The column name to be updated.
newValue
The new value to be updated for this column.


Sample XML Request

 

http://creator.zoho.com/api/test/xml/recruitment/Employee/update/matchall/
EmailId=Jessy@adventnet.com,DOB=05-Sep-1980/apikey=81d0d3fb0f81892ff681fb4e5c4efd2f&Hobbies=Reading

 

Sample Response

The following is the XML response for the above request:




<?xml version="1.0" encoding="UTF-8" ?>
 <response>
 <result>
 <form name="Employee">
 <update>

 <criteria>
 <fieldname="EmailId" compOperator="Equals" value="Jessy@adventnet.com" />
 <reloperator>And</reloperator>
            <fieldname="DOB" compOperator="Equals" value="05-Sep-1980" />
   </criteria>

   <newvalues>
        <field name="Hobbies">
         <value>Reading</value>
      </field>
     </newvalues>

     <status>Success</status>
</update>
 </form>
 </result>
 </response> 

 

Equivalent CSV response

 

Form Name, Operation
Employee,update
Status,Criteria
Success,[EmailId Equals Jessy@adventnet.com And DOB Equals 05-Sep-1980 SET Age = 25]

 


Equivalent JSON response

 

{
    "formname":
        [
            "Employee",
                {
                    "operation":
                        [
                            "update",
                                {
                                    "Criteria":
                                        [
                                            "EmailId Equals craig@adventnet.com And DOB Equals 05-Sep-1980"
                                        ]
                                },
                                {
                                    "newvalues":
                                        [
                                            {
                                       "Hobbies":"Reading"
                                            }
                                        ]
                                },
                                {
                                    "status":
                                        [
                                            "Success"
                                        ]
                                }
                        ]
                }
]
}


 


Update record with criteria using OR operator


XML:


http://creator.zoho.com/api/test/xml/<applicationName>/<formName>/
update/matchany/<criteriaString>/
apikey=<API Key>&<setColumnName>=<newValue>

CSV:

http://creator.zoho.com/api/test/csv/<applicationName>/<formName>/
update/matchany/<criteriaString>/
apikey=<API Key>&<setColumnName>=<newValue>

JSON:

http://creator.zoho.com/api/test/json/<applicationName>/<formName>/
update/matchany/<criteriaString>/
apikey=<API Key>&<setColumnName>=<newValue>


Request Parameters

The request parameters comprises of criteria and reloperator.

Field
Description
applicationName
The name of the application.
formName
The name of the form in the application.
criteriaString
The criteria must be specified in the format "<criteria column name> <operator> <value>"

where,

<Criteria Column Name >
: 
The column name used to specify the delete criteria.
<operator>:The operator used in the criteria.
 <value> : The criteria column value.
setColumnName
The column name to be updated.
newValue
The new value to be updated for this column.


Sample Request

 

http://creator.zoho.com/api/test/xml/Sample_Application/Employee_Form/update/matchany/Name=Henry,Age=23/
apikey=a71b267fd787f9954db3ae42b20bd09b&Age=25


 

Sample Response

The following is the XML response for the above request:


<?xml version="1.0" encoding="UTF-8" ?>
<response>
 <result>
 <form name="Employee_Form">
 <update>
 <criteria>

 <fieldname="Name" compOperator="Equals" value="Henry" />
 <reloperator>Or</reloperator>
 <fieldname="Age" compOperator="Equals" value="23" />

</criteria>

 <newvalues>

  <field name="Age">
  <value>25</value>
     </field>

    </newvalues>

 <status>Success</status>

 </update>
 </form>
 </result>
 </response>



Equivalent CSV response
 

 

Form Name, Operation
Employee,update
Status,Criteria
Success,[EmailId Equals kevin@gmail.com Or DOB Equals 05-Sep-2007 SET Hobbies = Reading ]

 

Equivalent JSON response
 

 


{
    "formname":
        [
            "Employee",
                {
                    "operation":
                        [
                            "update",
                                {

                                    "Criteria":
                                       [
                                            "EmailId Equals lindsay@yahoo.com Or DOB Equals 05-Sep-2007"
                                        ]
                                },
                                {
                                    "newvalues":
                                        [
                                            {
                                                "Hobbies":"Reading"
                                             }
                                        ]
                                },
                                {
                                    "status":
                                        [
                                            "Success"
                                        ]
                                }
                        ]
                }
        ]
}



Note: If you are not logged in to your account, you have to get the ticket and send in the request.