返回顶部
z

zoho-inventoryZoho库存管理

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
12,009
下载量
免费
免费
3
收藏
概述
安装方式
版本历史

zoho-inventory

Zoho Inventory

通过托管OAuth认证访问Zoho Inventory API。支持对商品、销售订单、发票、采购订单、账单、联系人、发货单和商品组进行完整的增删改查操作。

快速开始

bash

列出商品


python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/zoho-inventory/inventory/v1/items)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

基础URL

https://gateway.maton.ai/zoho-inventory/inventory/v1/{endpoint}

网关会将请求代理到 www.zohoapis.com/inventory/v1,并自动注入您的OAuth令牌。

认证

所有请求都需要在Authorization头中携带Maton API密钥:

Authorization: Bearer $MATONAPIKEY

环境变量: 将您的API密钥设置为 MATONAPIKEY:

bash
export MATONAPIKEY=YOURAPIKEY

获取API密钥

  1. 1. 在 maton.ai 登录或创建账户
  2. 前往 maton.ai/settings
  3. 复制您的API密钥

连接管理

在 https://ctrl.maton.ai 管理您的Zoho Inventory OAuth连接。

列出连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=zoho-inventory&status=ACTIVE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

创建连接

bash
python < import urllib.request, os, json
data = json.dumps({app: zoho-inventory}).encode()
req = urllib.request.Request(https://ctrl.maton.ai/connections, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

获取连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id})
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

响应:
json
{
connection: {
connection_id: 21fd90f9-5935-43cd-b6c8-bde9d915ca80,
status: ACTIVE,
creation_time: 2025-12-08T07:20:53.488460Z,
lastupdatedtime: 2026-01-31T20:03:32.593153Z,
url: https://connect.maton.ai/?session_token=...,
app: zoho-inventory,
metadata: {}
}
}

在浏览器中打开返回的 url 以完成OAuth授权。

删除连接

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id}, method=DELETE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

指定连接

如果您有多个Zoho Inventory连接,请使用 Maton-Connection 头指定要使用的连接:

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/zoho-inventory/inventory/v1/items)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Maton-Connection, 21fd90f9-5935-43cd-b6c8-bde9d915ca80)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

如果省略,网关将使用默认(最早创建的)活动连接。

API参考

可用模块

模块端点描述
商品/items产品和服务
商品组
/itemgroups | 分组的产品变体 | | 联系人 | /contacts | 客户和供应商 | | 销售订单 | /salesorders | 销售订单 | | 发票 | /invoices | 销售发票 | | 采购订单 | /purchaseorders | 采购订单 | | 账单 | /bills | 供应商账单 | | 发货单 | /shipmentorders | 发货跟踪 |

商品

列出商品

bash
GET /zoho-inventory/inventory/v1/items

示例:

bash
python < import urllib.request, os, json
req = urllib.request.Request(https://gateway.maton.ai/zoho-inventory/inventory/v1/items)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

响应:
json
{
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,
hasmorepage: false
}
}

获取商品

bash
GET /zoho-inventory/inventory/v1/items/{item_id}

创建商品

bash
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
}

必填字段:

  • - name - 商品名称

可选字段:

  • - rate - 销售价格
  • purchaserate - 采购成本
  • sku - 库存单位(唯一)
  • itemtype - inventory、sales、purchases 或 salesandpurchases
  • producttype - goods 或 service
  • unit - 计量单位
  • istaxable - 是否应税
  • taxid - 税号
  • description - 商品描述
  • reorderlevel - 再订购点
  • vendor_id - 首选供应商

示例:

bash
python < 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://gateway.maton.ai/zoho-inventory/inventory/v1/items, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF

响应:
json
{
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
}
}

更新商品

bash
PUT /zoho-inventory/inventory/v1/items/{item_id}
Content-Type: application/json

{
name: Updated Widget,
rate: 30.00
}

删除商品

bash
DELETE

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 zoho-inventory-1775886848 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 zoho-inventory-1775886848 技能

通过命令行安装

skillhub install zoho-inventory-1775886848

下载

⬇ 下载 zoho-inventory v1.0.3(免费)

文件大小: 6.44 KB | 发布时间: 2026-4-12 12:05

v1.0.3 最新 2026-4-12 12:05
- Added clawdbot metadata indicating required environment variable MATON_API_KEY.
- No functional or documentation changes to the skill features.
- Version number remains unchanged.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部