create_metafield
Create custom app metafields to store additional merchant settings or data for your application.
Instructions
[WRITE] 建立商家應用元欄位(App Metafield)。
【用途】 為商家建立自定義的元欄位,用於儲存應用程式所需的額外商家設定或資料。
【呼叫的 Shopline API】
POST /merchants/current/app-metafields
【回傳結構】 dict 含 success: bool, resource_id: str, message: str, metafield: dict。
【副作用】
在商家的應用元欄位中新增一筆記錄
相同 namespace + key 組合若已存在,可能會失敗或覆蓋(取決於 Shopline 實作)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"metafield_data": "<metafield_data>"
},
"name": "create_metafield"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metafield_data | Yes | 元欄位資料,例如:{"namespace": "my_app", "key": "custom_key", "value": "custom_value", "value_type": "string"} |