KosmoKrator

accounting

Zoho Books CLI for AI Agents

Use the Zoho Books CLI from KosmoKrator to call Zoho Books tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

12 functions 7 read 5 write Manual OAuth token auth

Zoho Books CLI Setup

Zoho Books can be configured headlessly with `kosmokrator integrations:configure zoho_books`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure zoho_books --set access_token="$ZOHO_BOOKS_ACCESS_TOKEN" --set organization_id="$ZOHO_BOOKS_ORGANIZATION_ID" --enable --read allow --write ask --json
kosmokrator integrations:doctor zoho_books --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token ZOHO_BOOKS_ACCESS_TOKEN Secret secret yes OAuth Access Token
organization_id ZOHO_BOOKS_ORGANIZATION_ID Text text yes Organization ID
url ZOHO_BOOKS_URL URL url no API Base URL

Call Zoho Books Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call zoho_books.zohobooks_list_invoices '{
  "status": "example_status",
  "customer_id": "example_customer_id",
  "date_start": "example_date_start",
  "date_end": "example_date_end",
  "page": 1,
  "per_page": 1,
  "search_text": "example_search_text"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:zoho_books zohobooks_list_invoices '{
  "status": "example_status",
  "customer_id": "example_customer_id",
  "date_start": "example_date_start",
  "date_end": "example_date_end",
  "page": 1,
  "per_page": 1,
  "search_text": "example_search_text"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs zoho_books --json
kosmo integrations:docs zoho_books.zohobooks_list_invoices --json
kosmo integrations:schema zoho_books.zohobooks_list_invoices --json
kosmo integrations:search "Zoho Books" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Zoho Books.

zoho_books.zohobooks_list_invoices

Read read

List invoices from Zoho Books. Returns a paginated list of invoices with optional filters for status, customer, and date range.

Parameters
status, customer_id, date_start, date_end, page, per_page, search_text

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_list_invoices '{"status":"example_status","customer_id":"example_customer_id","date_start":"example_date_start","date_end":"example_date_end","page":1,"per_page":1,"search_text":"example_search_text"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_list_invoices '{"status":"example_status","customer_id":"example_customer_id","date_start":"example_date_start","date_end":"example_date_end","page":1,"per_page":1,"search_text":"example_search_text"}' --json

zoho_books.zohobooks_get_invoice

Read read

Get full details of a specific invoice in Zoho Books by its ID, including line items, totals, payments, and credits.

Parameters
invoice_id

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_get_invoice '{"invoice_id":"example_invoice_id"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_get_invoice '{"invoice_id":"example_invoice_id"}' --json

zoho_books.zohobooks_create_invoice

Write write

Create a new invoice in Zoho Books. Requires a customer_id and line_items array. Each line item needs at least an item_id or name with a rate and quantity.

Parameters
customer_id, line_items, date, due_date, invoice_number, reference_number, notes, terms

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_create_invoice '{"customer_id":"example_customer_id","line_items":"example_line_items","date":"example_date","due_date":"example_due_date","invoice_number":"example_invoice_number","reference_number":"example_reference_number","notes":"example_notes","terms":"example_terms"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_create_invoice '{"customer_id":"example_customer_id","line_items":"example_line_items","date":"example_date","due_date":"example_due_date","invoice_number":"example_invoice_number","reference_number":"example_reference_number","notes":"example_notes","terms":"example_terms"}' --json

zoho_books.zohobooks_update_invoice

Write write

Update an existing invoice in Zoho Books. Provide the invoice_id and any fields to change (line_items, dates, notes, status, etc.).

Parameters
invoice_id, customer_id, line_items, date, due_date, notes, terms, status, reference_number

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_update_invoice '{"invoice_id":"example_invoice_id","customer_id":"example_customer_id","line_items":"example_line_items","date":"example_date","due_date":"example_due_date","notes":"example_notes","terms":"example_terms","status":"example_status"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_update_invoice '{"invoice_id":"example_invoice_id","customer_id":"example_customer_id","line_items":"example_line_items","date":"example_date","due_date":"example_due_date","notes":"example_notes","terms":"example_terms","status":"example_status"}' --json

