Prompt

How do I create customers and invoices in Zoho Books through an API?

Finance / Accounting Fintech1 observationLast seen Nov 3, 2026

Latest observation

Nov 3, 2026OpenAI APIWeb search: off

To create customers and invoices in Zoho Books via API, you generally do this in two steps:

  1. Create (or find) the customer/contact
  2. Create the invoice using that customer/contact ID

Below is the typical flow with example requests.


1) Prerequisites

You need:

  • A Zoho Books organization ID
  • An OAuth access token
  • The correct API domain for your data center, for example:
    • US: https://www.zohoapis.com/books/v3
    • EU: https://www.zohoapis.eu/books/v3
    • IN: https://www.zohoapis.in/books/v3
    • AU: https://www.zohoapis.com.au/books/v3
    • JP: https://www.zohoapis.jp/books/v3
    • CA: https://www.zohoapis.ca/books/v3

You’ll include the access token in the header:

Authorization: Zoho-oauthtoken <access_token>

2) Create a customer in Zoho Books

In Zoho Books, customers are managed as contacts.
You create them using the Contacts API.

Endpoint

POST /contacts

Example cURL

curl --request POST \
  --url 'https://www.zohoapis.com/books/v3/contacts?organization_id=YOUR_ORG_ID' \
  --header 'Authorization: Zoho-oauthtoken YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "contact_name": "Acme Corp",
    "company_name": "Acme Corp",
    "contact_type": "customer",
    "email": "billing@acme.com",
    "phone": "555-123-4567",
    "billing_address": {
      "address": "123 Main St",
      "city": "Austin",
      "state": "TX",
      "zip": "78701",
      "country": "USA"
    }
  }'

Response

You’ll get back a contact object containing an contact_id like:

{
  "contact": {
    "contact_id": "123456789000012345"
  }
}

Save that contact_id — you’ll need it for invoices.


3) Create an invoice

Endpoint

POST /invoices

Important

The invoice must reference the customer via customer_id.

Example cURL

curl --request POST \
  --url 'https://www.zohoapis.com/books/v3/invoices?organization_id=YOUR_ORG_ID' \
  --header 'Authorization: Zoho-oauthtoken YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "customer_id": "123456789000012345",
    "date": "2026-11-03",
    "due_date": "2026-11-10",
    "line_items": [
      {
        "name": "Consulting Services",
        "description": "Monthly consulting retainer",
        "rate": 100,
        "quantity": 2
      }
    ]
  }'

Response

You’ll get an invoice object with an invoice_id:

{
  "invoice": {
    "invoice_id": "123456789000067890"
  }
}

4) Common fields for invoice line items

A line item usually includes:

  • name — item/service name
  • description — optional description
  • rate — unit price
  • quantity — number of units
  • tax_id — if applicable
  • item_id — if you already have an item in Zoho Books

Example:

"line_items": [
  {
    "name": "Website Design",
    "description": "Landing page design",
    "rate": 500,
    "quantity": 1
  },
  {
    "name": "Development",
    "rate": 75,
    "quantity": 10
  }
]

5) Full workflow example

Step 1: Create customer

POST /contacts

Step 2: Capture contact_id

Step 3: Create invoice

POST /invoices

with:

{
  "customer_id": "contact_id_from_step_2",
  "line_items": [...]
}

6) Optional: Search for existing customer before creating

If you don’t want duplicates, list or search contacts first:

GET /contacts?organization_id=YOUR_ORG_ID&contact_name=Acme

Then reuse the existing contact_id if found.


7) Notes and gotchas

  • Zoho Books API uses OAuth 2.0, not basic auth.
  • Make sure your OAuth token has the required scopes, such as:
    • ZohoBooks.contacts.CREATE
    • ZohoBooks.invoices.CREATE
  • The organization_id is required as a query parameter.
  • If your account uses a different data center, the base URL must match it.
  • Some invoice fields depend on your organization settings, such as taxes, currency, and payment terms.

8) If you want to do it in code

JavaScript example

const orgId = "YOUR_ORG_ID";
const token = "YOUR_ACCESS_TOKEN";

async function createCustomer() {
  const res = await fetch(`https://www.zohoapis.com/books/v3/contacts?organization_id=${orgId}`, {
    method: "POST",
    headers: {
      "Authorization": `Zoho-oauthtoken ${token}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      contact_name: "Acme Corp",
      company_name: "Acme Corp",
      contact_type: "customer",
      email: "billing@acme.com"
    })
  });
  return res.json();
}

async function createInvoice(contactId) {
  const res = await fetch(`https://www.zohoapis.com/books/v3/invoices?organization_id=${orgId}`, {
    method: "POST",
    headers: {
      "Authorization": `Zoho-oauthtoken ${token}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      customer_id: contactId,
      date: "2026-11-03",
      due_date: "2026-11-10",
      line_items: [
        { name: "Consulting Services", rate: 100, quantity: 2 }
      ]
    })
  });
  return res.json();
}

If you want, I can also provide:

  • a Python example,
  • a Postman collection setup,
  • or a complete end-to-end script that creates a customer and invoice automatically.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.