Edit Records

XML RPC API - Edit Records

  • The XML RPC APIs are part of Zoho Creator's v1 APIs, which will reach their end-of-life on February 3rd, 2021. We strongly recommend you to migrate to the new v2 APIs. Refer to this post to learn more.
  • Accounts in Zoho's Australia data center (.com.au) can only use Creator's v2 APIs
  • Corresponding v2 APIs: Update Records and Update Record by ID

URL

https://creator.zoho.com/api/xml/write

HTTP Method

POST

Parameters

Parameter NameUsageDescription
authtokenRequiredA valid API authtoken. Refer to this page to generate the authtoken
scopeRequiredSpecify the value as creatorapi
zc_ownernameRequiredThe application owner's name
<application name>RequiredThe name of the application that contains the form. Multiple applications can be updated at a time.
<form name>RequiredThe name of the form to edit records in. Multiple forms in an application can be updated at a time.
<field name>RequiredThe link name of the field. This parameter's value specifies the value to be set for that field.
process_until_limitRecommended

For performance reasons, this API supports editing a maximum of 200 records per call. Refer to this section to learn how to process when more than 200 records match the given criteria.

Refer to this page for the link names used in your applications.

Prerequisites

  • A valid AuthToken
  • Please ensure that you've enabled the API accesspermission for the required users. It's enabled by default. It determines if the user is allowed to use your Creator application's APIs.

Notes

  • Anyone with a valid authtoken can add a record to a public Form
  • Only the owner of the application can add a record to a private Form
  • The app owner can add records to multiple applications and multiple forms in the same call
  • Multiple picklist values must be specified within the <options> tag and each value must be specified in <option> tag

Sample Request

<form method="POST" action="https://creator.zoho.com/api/xml/write" >
 <input type="hidden" name ="authtoken" value="************">
 <input type="hidden" name ="scope" id="scope" value="creatorapi">
<input type="text" name="process_until_limit" value="true">
 <textarea name="XMLString" >
  <ZohoCreator>
    <applicationlist>
        <application name='sample'>
            <viewlist>
                <view name='Employee_Report'>
                    <update>
                        <criteria>
                            <![CDATA[(Name == "Jean" && DOB == "20-Jul-1981")]]>
                        </criteria>
                        <newvalues>
                            <field name='Basic'><value>34000</value></field>
                            <field name='Address'><value>UK</value></field>
                        </newvalues>
                    </update>
                </view>
            </viewlist>
        </application>
    </applicationlist>
</ZohoCreator>
</textarea>
<input type="hidden" name="zc_ownername" value="sampleapps">
<input type="submit" value="Update Record">
</form>
 

Sample Response

Below is an example of how this API's response will look when the API request includes process_until_limit=true and there are a maximum of 200 records that match the given criteria. Refer to this section for the response with regard to editing more than 200 records.

<?xml version="1.0" encoding="UTF-8" ?>
<response>
    <result>
        <form name="Employee">
          <update>
            <criteria>
                (Name == "Jean" && DOB == "20-Jul-1981")
            </criteria>
            <newvalues>
                <field name='Basic'>
                    <value>34000</value>
                </field>
                <field name='Address'>
                    <value>UK</value>
                </field>
            </newvalues>
                <status>Success</status>
            </update>
            <more_records>false</more_records>
        </form>
    </result>
</response

Error Codes

  • When the operation is successful, the response message will be displayed with status "Success"
  • 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 to know about them.

Limits

For performance reasons, the Edit Records XML RPC API supports editing up to 200 records per call. You'll have to include process_until_limit=true when hitting this API endpoint and loop your API requests till  more_records is returned as false in the response. The following table lists all the relevant scenarios:

Does the API request include
process_until_limit=true ?
Number of matching recordsResult
Yesup to 200All matching records will be edited. The more_records key in the response will have the value false.
YesMore than 200First 200 matching records will be edited and the more_records key in the response will have the value true.
You'll have to hit this API endpoint till the more_records key's value is returned as false.
Noup to 200All matching records will be edited. Response will not contain the more_records key.
NoMore than 200

This API will fail and the response will contain:

  • Error code: 8009
  • Error message: The number of records matching the criteria is more than 200.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocreator.com