Creating a Contact (Customers & Vendors)

Zoho Books API v3: Creating a Contact (Customers & Vendors)

Zoho Books API v3: Creating a Contact (Customers & Vendors)

The Contacts API is one of the most frequently used endpoints for automation. Whether you are syncing new sign-ups from your website or importing vendors from a procurement system, programmatically creating contacts ensures your ledger is always up to date without manual data entry.

At Kalki LLP, we specialize in "Clean-Data" integrations, ensuring that every contact created via API has the correct tax treatments, currency settings, and portal access from day one.


1. The Creation Request (POST)

To create a new contact, send a POST request to your regional endpoint.

Endpoint: POST /contacts?organization_id={organization_id}

Mandatory & Key Parameters

While Zoho only strictly requires the contact_name, a professional integration should include fiscal details.

ParameterTypeDescription
contact_nameStringRequired. Display name (Max 200 characters).
company_nameStringLegal company name.
contact_typeStringcustomer or vendor.
currency_idLongThe ID of the contact's currency (e.g., INR, USD).
payment_termsIntNet terms (e.g., 15 for Net 15).
vat_treatmentStringTax treatment (e.g., gst_registered, overseas).
gst_noString15-digit GST identification number (for India).

2. Sample Request Body (JSON)

A standard request includes the contact's name, their primary address, and their tax settings.

JSON
{
"contact_name": "Kalki LLP Enterprises",
"company_name": "Kalki Solutions Pvt Ltd",
"contact_type": "customer",
"billing_address": {
"attention": "Accounts Dept",
"address": "123 Business Hub",
"city": "Gurugram",
"state": "Haryana",
"zip": "122001",
"country": "India"
},
"is_portal_enabled": true,
"language_code": "en"
}

3. Deluge Implementation (Kalki LLP Automated Flow)

Inside Zoho Creator or CRM, you can automate this using the zoho.books.createRecord task, which handles the headers and authentication for you.

Code snippet
// Prepare the Contact Data Map
contactData = Map();
contactData.put("contact_name", "Kalki LLP New Customer");
contactData.put("contact_type", "customer");
contactData.put("currency_id", "460000000000097"); // Use actual ID

// Call Zoho Books
response = zoho.books.createRecord("contacts", "10234695", contactData, "kalki_connection");

if(response.get("code") == 0)
{
newContactID = response.get("contact").get("contact_id");
info "Contact Created! ID: " + newContactID;
}
else
{
info "Error: " + response.get("message");
}

4. Error Logs & Troubleshooting

If your contact creation fails, check these common error codes:

Error CodeMessageFix for Kalki LLP Developers
3000Duplicate Contact NameA contact with this name already exists in your Zoho Books organization.
9004Invalid Currency IDThe currency_id provided does not exist in your organization settings.
1038JSON Not Well FormedCheck for trailing commas or missing quotes in your request body.
57UnauthorizedYour Access Token has expired. See Step 4 of our OAuth guide.

5. Pro-Tip: Adding Contact Persons

A single "Contact" (the company) can have multiple "Contact Persons" (the humans you talk to). You can include them in the initial creation by adding a contact_persons array to your JSON. This is vital for ensuring invoices are emailed to the correct individuals automatically.


Sync Your Customer Database Seamlessly

Don't let manual entry slow down your sales cycle. Kalki LLP can help you bridge the gap between your CRM/Website and Zoho Books, ensuring your customer data is accurate, tax-compliant, and perfectly synced.

    • 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, ...
    • 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: Marking a Contact as Active

      Zoho Books API v3: Marking a Contact as Active When a contact is inactive in Zoho Books, they are hidden from the primary list and cannot be selected for new Invoices, Sales Orders, or Bills. The Mark as Active API is a specific "action" endpoint ...
    • Zoho Books API v3: Marking a Contact as Inactive

      Zoho Books API v3: Marking a Contact as Inactive In Zoho Books, you cannot delete a contact that has associated transactions (Invoices, Bills, or Payments). Instead, the best practice is to mark them as Inactive. This hides the contact from search ...
    • 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 ...