zoho_books.zohobooks_list_contacts

Read read

List contacts (customers and vendors) from Zoho Books. Returns a paginated list with optional filters.

Parameters
contact_type, status, page, per_page, search_text

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_list_contacts '{"contact_type":"example_contact_type","status":"example_status","page":1,"per_page":1,"search_text":"example_search_text"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_list_contacts '{"contact_type":"example_contact_type","status":"example_status","page":1,"per_page":1,"search_text":"example_search_text"}' --json

zoho_books.zohobooks_get_contact

Read read

Get full details of a specific contact (customer or vendor) in Zoho Books, including addresses and contact persons.

Parameters
contact_id

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_get_contact '{"contact_id":"example_contact_id"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_get_contact '{"contact_id":"example_contact_id"}' --json

zoho_books.zohobooks_create_contact

Write write

Create a new contact (customer or vendor) in Zoho Books. Requires a name; optionally provide email, phone, company name, and contact type.

Parameters
name, email, phone, company_name, contact_type, billing_address, shipping_address, notes

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_create_contact '{"name":"example_name","email":"example_email","phone":"example_phone","company_name":"example_company_name","contact_type":"example_contact_type","billing_address":"example_billing_address","shipping_address":"example_shipping_address","notes":"example_notes"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_create_contact '{"name":"example_name","email":"example_email","phone":"example_phone","company_name":"example_company_name","contact_type":"example_contact_type","billing_address":"example_billing_address","shipping_address":"example_shipping_address","notes":"example_notes"}' --json

zoho_books.zohobooks_list_items

Read read

List items (products and services) from Zoho Books. Returns a paginated list with optional filters.

Parameters
filter_type, page, per_page, search_text

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_list_items '{"filter_type":"example_filter_type","page":1,"per_page":1,"search_text":"example_search_text"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_list_items '{"filter_type":"example_filter_type","page":1,"per_page":1,"search_text":"example_search_text"}' --json

zoho_books.zohobooks_create_item

Write write

Create a new item (product or service) in Zoho Books. Requires a name and rate. Optionally specify item type, description, unit, and tax.

Parameters
name, rate, description, unit, item_type, tax_id, sku

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_create_item '{"name":"example_name","rate":1,"description":"example_description","unit":"example_unit","item_type":"example_item_type","tax_id":"example_tax_id","sku":"example_sku"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_create_item '{"name":"example_name","rate":1,"description":"example_description","unit":"example_unit","item_type":"example_item_type","tax_id":"example_tax_id","sku":"example_sku"}' --json

zoho_books.zohobooks_list_estimates

Read read

List estimates (quotes) from Zoho Books. Returns a paginated list with optional filters for status, customer, and date range.

Parameters
status, customer_id, date_start, date_end, page, per_page, search_text

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_list_estimates '{"status":"example_status","customer_id":"example_customer_id","date_start":"example_date_start","date_end":"example_date_end","page":1,"per_page":1,"search_text":"example_search_text"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_list_estimates '{"status":"example_status","customer_id":"example_customer_id","date_start":"example_date_start","date_end":"example_date_end","page":1,"per_page":1,"search_text":"example_search_text"}' --json

zoho_books.zohobooks_create_estimate

Write write

Create a new estimate (quote) in Zoho Books. Requires a customer_id and line_items array. Each line item needs at least an item_id or name with a rate and quantity.

Parameters
customer_id, line_items, date, expiry_date, estimate_number, reference_number, notes, terms

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_create_estimate '{"customer_id":"example_customer_id","line_items":"example_line_items","date":"example_date","expiry_date":"example_expiry_date","estimate_number":"example_estimate_number","reference_number":"example_reference_number","notes":"example_notes","terms":"example_terms"}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_create_estimate '{"customer_id":"example_customer_id","line_items":"example_line_items","date":"example_date","expiry_date":"example_expiry_date","estimate_number":"example_estimate_number","reference_number":"example_reference_number","notes":"example_notes","terms":"example_terms"}' --json

