诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。
设计与多媒体
zoho-inventory
试用通过托管 OAuth 连接 Zoho Inventory API,对商品、销售订单、发票、联系人、账单等记录进行读写。
它能做什么
通过托管 OAuth 接入 Zoho Inventory API,覆盖商品、商品组、客户与供应商、销售订单、发票、采购订单、账单和发货单等模块的完整 CRUD 操作。所有请求走认证网关代理,由网关自动注入 OAuth 令牌,调用方只需在请求头中携带 API 密钥。支持多个账号并行接入,通过专属请求头指定具体连接。所有写入操作(创建、更新、删除)在执行前都需要用户明确确认。
什么时候用它
- 列出库存商品及其 SKU 信息
- 创建或更新带明细行的销售订单
- 根据已有订单生成客户发票
- 在不同系统间同步客户与供应商联系人
技能文档
Zoho Inventory
Access the Zoho Inventory API with managed OAuth authentication. Manage items, sales orders, invoices, purchase orders, bills, contacts, shipment orders, and item groups with full CRUD operations.
Quick Start
# List items
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/items')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Base URL
https://api.maton.ai/zoho-inventory/inventory/v1/{endpoint}
Maton proxies requests to www.zohoapis.com/inventory/v1 and automatically injects your OAuth token.
Authentication
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEY
Environment Variable: Set your API key as MATON_API_KEY:
export MATON_API_KEY="YOUR_API_KEY"
Getting Your API Key
- Sign in or create an account at maton.ai
- Go to maton.ai/settings
- Copy your API key
Connection Management
Manage your Zoho Inventory OAuth connections at https://api.maton.ai.
List Connections
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections?app=zoho-inventory&status=ACTIVE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Create Connection
python <<'EOF'
import urllib.request, os, json
data = json.dumps({'app': 'zoho-inventory'}).encode()
req = urllib.request.Request('https://api.maton.ai/connections', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"connection": {
"connection_id": "{connection_id}",
"status": "ACTIVE",
"creation_time": "2025-12-08T07:20:53.488460Z",
"last_updated_time": "2026-01-31T20:03:32.593153Z",
"url": "https://connect.maton.ai/?session_token=...",
"app": "zoho-inventory",
"metadata": {}
}
}
Open the returned url in a browser to complete OAuth authorization.
Delete Connection
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections/{connection_id}', method='DELETE')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Specifying Connection
If you have multiple Zoho Inventory connections, specify which one to use with the Maton-Connection header:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/items')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Maton-Connection', '{connection_id}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
If you have multiple connections, always include this header to ensure requests go to the intended account.
Security & Permissions
- Access is scoped to items, sales orders, invoices, purchase orders, bills, contacts, and shipments within the connected Zoho Inventory account.
- All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
API Reference
Available Modules
| Module | Endpoint | Description |
|---|---|---|
| Items | /items | Products and services |
| Item Groups | /itemgroups | Grouped product variants |
| Contacts | /contacts | Customers and vendors |
| Sales Orders | /salesorders | Sales orders |
| Invoices | /invoices | Sales invoices |
| Purchase Orders | /purchaseorders | Purchase orders |
| Bills | /bills | Vendor bills |
| Shipment Orders | /shipmentorders | Shipment tracking |
Items
List Items
GET /zoho-inventory/inventory/v1/items
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/items')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"code": 0,
"message": "success",
"items": [
{
"item_id": "1234567890000",
"name": "Widget",
"status": "active",
"sku": "WDG-001",
"rate": 25.00,
"purchase_rate": 10.00,
"is_taxable": true
}
],
"page_context": {
"page": 1,
"per_page": 200,
"has_more_page": false
}
}
Get Item
GET /zoho-inventory/inventory/v1/items/{item_id}
Create Item
POST /zoho-inventory/inventory/v1/items
Content-Type: application/json
{
"name": "Widget",
"rate": 25.00,
"purchase_rate": 10.00,
"sku": "WDG-001",
"item_type": "inventory",
"product_type": "goods",
"unit": "pcs",
"is_taxable": true
}
Required Fields:
name- Item name
Optional Fields:
rate- Sales pricepurchase_rate- Purchase costsku- Stock keeping unit (unique)item_type-inventory,sales,purchases, orsales_and_purchasesproduct_type-goodsorserviceunit- Unit of measurementis_taxable- Tax applicabilitytax_id- Tax identifierdescription- Item descriptionreorder_level- Reorder pointvendor_id- Preferred vendor
Example:
python <<'EOF'
import urllib.request, os, json
data = json.dumps({
"name": "Widget",
"rate": 25.00,
"purchase_rate": 10.00,
"sku": "WDG-001",
"item_type": "inventory",
"product_type": "goods",
"unit": "pcs"
}).encode()
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/items', data=data, method='POST')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
req.add_header('Content-Type', 'application/json')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Response:
{
"code": 0,
"message": "The item has been added.",
"item": {
"item_id": "1234567890000",
"name": "Widget",
"status": "active",
"rate": 25.00,
"purchase_rate": 10.00,
"sku": "WDG-001"
}
}
Update Item
PUT /zoho-inventory/inventory/v1/items/{item_id}
Content-Type: application/json
{
"name": "Updated Widget",
"rate": 30.00
}
Delete Item
DELETE /zoho-inventory/inventory/v1/items/{item_id}
Item Status Actions
# Mark as active
POST /zoho-inventory/inventory/v1/items/{item_id}/active
# Mark as inactive
POST /zoho-inventory/inventory/v1/items/{item_id}/inactive
Contacts
List Contacts
GET /zoho-inventory/inventory/v1/contacts
Query Parameters:
filter_by-Status.All,Status.Active,Status.Inactive,Status.Duplicate,Status.Crmsearch_text- Search across contact fieldssort_column-contact_name,first_name,last_name,email,created_time,last_modified_timecontact_name,company_name,email,phone- Field-specific filters
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/contacts')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Contact
GET /zoho-inventory/inventory/v1/contacts/{contact_id}
Create Contact
POST /zoho-inventory/inventory/v1/contacts
Content-Type: application/json
{
"contact_name": "Acme Corporation",
"contact_type": "customer",
"company_name": "Acme Corp",
"email": "billing@acme.com",
"phone": "+1-555-1234"
}
Required Fields:
contact_name- Display name
Optional Fields:
contact_type-customerorvendorcompany_name- Legal entity nameemail- Email addressphone- Phone numberbilling_address- Address objectshipping_address- Address objectpayment_terms- Days for paymentcurrency_id- Currency identifierwebsite- Website URL
Update Contact
PUT /zoho-inventory/inventory/v1/contacts/{contact_id}
Delete Contact
DELETE /zoho-inventory/inventory/v1/contacts/{contact_id}
Contact Status Actions
# Mark as active
POST /zoho-inventory/inventory/v1/contacts/{contact_id}/active
# Mark as inactive
POST /zoho-inventory/inventory/v1/contacts/{contact_id}/inactive
Sales Orders
List Sales Orders
GET /zoho-inventory/inventory/v1/salesorders
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/salesorders')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Sales Order
GET /zoho-inventory/inventory/v1/salesorders/{salesorder_id}
Create Sales Order
POST /zoho-inventory/inventory/v1/salesorders
Content-Type: application/json
{
"customer_id": "1234567890000",
"date": "2026-02-06",
"line_items": [
{
"item_id": "1234567890001",
"quantity": 5,
"rate": 25.00
}
]
}
Required Fields:
customer_id- Customer identifierline_items- Array of items withitem_id,quantity,rate
Optional Fields:
salesorder_number- Auto-generated if not specified (do not specify if auto-generation is enabled)date- Order date (yyyy-mm-dd)shipment_date- Expected shipment datereference_number- External referencenotes- Internal notesterms- Terms and conditionsdiscount- Discount percentage or amountshipping_charge- Shipping costadjustment- Price adjustment
Update Sales Order
PUT /zoho-inventory/inventory/v1/salesorders/{salesorder_id}
Delete Sales Order
DELETE /zoho-inventory/inventory/v1/salesorders/{salesorder_id}
Sales Order Status Actions
# Mark as confirmed
POST /zoho-inventory/inventory/v1/salesorders/{salesorder_id}/status/confirmed
# Mark as void
POST /zoho-inventory/inventory/v1/salesorders/{salesorder_id}/status/void
Invoices
List Invoices
GET /zoho-inventory/inventory/v1/invoices
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/invoices')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Invoice
GET /zoho-inventory/inventory/v1/invoices/{invoice_id}
Create Invoice
POST /zoho-inventory/inventory/v1/invoices
Content-Type: application/json
{
"customer_id": "1234567890000",
"line_items": [
{
"item_id": "1234567890001",
"quantity": 5,
"rate": 25.00
}
]
}
Required Fields:
customer_id- Customer identifierline_items- Array of items
Optional Fields:
invoice_number- Auto-generated if not specifieddate- Invoice date (yyyy-mm-dd)due_date- Payment due datepayment_terms- Days until duediscount- Discount percentage or amountshipping_charge- Shipping costnotes- Internal notesterms- Terms and conditions
Update Invoice
PUT /zoho-inventory/inventory/v1/invoices/{invoice_id}
Delete Invoice
DELETE /zoho-inventory/inventory/v1/invoices/{invoice_id}
Invoice Status Actions
# Mark as sent
POST /zoho-inventory/inventory/v1/invoices/{invoice_id}/status/sent
# Mark as draft
POST /zoho-inventory/inventory/v1/invoices/{invoice_id}/status/draft
# Void invoice
POST /zoho-inventory/inventory/v1/invoices/{invoice_id}/status/void
Invoice Email
# Email invoice to customer
POST /zoho-inventory/inventory/v1/invoices/{invoice_id}/email
# Get email content template
GET /zoho-inventory/inventory/v1/invoices/{invoice_id}/email
Invoice Payments
# List payments applied
GET /zoho-inventory/inventory/v1/invoices/{invoice_id}/payments
# Delete a payment
DELETE /zoho-inventory/inventory/v1/invoices/{invoice_id}/payments/{invoice_payment_id}
Invoice Credits
# List credits applied
GET /zoho-inventory/inventory/v1/invoices/{invoice_id}/creditsapplied
# Apply credits
POST /zoho-inventory/inventory/v1/invoices/{invoice_id}/credits
# Delete applied credit
DELETE /zoho-inventory/inventory/v1/invoices/{invoice_id}/creditsapplied/{creditnotes_invoice_id}
Invoice Comments
# List comments
GET /zoho-inventory/inventory/v1/invoices/{invoice_id}/comments
# Add comment
POST /zoho-inventory/inventory/v1/invoices/{invoice_id}/comments
# Update comment
PUT /zoho-inventory/inventory/v1/invoices/{invoice_id}/comments/{comment_id}
# Delete comment
DELETE /zoho-inventory/inventory/v1/invoices/{invoice_id}/comments/{comment_id}
Purchase Orders
List Purchase Orders
GET /zoho-inventory/inventory/v1/purchaseorders
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/purchaseorders')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Purchase Order
GET /zoho-inventory/inventory/v1/purchaseorders/{purchaseorder_id}
Create Purchase Order
POST /zoho-inventory/inventory/v1/purchaseorders
Content-Type: application/json
{
"vendor_id": "1234567890000",
"line_items": [
{
"item_id": "1234567890001",
"quantity": 100,
"rate": 10.00
}
]
}
Required Fields:
vendor_id- Vendor identifierline_items- Array of items
Optional Fields:
purchaseorder_number- Auto-generated if not specified (do not specify if auto-generation is enabled)date- Order date (yyyy-mm-dd)delivery_date- Expected delivery datereference_number- External referenceship_via- Shipping methodnotes- Internal notesterms- Terms and conditions
Update Purchase Order
PUT /zoho-inventory/inventory/v1/purchaseorders/{purchaseorder_id}
Delete Purchase Order
DELETE /zoho-inventory/inventory/v1/purchaseorders/{purchaseorder_id}
Purchase Order Status Actions
# Mark as issued
POST /zoho-inventory/inventory/v1/purchaseorders/{purchaseorder_id}/status/issued
# Mark as cancelled
POST /zoho-inventory/inventory/v1/purchaseorders/{purchaseorder_id}/status/cancelled
Bills
List Bills
GET /zoho-inventory/inventory/v1/bills
Example:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/zoho-inventory/inventory/v1/bills')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Get Bill
GET /zoho-inventory/inventory/v1/bills/{bill_id}
Create Bill
POST /zoho-inventory/inventory/v1/bills
Content-Type: application/json
{
"vendor_id": "1234567890000",
"bill_number": "BILL-001",
"date": "2026-02-06",
"due_date": "2026-03-06",
"line_items": [
{
"item_id": "1234567890001",
"quantity": 100,
"rate": 10.00
}
]
}
Required Fields:
vendor_id- Vendor identifierbill_number- Unique bill number (required, not auto-generated)date- Bill date (yyyy-mm-dd)due_date- Payment due dateline_items- Array of items
Optional Fields:
reference_number- External referencenotes- Internal notesterms- Terms and conditionscurrency_id- Currency identifierexchange_rate- Exchange rate for foreign currency
Update Bill
PUT /zoho-inventory/inventory/v1/bills/{bill_id}
Delete Bill
DELETE /zoho-inventory/inventory/v1/bills/{bill_id}
Bill Status Actions
# Mark as open
POST /zoho-inventory/inventory/v1/bills/{bill_id}/status/open
# Mark as void
POST /zoho-inventory/inventory/v1/bills/{bill_id}/status/void
Shipment Orders
Create Shipment Order
POST /zoho-inventory/inventory/v1/shipmentorders
Content-Type: application/json
{
"shipment_number": "SHP-001",
"date": "2026-02-06",
"delivery_method": "FedEx",
"tracking_number": "1234567890"
}
Required Fields:
shipment_number- Unique shipment numberdate- Shipment datedelivery_method- Carrier/delivery method
Optional Fields:
tracking_number- Carrier tracking numbershipping_charge- Shipping costnotes- Internal notesreference_number- External reference
Get Shipment Order
GET /zoho-inventory/inventory/v1/shipmentorders/{shipmentorder_id}
Update Shipment Order
PUT /zoho-inventory/inventory/v1/shipmentorders/{shipmentorder_id}
Delete Shipment Order
DELETE /zoho-inventory/inventory/v1/shipmentorders/{shipmentorder_id}
Mark as Delivered
POST /zoho-inventory/inventory/v1/shipmentorders/{shipmentorder_id}/status/delivered
Item Groups
List Item Groups
GET /zoho-inventory/inventory/v1/itemgroups
Get Item Group
GET /zoho-inventory/inventory/v1/itemgroups/{itemgroup_id}
Create Item Group
POST /zoho-inventory/inventory/v1/itemgroups
Content-Type: application/json
{
"group_name": "T-Shirts",
"unit": "pcs",
"items": [
{
"name": "T-Shirt - Small",
"rate": 20.00,
"purchase_rate": 8.00,
"sku": "TS-S"
},
{
"name": "T-Shirt - Medium",
"rate": 20.00,
"purchase_rate": 8.00,
"sku": "TS-M"
}
]
}
Required Fields:
group_name- Group nameunit- Unit of measurement
Update Item Group
PUT /zoho-inventory/inventory/v1/itemgroups/{itemgroup_id}
Delete Item Group
DELETE /zoho-inventory/inventory/v1/itemgroups/{itemgroup_id}
Item Group Status Actions
# Mark as active
POST /zoho-inventory/inventory/v1/itemgroups/{itemgroup_id}/active
# Mark as inactive
POST /zoho-inventory/inventory/v1/itemgroups/{itemgroup_id}/inactive
Pagination
Zoho Inventory uses page-based pagination:
GET /zoho-inventory/inventory/v1/items?page=1&per_page=50
Response includes pagination info in page_context:
{
"code": 0,
"message": "success",
"items": [...],
"page_context": {
"page": 1,
"per_page": 50,
"has_more_page": true,
"sort_column": "name",
"sort_order": "A"
}
}
Continue fetching while has_more_page is true, incrementing page each time.
Code Examples
JavaScript
const response = await fetch(
'https://api.maton.ai/zoho-inventory/inventory/v1/items',
{
headers: {
'Authorization': `Bearer ${process.env.MATON_API_KEY}`
}
}
);
const data = await response.json();
Python
import os
import requests
response = requests.get(
'https://api.maton.ai/zoho-inventory/inventory/v1/items',
headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}
)
data = response.json()
Notes
- All successful responses have
code: 0and amessagefield - Dates should be in
yyyy-mm-ddformat - Contact types are
customerorvendor - Item types:
inventory,sales,purchases,sales_and_purchases - Product types:
goodsorservice - The
organization_idparameter is automatically handled by the gateway - you do not need to specify it - Sales order and purchase order numbers are auto-generated by default - do not specify
salesorder_numberorpurchaseorder_numberunless auto-generation is disabled in settings - Status action endpoints use POST method (e.g.,
/status/confirmed,/status/void) - Rate limits: 100 requests/minute per organization
- Daily limits vary by plan: Free (1,000), Standard (2,500), Professional (5,000), Premium (7,500), Enterprise (10,000)
- IMPORTANT: When using curl commands, use
curl -gwhen URLs contain brackets to disable glob parsing - IMPORTANT: When piping curl output to
jqor other commands, environment variables like$MATON_API_KEYmay not expand correctly in some shell environments
Error Handling
| Status | Meaning |
|---|---|
| 400 | Missing Zoho Inventory connection or invalid request |
| 401 | Invalid or missing Maton API key, or OAuth scope mismatch |
| 404 | Resource not found |
| 429 | Rate limited |
| 4xx/5xx | Passthrough error from Zoho Inventory API |
Common Error Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Invalid value |
| 2 | Mandatory field missing |
| 3 | Resource does not exist |
| 5 | Invalid URL |
Troubleshooting: API Key Issues
- Check that the
MATON_API_KEYenvironment variable is set:
echo $MATON_API_KEY
- Verify the API key is valid by listing connections:
python <<'EOF'
import urllib.request, os, json
req = urllib.request.Request('https://api.maton.ai/connections')
req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}')
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
Troubleshooting: Invalid App Name
- Ensure your URL path starts with
zoho-inventory. For example:
- Correct:
https://api.maton.ai/zoho-inventory/inventory/v1/items - Incorrect:
https://api.maton.ai/inventory/v1/items
Resources
常见问题
- 认证流程是怎样的?
- 在 Authorization 请求头中携带 API 密钥,网关会自动管理 Zoho Inventory 的 OAuth 令牌并注入到每个请求中,无需手动处理 token。
- 写入操作执行前会要求确认吗?
- 会。任何 create、update、delete 调用在执行前都需要用户明确确认目标资源和预期改动。
- 可以同时对接多个 Zoho Inventory 账号吗?
- 可以。每个账号作为一个独立的连接,通过 Maton-Connection 请求头即可指定本次请求使用的账号。
相关技能
以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。
把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。
在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。
从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。
编写、调试与调优 Playwright 测试,涵盖定位器策略、追踪诊断与 CI 友好的超时配置。
byungkyu 的更多技能
浏览全部技能通过托管 OAuth 访问 Microsoft Graph Excel 接口,读写 OneDrive 中的工作簿、工作表、区域、表格与图表。
通过 OAuth 认证网关管理 Stripe 客户、订阅、发票、产品、价格和支付。
通过托管 OAuth 的统一网关读写 Google Sheets 数据。
通过托管 OAuth 代理访问 YouTube Data API v3,搜索与管理视频、播放列表、频道、订阅和评论。
通过托管 OAuth 代理调用 WooCommerce REST API,管理商品、订单、客户、优惠券、物流、税务等数据。
通过托管 OAuth 认证,访问并管理 ClickUp 工作区、空间、文件夹、清单与任务等数据。