商品

這一頁從系統實際的 tool 產生。授權項目是權杖要勾的項目;「核可」是 Agent 呼叫之後要不要等人在網站上核可。

product_create

寫入核可:不用

存一個商品:名稱、品號、說明、每個幣別一個單價。

給 Agent 的原文

Save a product (name, item code, description, one unit price per currency). A taken item code returns PRODUCT_REF_TAKEN.

參數

名稱型別必填說明
namestring必填
refstringItem code; unique in the workspace (case-sensitive) when not empty
descriptionstringUp to 200 characters, copied into order items
pricesPrice[]必填One unit price per currency, at least one
prices[].currencystring必填An enabled currency of the workspace, e.g. TWD
prices[].unit_pricestring必填Amount as a string, e.g. "30000"
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:products:manage

product_delete

寫入核可:不用

刪除一個商品;已經成立的訂單和報價單不受影響,品號之後可以再用。

給 Agent 的原文

Delete a product. Orders and quotes already created do not change; the item code can be used again.

參數

名稱型別必填說明
productstring必填Item code (ref, exact match) or product id
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:products:manage

product_get

核可:不用

用品號或 id 查一個商品,附 version(product_update 要用)。

給 Agent 的原文

Get one product by item code or id, with its version (needed by product_update).

參數

名稱型別必填說明
productstring必填Item code (ref, exact match) or product id

授權項目:products:read

核可:不用

用名稱或品號找存好的商品,照名稱排序。訂單不會連到商品:要自己把名稱、品號、說明和訂單幣別的單價抄進 order_create 或 quote_create 的品項。

給 Agent 的原文

Search saved products by name or item code, ordered by name. Copy name, ref, description and the unit price of the order's currency into the items of order_create or quote_create yourself; orders are not linked to products.

參數

名稱型別必填說明
keywordstringPart of the product name or item code (ref)
limitintegerdefault: 20
cursorstring(可以是 null)

授權項目:products:read

product_update

寫入核可:不用

整份換掉商品的資料;prices 沒列的幣別會拿掉。已經成立的訂單和報價單不受影響。

給 Agent 的原文

Replace a product's fields; currencies not listed in prices are removed. Orders and quotes already created do not change.

參數

名稱型別必填說明
namestring必填
refstringItem code; unique in the workspace (case-sensitive) when not empty
descriptionstringUp to 200 characters, copied into order items
pricesPrice[]必填One unit price per currency, at least one
prices[].currencystring必填An enabled currency of the workspace, e.g. TWD
prices[].unit_pricestring必填Amount as a string, e.g. "30000"
productstring必填Item code (ref, exact match) or product id
versioninteger必填The version from product_get; a different one returns CONCURRENT_MODIFICATION
idempotency_keystring必填Required for every call that writes (not for dry_run). The same key within 24 hours returns the first result instead of doing it again.

授權項目:products:manage