KosmoKrator

data

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.

Zoho Books CLI Setup

Zoho Books can be configured headlessly with `kosmokrator integrations:configure zoho-books`.

Install, configure, and verify
# 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

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

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

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

Discovery

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

Discovery commands
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

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

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.

Read read
Parameters
status, customer_id, date_start, date_end, page, per_page, search_text
Generic 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
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

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

Read read
Parameters
invoice_id
Generic call
kosmo integrations:call zoho-books.zohobooks_get_invoice '{"invoice_id":"example_invoice_id"}' --json
Shortcut
kosmo integrations:zoho-books zohobooks_get_invoice '{"invoice_id":"example_invoice_id"}' --json

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.

Write write
Parameters
customer_id, line_items, date, due_date, invoice_number, reference_number, notes, terms
Generic 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
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

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

Write write
Parameters
invoice_id, customer_id, line_items, date, due_date, notes, terms, status, reference_number
Generic 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
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

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

Read read
Parameters
contact_type, status, page, per_page, search_text
Generic 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
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

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

Read read
Parameters
contact_id
Generic call
kosmo integrations:call zoho-books.zohobooks_get_contact '{"contact_id":"example_contact_id"}' --json
Shortcut
kosmo integrations:zoho-books zohobooks_get_contact '{"contact_id":"example_contact_id"}' --json

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.

Write write
Parameters
name, email, phone, company_name, contact_type, billing_address, shipping_address, notes
Generic 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
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

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

Read read
Parameters
filter_type, page, per_page, search_text
Generic 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
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

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

Write write
Parameters
name, rate, description, unit, item_type, tax_id, sku
Generic 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
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

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

Read read
Parameters
status, customer_id, date_start, date_end, page, per_page, search_text
Generic 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
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

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.

Write write
Parameters
customer_id, line_items, date, expiry_date, estimate_number, reference_number, notes, terms
Generic 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
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

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

Read read
Parameters
none
Generic call
kosmo integrations:call zoho-books.zohobooks_get_current_user '{}' --json
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 7 parameters
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 1 parameters
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 8 parameters
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 9 parameters
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 5 parameters
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 1 parameters
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 8 parameters
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 4 parameters
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 7 parameters
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 7 parameters
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 8 parameters
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 0 parameters
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.