Updating Contact Information

Zoho Books API v3: Updating Contact Information

Zoho Books API v3: Updating Contact Information

Business relationships are dynamic—addresses change, contact persons move, and tax statuses get updated. The Update a Contact API allows you to programmatically modify any attribute of an existing customer or vendor.

At Kalki LLP, we design update workflows that ensure data integrity, preventing the accidental overwriting of critical financial details like payment terms or GST numbers.


1. The Update Request (PUT)

To update a contact, you must perform a PUT request and include the unique contact_id in the URL.

Endpoint: PUT /contacts/{contact_id}?organization_id={organization_id}

Key Characteristics of the PUT Request:

  • Partial Updates: You do not need to send the entire contact object. You only need to send the fields you wish to modify.

  • Array Overwriting: Be careful with arrays like contact_persons. If you provide this array in your update, it will replace the entire existing list of contact persons for that contact.


2. API Payload Example (JSON)

In this example, we are updating the company name and adding a new primary billing address.

JSON
{
"company_name": "Kalki Tech Global Solutions",
"payment_terms": 45,
"billing_address": {
"attention": "Finance Manager",
"address": "789 Innovation Way",
"city": "Gurugram",
"state": "Haryana",
"zip": "122002",
"country": "India"
}
}

3. Implementation in Deluge (Kalki LLP Best Practices)

When updating via Deluge, we recommend fetching the existing record first if you are performing logic-based updates (like appending notes).

Code snippet
// Define the Contact ID and Update Data
contactID = "460000000026049";
updateData = Map();
updateData.put("company_name", "Kalki LLP - Updated");
updateData.put("payment_terms", 60);

// Execute the Update in Zoho Books
response = zoho.books.updateRecord("Contacts", "123456789", contactID, updateData, "kalki_connection");

if(response.get("code") == 0)
{
info "Contact updated successfully.";
}
else
{
info "Update failed: " + response.get("message");
}

4. Critical Considerations: Contact Persons

One of the most common pitfalls developers face is managing Contact Persons during a contact update.

  • To Edit a Person: You must include their specific contact_person_id within the contact_persons array in your JSON body.

  • To Remove a Person: Simply omit them from the contact_persons array in your update request.


5. Error Logs & Troubleshooting

Error CodeMeaningFix for Kalki LLP Developers
2Invalid IDThe contact_id in the URL does not exist or has been deleted.
3000Name ConflictYou are trying to update the contact_name to a value that already exists for another contact.
57UnauthorizedYour OAuth token lacks the ZohoBooks.contacts.UPDATE scope.
1005Validation FailedA mandatory field (like contact_name) was sent as an empty string.

6. Pro-Tip: Changing Contact Status

While you can update many fields here, if you specifically want to mark a contact as Inactive, it is better to use the specialized /active or /inactive endpoints rather than a general PUT request. This ensures all associated background processes (like stopping payment reminders) are triggered correctly.


Maintain Data Precision with Kalki LLP

Inaccurate contact data leads to missed payments and tax compliance issues. Kalki LLP helps businesses build automated data cleansing tools that keep Zoho Books perfectly in sync with your master CRM or ERP records.

    • Related Articles

    • Zoho Books vs Tally: Which is Right for Your Business in 2025?

      Overview: Why Compare Zoho Books and Tally in 2025? In 2025, modern businesses are moving fast—and their accounting software needs to keep up. Two widely used solutions in India are Tally and Zoho Books, but they differ significantly in approach, ...
    • Zoho Books API v3: Updating Organization Settings

      Zoho Books API v3: Updating Organization Settings Maintaining accurate business details is critical for compliance and professional branding. While many settings are configured during setup, your integration may need to update organization-level ...
    • Zoho Books API v3: Retrieving Detailed Contact Information

      Zoho Books API v3: Retrieving Detailed Contact Information The Get a Contact API is the standard method for fetching the "Single Source of Truth" for a specific entity in your ledger. It returns a comprehensive JSON object that includes everything ...
    • Trigger Assignment and Workflow Rules in Zoho CRM via Deluge & API

      How to Trigger Workflow Rules in Zoho CRM Using Deluge When working with Zoho CRM automation, records created, updated, or deleted via Deluge do not trigger workflow or assignment rules automatically. This is expected behavior. Zoho CRM separates ...
    • Zoho Books API v3: Update Contact via Unique Custom Field

      Zoho Books API v3: Update Contact via Unique Custom Field Updating records via internal IDs can be a bottleneck. Zoho Books allows you to bypass the contact_id by using a Custom Field as a unique identifier. This endpoint also supports the Upsert ...