zoho-api

Zoho Inventory https://www.zohoapis.com/inventory/v1

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "zoho-api" with this command: npx skills add qmop1967/clients-console/qmop1967-clients-console-zoho-api

Zoho API Integration

Quick Reference

API Base URL

Zoho Inventory https://www.zohoapis.com/inventory/v1

Zoho Books https://www.zohoapis.com/books/v3

Organization ID: 748369814

Code Files

File Purpose

src/lib/zoho/client.ts

OAuth client, token caching, zohoFetch

src/lib/zoho/products.ts

Products, stock extraction

src/lib/zoho/price-lists.ts

Price list constants and fetching

src/lib/zoho/customers.ts

Customer lookup by email

src/lib/zoho/orders.ts

Sales orders

src/lib/zoho/invoices.ts

Invoices

src/lib/zoho/payments.ts

Payments

src/lib/zoho/credit-notes.ts

Credit notes

Using zohoFetch

import { zohoFetch } from '@/lib/zoho/client';

// GET request const data = await zohoFetch('/inventory/v1/items', { params: { organization_id: process.env.ZOHO_ORGANIZATION_ID, page: 1, per_page: 100, }, });

// Single item with locations const item = await zohoFetch(/inventory/v1/items/${itemId}, { params: { organization_id: process.env.ZOHO_ORGANIZATION_ID }, });

Token Caching (CRITICAL)

Memory Cache → Upstash Redis → Zoho OAuth Refresh (50-min TTL) (rate limit: 10s guard)

If all prices show "Contact for price", check:

Common Endpoints

Inventory API

GET /items # List products GET /items/{id} # Single product (includes locations) GET /categories # List categories GET /pricebooks/{id} # Pricebook with items

Books API

GET /contacts # List customers GET /salesorders # Sales orders GET /invoices # Invoices GET /customerpayments # Payments GET /creditnotes # Credit notes

Caching with unstable_cache

import { unstable_cache } from 'next/cache';

const getCachedProducts = unstable_cache( async () => await fetchProducts(), ['products'], { revalidate: 3600, tags: ['products'] } );

Revalidate cache:

curl "https://www.tsh.sale/api/revalidate?tag=products&secret=tsh-revalidate-2024"

Error Handling Pattern

try { const data = await zohoFetch('/inventory/v1/items', { ... }); } catch (error) { if (error.message.includes('401')) { // Token expired - auto-refreshes } else if (error.message.includes('429')) { // Rate limited - wait and retry } }

Creating New API Route

// src/app/api/zoho/[resource]/route.ts import { NextResponse } from 'next/server'; import { zohoFetch } from '@/lib/zoho/client';

export async function GET(request: Request) { const data = await zohoFetch('/inventory/v1/items', { params: { organization_id: process.env.ZOHO_ORGANIZATION_ID, }, });

return NextResponse.json(data); }

Rate Limits

API Limit

OAuth Refresh ~100/minute

Inventory API 100/minute

Books API 100/minute

Debug Commands

Check token

curl "https://www.tsh.sale/api/debug/token"

Check prices

curl "https://www.tsh.sale/api/debug/prices"

Check stock

curl "https://www.tsh.sale/api/debug/stock"

Revalidate cache

curl "https://www.tsh.sale/api/revalidate?tag=all&secret=tsh-revalidate-2024"

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated
Coding

clawhub-rate-limited-publisher

Queue and publish local skills to ClawHub with a strict 5-per-hour cap using the local clawhub CLI and host scheduler.

Archived SourceRecently Updated