Add or update by SKU
upsert_productsAdds or updates up to 100 products, each found by sku: a product with a variant of that SKU is updated
(its product changes, and that variant's price and availability), and otherwise a product is made
with one variant of that SKU (a title is then needed). Sending the same products twice makes no
duplicates. Each is done on its own and answers created, updated or invalid, with the field to fix
and a stable code: invalid_field, title_required, sku_ambiguous (two products have the SKU),
category_not_found or photo_not_found. Photos join a product as they are added, sent with its
product_id (add_photo_from_url, or an upload); product.media sets all its photos at once, in order,
keeping as many as the plan allows on one product (the result's message then says how many were kept).
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": {
"products": "<products>"
},
"name": "upsert_products"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| products | Yes | Up to 100, each with a `sku`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes |