set-variation-inventory
Set the warehouse stock of ONE variation on a multi-variation listing, and queue the marketplace revise that shows it to buyers. This writes only that variation — sibling variations and the parent listing are untouched. It is the direct write behind the variations[].warehouseQuantity get-product-listings reports.
Address the variation by variationId (the variations[].id from get-product-listings with withVariations) or by its own sku — not the parent listing's SKU. A SKU matching more than one variation is refused rather than guessed; pass sellerId to resolve it.
ONLY for a variation with no catalog product behind it. If the variation has a productId, its stock belongs to that product: use patch-product instead, or Inventory Sync will overwrite this write.
The stock is saved immediately; the channel revise runs asynchronously, so re-read the listing to see the buyer-visible quantity change. With Inventory Control on the channel gets min(warehouseQuantity, max(upToQuantity, 1)), reported back as channelQuantity. Authenticated via bearer token.
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": {
"warehouseQuantity": "<warehouseQuantity>"
},
"name": "set-variation-inventory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | The variation to write, by its own SKU (not the parent listing's) | |
| sellerId | No | Marketplace account to resolve an ambiguous sku against | |
| variationId | No | The variation to write, by its id. Use this or sku. | |
| warehouseQuantity | Yes | The on-hand stock to record for this variation |