zoho_books.zohobooks_get_current_user

Read read

Get information about the currently authenticated Zoho Books user. Useful for verifying connectivity and identifying the active account.

Parameters
none

Generic CLI call

kosmo integrations:call zoho_books.zohobooks_get_current_user '{}' --json

Provider shortcut

kosmo integrations:zoho_books zohobooks_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

zoho_books.zohobooks_list_invoices

List invoices from Zoho Books. Returns a paginated list of invoices with optional filters for status, customer, and date range.

Operation
Read read
Schema command
kosmo integrations:schema zoho_books.zohobooks_list_invoices --json
ParameterTypeRequiredDescription
status string no Filter by invoice status: draft, sent, overdue, paid, voided, unpaid.
customer_id string no Filter invoices by customer ID.
date_start string no Filter by start date (ISO 8601, e.g., "2025-01-01").
date_end string no Filter by end date (ISO 8601, e.g., "2025-12-31").
page integer no Page number for pagination (default: 1).
per_page integer no Number of invoices per page (default: 25, max: 200).
search_text string no Search invoices by invoice number or customer name.

zoho_books.zohobooks_get_invoice

Get full details of a specific invoice in Zoho Books by its ID, including line items, totals, payments, and credits.

Operation
Read read
Schema command
kosmo integrations:schema zoho_books.zohobooks_get_invoice --json
ParameterTypeRequiredDescription
invoice_id string yes The unique ID of the invoice to retrieve.

zoho_books.zohobooks_create_invoice

Create a new invoice in Zoho Books. Requires a customer_id and line_items array. Each line item needs at least an item_id or name with a rate and quantity.

Operation
Write write
Schema command
kosmo integrations:schema zoho_books.zohobooks_create_invoice --json
ParameterTypeRequiredDescription
customer_id string yes The customer (contact) ID to invoice.
line_items array yes Array of line items. Each item should have: item_id (or name), rate, quantity, and optionally description.
date string no Invoice date (ISO 8601, e.g., "2025-01-15"). Defaults to today.
due_date string no Due date for payment (ISO 8601).
invoice_number string no Custom invoice number. Auto-generated if omitted.
reference_number string no Reference number (e.g., PO number).
notes string no Notes to display on the invoice.
terms string no Terms and conditions.

zoho_books.zohobooks_update_invoice

Update an existing invoice in Zoho Books. Provide the invoice_id and any fields to change (line_items, dates, notes, status, etc.).

Operation
Write write
Schema command
kosmo integrations:schema zoho_books.zohobooks_update_invoice --json
ParameterTypeRequiredDescription
invoice_id string yes The unique ID of the invoice to update.
customer_id string no Change the customer (contact) ID on the invoice.
line_items array no Replace all line items. Each item should have: item_id (or name), rate, quantity.
date string no Invoice date (ISO 8601).
due_date string no Due date for payment (ISO 8601).
notes string no Notes displayed on the invoice.
terms string no Terms and conditions.
status string no Update invoice status: draft, sent, voided.
reference_number string no Reference number (e.g., PO number).

zoho_books.zohobooks_list_contacts

List contacts (customers and vendors) from Zoho Books. Returns a paginated list with optional filters.

Operation
Read read
Schema command
kosmo integrations:schema zoho_books.zohobooks_list_contacts --json
ParameterTypeRequiredDescription
contact_type string no Filter by type: customer, vendor, or all (default: all).
status string no Filter by status: active, inactive, or all.
page integer no Page number for pagination (default: 1).
per_page integer no Number of contacts per page (default: 25, max: 200).
search_text string no Search contacts by name or email.

