Blogs   Forums   Creator Home Toll Free : 888 900 9646

API Home >> Creator API  >> REST API >> REST API Methods >> Delete Record - POST Method

 


Delete Record - REST API - POST Method

 
Zoho Creator REST style Web API allows client applications to delete records from a Zoho Creator form,using the HTTP POST method. The records that satisfy the given criteria will be deleted. 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 delete a record ?

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



Request URL

XML : htpp://creator.zoho.com/api/xml/<applicationName>/<formName>/delete/
CSV : htpp://creator.zoho.com/api/csv/<applicationName>/<formName>/delete/
JSONhtpp://creator.zoho.com/api/json/<applicationName>/<formName>/delete/


Request Parameters

The request parameters comprises of criteria and reloperator.


Field
Description
applicationName
Name of the Zoho Creator application
formName
Name of the form in the applilcation
criteria
[string] - 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. The following operators are supported:
  • !=
  • <=
  • >=
  • <
  • >
  • =
<value> : The criteria column value
reloperator
[string] - To AND/OR operator to specify more than one criteria.



POST Method Format



<form method="method="POST"    action="http://creator.zoho.com/api/xml/<application owner name>/<application name>/<form name>/delete/apikey=[APIKEY]&ticket=[Ticket]">
 

 <input type="text"  name="criteria"  value="Criteria String in the format specified above">

<input type="text"  name="reloperator"  value="AND/OR">

<input type="submit"  value="Delete Record">

</form>




Note:

  1. Only Deluge Script names must be specified for form names, field names and application name. Refer http://creator.zoho.com/api/referenceto view the list of applications created, the form names and field names used in each application and the deluge names.
  2. Multiple criteria must be seperated by a comma.
  3. The following operators are supported for date fields: equals, not equal to, before, after
  4. You can delete only one record at a time.

Sample Request


1. Sample request to delete a record from a single form. The following sample deletes a record(s) form the form named "Employee" in the application named "sample".

<name="criteria" id="criteria" value="Name=Henry,ID=4000000008019">
<name="reloperator" id="reloperator" value="AND">




Sample XML Response

 


<?xml version="1.0" encoding="UTF-8" ?>
<response>
<result>
<form name="Employee">
<delete>
<criteria>
 <fieldname="Name" compOperator="Equals" value="Henry" />
<reloperator>AND</reloperator>
        <fieldname="ID" compOperator="Equals" value="4000000008019" />
 </criteria>
<status>Success</status>
</delete>
                                     </form>
                          </result>
          </response>



CSV Response

 


Form Name, Operation
          Employee,delete
   Status,Criteria
   Success,[Name Equals Henry "AND" ID Equals 4000000008019]



JSON Response

 


   {
"formname":
   [
"Employee",
{
"operation":
[
"delete",
        {
      "Criteria":
     [
  "Name Equals Henry \"AND\" ID Equals 20881000000248322"
  ]
},

{

  "status":
  [
  "Success"
  ]

             }
]
}
]
   }



If there is an error in the request format, the corresponding error code with the error message will be displayed. Please refer the topic, Error codes and description, to learn about the list of error code displayed. 


If the record is deleted from the database, the response message will be displayed with status as "Success".