Изменить цены варианта
update_variantUpdate prices and compare-at prices for up to 250 variants of a single product. Pass product ID and variant IDs with new price values, including null to clear compare-at.
Instructions
Задаёт цену и/или зачёркнутую цену (compareAtPrice) вариантам одного товара — до 250 вариантов за вызов, каждый элемент variants несёт id варианта и новые значения. Суммы — десятичные строки в валюте магазина ("1999.00"); compareAtPrice: null убирает зачёркнутую цену. Больше ничего в варианте не меняет (SKU, штрихкод, опции — через graphql_request). Требуется id товара-родителя: он есть в ответах list_products и get_product. Провал приходит как ошибка с userErrors.
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": {
"productId": "<productId>",
"variants": "<variants>"
},
"name": "update_variant"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variants | Yes | Варианты одного товара с новыми ценами. | |
| productId | Yes | Id товара-родителя: число или gid://shopify/Product/<id>. |