How to List and Filter Contacts

Zoho Books API v3: How to List and Filter Contacts

Zoho Books API v3: How to List and Filter Contacts

The List Contacts API allows you to retrieve a collection of all customers and vendors within a Zoho Books organization. Because businesses often have thousands of records, mastering the pagination and filtering parameters of this endpoint is essential for building high-performance integrations.

At Kalki LLP, we use these filtering techniques to help businesses generate custom reports and keep their external databases in sync with real-time financial data.


1. The Listing Endpoint (GET)

To fetch your contacts, send a GET request. By default, Zoho returns 200 records per page.

Endpoint: GET /contacts?organization_id={organization_id}

Mandatory Headers

Header NameValueDescription
AuthorizationZoho-oauthtoken {access_token}Requires ZohoBooks.contacts.READ scope.

2. Powerful Query Parameters (Filtering & Sorting)

To avoid downloading unnecessary data, use these parameters to narrow down your results:

ParameterTypeDescription
contact_nameStringSearch for contacts by name (partial match).
emailStringSearch for a contact by their primary email address.
statusStringFilter by status: active, inactive, or all.
contact_typeStringFilter by customer or vendor.
sort_columnStringSort by contact_name, first_name, last_name, etc.
pageIntegerThe page number to retrieve (Default: 1).
per_pageIntegerNumber of records per page (Max 200).

Example URL for Kalki LLP Developers:

GET /contacts?organization_id=12345&contact_type=customer&status=active&sort_column=contact_name


3. Sample JSON Response

The response includes a contacts array and a page_context object to help you manage large datasets.

JSON
{
"code": 0,
"message": "success",
"contacts": [
{
"contact_id": "460000000026049",
"contact_name": "Kalki LLP Solutions",
"company_name": "Kalki Tech",
"contact_type": "customer",
"status": "active",
"email": "info@kalkillp.com",
"outstanding_receivable_amount": 1500.00,
"currency_code": "INR"
}
],
"page_context": {
"page": 1,
"per_page": 200,
"has_more_page": true
}
}

4. Implementation in Deluge (Kalki LLP Best Practices)

When working within Zoho, you can handle the list and loop through results using this pattern:

Code snippet
// Parameters to filter only active vendors
params = Map();
params.put("contact_type", "vendor");
params.put("status", "active");

response = zoho.books.getRecords("Contacts", "123456789", params, "kalki_connection");

if(response.get("code") == 0)
{
contactsList = response.get("contacts");
for each contact in contactsList
{
info "Vendor: " + contact.get("contact_name") + " | Email: " + contact.get("email");
}

// Logic to check for more data
if(response.get("page_context").get("has_more_page") == true)
{
info "Note: More vendors exist. Fetch page 2 if needed.";
}
}

5. Error Logs & Troubleshooting

Error CodeMeaningFix
57UnauthorizedYour Access Token has expired. Refresh using Step 4 of the OAuth guide.
45Rate LimitYou've exceeded the 100 requests per minute limit.
2Invalid IDThe organization_id is missing or incorrect.
Empty ListNo ResultsYour filters (e.g., email) matched zero records. Verify the search string.

6. Strategic SEO Tip: "Search by Email"

Including this guide on kalkillp.com targets developers looking for specific queries like "Zoho Books search contact by email" or "Zoho Books API list active vendors." By demonstrating how to use page_context, you show that your team understands how to handle enterprise-level data volume.


Optimize Your Data Retrieval

Stop fetching your entire database every time you need a single contact. Kalki LLP can help you implement advanced server-side search logic to make your integrations lightning-fast.

    • 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: How to List Contacts

      Zoho Books API v3: How to List and Filter Contacts The List Contacts API allows you to retrieve a collection of all customers and vendors within a Zoho Books organization. Because a business can have thousands of contacts, mastering the pagination ...
    • 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: How to List and Discover Organizations

      Zoho Books API v3: How to List and Discover Organizations For developers building multi-tenant applications or for businesses managing multiple branches, the List Organizations endpoint is the starting point. Before you can create an invoice or fetch ...
    • Zoho Books API v3: Sending Custom Emails to Contacts

      Zoho Books API v3: Sending Custom Emails to Contacts The Email Contact API acts as a bridge between your custom application and the contact's inbox. Instead of using a third-party SMTP service, you can leverage Zoho Books' established mailing ...