zoho_books.zohobooks_get_contact

Get full details of a specific contact (customer or vendor) in Zoho Books, including addresses and contact persons.

Operation
Read read
Schema command
kosmo integrations:schema zoho_books.zohobooks_get_contact --json
ParameterTypeRequiredDescription
contact_id string yes The unique ID of the contact to retrieve.

zoho_books.zohobooks_create_contact

Create a new contact (customer or vendor) in Zoho Books. Requires a name; optionally provide email, phone, company name, and contact type.

Operation
Write write
Schema command
kosmo integrations:schema zoho_books.zohobooks_create_contact --json
ParameterTypeRequiredDescription
name string yes Contact name (person or company).
email string no Primary email address.
phone string no Phone number.
company_name string no Company name (if different from contact name).
contact_type string no Contact type: customer, vendor (default: customer).
billing_address object no Billing address object with fields: attention, address, city, state, zip, country, phone.
shipping_address object no Shipping address object (same fields as billing_address).
notes string no Internal notes about this contact.

zoho_books.zohobooks_list_items

List items (products and services) from Zoho Books. Returns a paginated list with optional filters.

Operation
Read read
Schema command
kosmo integrations:schema zoho_books.zohobooks_list_items --json
ParameterTypeRequiredDescription
filter_type string no Filter by item type: active, inactive, sales, purchases, or all.
page integer no Page number for pagination (default: 1).
per_page integer no Number of items per page (default: 25, max: 200).
search_text string no Search items by name or description.

zoho_books.zohobooks_create_item

Create a new item (product or service) in Zoho Books. Requires a name and rate. Optionally specify item type, description, unit, and tax.

Operation
Write write
Schema command
kosmo integrations:schema zoho_books.zohobooks_create_item --json
ParameterTypeRequiredDescription
name string yes Item name (e.g., "Web Design Service" or "Widget A").
rate number yes Unit price or hourly rate.
description string no Item description shown on invoices.
unit string no Unit of measurement (e.g., "hrs", "pcs", "kg").
item_type string no Type of item: sales, purchases, or both (default: both).
tax_id string no Tax ID to apply to this item.
sku string no Stock Keeping Unit identifier.

zoho_books.zohobooks_list_estimates

List estimates (quotes) from Zoho Books. Returns a paginated list with optional filters for status, customer, and date range.

Operation
Read read
Schema command
kosmo integrations:schema zoho_books.zohobooks_list_estimates --json
ParameterTypeRequiredDescription
status string no Filter by estimate status: draft, sent, accepted, declined, expired, invoiced, or all.
customer_id string no Filter estimates by customer ID.
date_start string no Filter by start date (ISO 8601).
date_end string no Filter by end date (ISO 8601).
page integer no Page number for pagination (default: 1).
per_page integer no Number of estimates per page (default: 25, max: 200).
search_text string no Search estimates by estimate number or customer name.

zoho_books.zohobooks_create_estimate

Create a new estimate (quote) in Zoho Books. Requires a customer_id and line_items array. Each line item needs at least an item_id or name with a rate and quantity.

Operation
Write write
Schema command
kosmo integrations:schema zoho_books.zohobooks_create_estimate --json
ParameterTypeRequiredDescription
customer_id string yes The customer (contact) ID for the estimate.
line_items array yes Array of line items. Each item should have: item_id (or name), rate, quantity, and optionally description.
date string no Estimate date (ISO 8601, e.g., "2025-01-15"). Defaults to today.
expiry_date string no Date when the estimate expires (ISO 8601).
estimate_number string no Custom estimate number. Auto-generated if omitted.
reference_number string no Reference number.
notes string no Notes to display on the estimate.
terms string no Terms and conditions.

zoho_books.zohobooks_get_current_user

Get information about the currently authenticated Zoho Books user. Useful for verifying connectivity and identifying the active account.

Operation
Read read
Schema command
kosmo integrations:schema zoho_books.zohobooks_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.