The Zoho Books API is a RESTful interface that allows developers to integrate Zoho Books functionality into their own applications, automate accounting workflows, and sync financial data across systems. Built using REST principles with predictable URLs and HTTP methods, the API enables seamless interaction with invoices, contacts, expenses, and more all with JSON responses. Technofog an Authorized Zoho Partner helps businesses leverage the Zoho Books API to build custom integrations and automate complex financial operations.
Zoho Books API at a Glance
Authentication & Setup
OAuth 2.0 Authentication
Zoho Books uses OAuth 2.0 for secure API access. All API requests must include an access token in the Authorization header.
- Client ID and Client Secret from Zoho Developer Console
- Authorization code flow for user consent
- Refresh tokens for long-lived access
- Tokens valid for 1 hour; refresh tokens for extended periods
headers = {
"Authorization": "Zoho-oauthtoken YOUR_ACCESS_TOKEN"
}Data Center Selection
Zoho Books is hosted on multiple data centers worldwide. Use the correct base URL for your region.
- US: https://www.zohoapis.com/books/v4
- EU: https://www.zohoapis.eu/books/v4
- India: https://www.zohoapis.in/books/v4
- Australia: https://www.zohoapis.com.au/books/v4
- Japan: https://www.zohoapis.jp/books/v4
- Canada: https://www.zohoapis.ca/books/v4
Getting Started in 3 Steps
Create Developer Account
Sign up for a Zoho account at zoho.com, then visit the Zoho Developer Console (api-console.zoho.com) to register your application.
Get Organization ID
Every API request requires an organization_id parameter. Retrieve it via GET /organizations or from the admin console under "Manage Organizations".
Generate Access Token
Use OAuth 2.0 to obtain an access token. The Python example below shows the refresh token flow.
import requests
def get_access_token(client_id, client_secret, refresh_token):
response = requests.post('https://accounts.zoho.com/oauth/v2/token', params={
'refresh_token': refresh_token,
'client_id': client_id,
'client_secret': client_secret,
'grant_type': 'refresh_token'
})
return response.json()['access_token']
Rate Limits by Plan
API call limits vary by subscription plan.
Daily Request Limits
- Free Plan: 1,000 requests/day
- Standard Plan: 2,000 requests/day
- Professional Plan: 5,000 requests/day
- Premium/Elite/Ultimate: 10,000 requests/day
Concurrent Limits
- Free Plan: 5 concurrent calls
- Paid Plans: 10 concurrent calls (soft limit)
- Per-Minute Limit: 100 requests/minute
Exceeding limits returns HTTP 429 error. Implement exponential backoff for production integrations.
Available API Resources
Complete CRUD operations available for these resource types.
Invoices
Create, retrieve, update, delete, and email invoices
Contacts
Customers, vendors, and contacts management
Expenses
Create, retrieve, and update expense records
Items
Product and service item management
Estimates
Create and manage quotes and estimates
Sales Orders
Order processing and management
Purchase Orders
Procurement management
Projects
Project tracking and billing
Timesheets
Time tracking for billable hours
Price Lists
Product pricing management
Budgets
Budget creation and tracking
Credit Notes
Credit note and refund management
Code Examples
๐ง Create an Invoice
import requests
url = "https://www.zohoapis.com/books/v4/invoices"
headers = {"Authorization": "Zoho-oauthtoken YOUR_TOKEN"}
invoice_data = {
"customer_id": "123456789",
"line_items": [{
"item_id": "item_001",
"quantity": 2,
"rate": 150.00,
"name": "Consulting Services"
}],
"due_date": "2025-12-31",
"organization_id": "your_org_id"
}
response = requests.post(url, json=invoice_data, headers=headers)
print(response.json())๐ค Retrieve Contacts
import requests
url = "https://www.zohoapis.com/books/v4/contacts"
headers = {"Authorization": "Zoho-oauthtoken YOUR_TOKEN"}
params = {"organization_id": "your_org_id"}
response = requests.get(url, headers=headers, params=params)
contacts = response.json().get('contacts', [])
for contact in contacts:
print(f"{contact['contact_name']} - {contact['email']}")๐ JavaScript/Node.js Example
const axios = require('axios');
async function getCustomers(accessToken) {
const response = await axios.get('https://books.zoho.com/api/v3/contacts', {
headers: { 'Authorization': `Zoho-oauthtoken ${accessToken}` }
});
return response.data.contacts;
}๐ฆ Batch Create Invoices
async function batchCreateInvoices(accessToken, invoices) {
const response = await axios.post(
'https://books.zoho.com/api/v3/invoices/bulk',
{ invoices },
{ headers: { 'Authorization': `Zoho-oauthtoken ${accessToken}` } }
);
return response.data;
}๐ Webhooks for Real-Time Events
Available Events
- Subscription status changes
- Invoice creation and updates
- Payment received (payment_thankyou)
- Subscription created and activated
- Transaction events
Webhook Security
- Configure secret token for signature verification
- Validate incoming webhooks before processing
- Use test tools to verify execution
- View execution logs for debugging
# Webhook verification example
import hmac
import hashlib
def verify_signature(payload, signature, secret):
computed = hmac.new(
secret.encode(),
payload.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(computed, signature)Integration Tools & Libraries
Python Toolkit
GitHub repo with OAuth2 token management, CRM/Books sync, and CLI tools.
React / TypeScript SDK
Complete CRUD operations with built-in React hooks for Zoho Books integration.
n8n Node
Custom n8n node for automating Zoho Books tasks in workflows.
MCP Server
Model Context Protocol server for AI agent integration with Zoho Books.
IBM App Connect
Pre-built connector for Zoho Books in IBM's integration platform.
Postman Collection
Official API collection for testing and development.
๐ค AI Agent Integration with MCP
The Zoho Books MCP server connects AI agents directly to your accounting data.
Supported AI Frameworks
- Google ADK: Build Gemini-powered agents with MCP tools
- Claude Code: Natural language accounting from terminal
- Cursor: AI-assisted development with Zoho Books integration
Natural Language Commands
- "List unpaid invoices for this month"
- "Create a new expense entry today"
- "Send payment reminder to a client"
- "Summarize last quarter's profit and loss"
# Generate MCP URL for Claude Code
from composio import Composio
composio_client = Composio(api_key="YOUR_COMPOSIO_API_KEY")
session = composio_client.tool_router.create(
user_id="user@example.com",
toolkits=["zohobooks"]
)
print(f"MCP URL: {session.mcp.url}")API Best Practices
Performance Optimization
- Get a maximum of 200 records per request
- Insert/update/delete a maximum of 100 records per request
- Use batch operations when possible
- Implement caching for frequently accessed data
Error Handling
- Monitor API usage to avoid hitting limits
- Handle rate limit errors (429) with exponential backoff
- Validate webhook signatures using secret tokens
- Log all API interactions for debugging
Troubleshooting & Common Issues
Common API Issues
- Missing organization_id: Required in every request
- Wrong data center: Use correct domain for your region
- Attachment deletion: Use DELETE /invoices/{id}/documents/{attachment_id}
- Rate limit exceeded: Implement backoff strategy
Resources & Support
- Official documentation: www.zoho.com/books/api/v4/
- Zoho Community: help.zoho.com
- Email support: support@zohobooks.com
- GitHub community projects
Frequently Asked Questions
What is the latest API version?
Version 4 (v4) is the current API version with the endpoint https://www.zohoapis.com/books/v4/.
How do I get my organization ID?
Use GET /organizations API or find it in Zoho Books admin console under "Manage Organizations".
What authentication does Zoho Books use?
OAuth 2.0 with access tokens (1-hour validity) and refresh tokens for extended access.
Can I use webhooks with Zoho Books?
Yes, webhooks are supported for invoice creation, payment events, and subscription status changes.
Ready to Build Your Zoho Books Integration?
Get expert guidance from Technofog's API integration specialists. We'll help you design, build, and deploy custom Zoho Books integrations no obligation.
๐ Free API Consultation
Meet our integration experts to discuss your Zoho Books automation needs.