---
title: "product.variant.update.batch"
method: POST
path: "/product.variant.update.batch.json"
tags: ["product"]
---

# product.variant.update.batch

`POST /product.variant.update.batch.json`

## Request

- Base URL: `https://api.api2cart.com/v1.1`
- URL: `https://api.api2cart.com/v1.1/product.variant.update.batch.json`
- Auth: API key in header `x-api-key` and API key in header `x-store-key`

Update products variants on the store.

## Request body

- ProductVariantUpdateBatch
  - `nested_items_update_behaviour` 'replace' | 'merge': Determines how updates to nested items should be handled.<hr><div style="font-style:normal"> Values description: <div style="margin-left: 2%; padding-top: 2%"> <div style="font-size:85%"> <b> replace</b>: This option indicates that the nested items should be completely replaced with the new data provided. </br> <b> merge</b>: With this option, updates to nested items are merged with the existing data. </br> </div> </div></div>
  - `clear_cache` boolean
  - `reindex` boolean
  - `payload` object[], required: Contains an array of product objects. The list of properties may vary depending on the specific platform.
    - `id` string, required
    - `product_id` string, required
    - `name` string
    - `description` string
    - `short_description` string
    - `sku` string
    - `upc` string
    - `mpn` string
    - `gtin` string
    - `isbn` string
    - `status` string
    - `price` number
    - `special_price` number
    - `cost_price` number
    - `retail_price` number
    - `advanced_prices` object[]: If an empty array is passed, all entries will be deleted when the 'nested_items_update_behaviour' parameter is set to 'replace'.
      - `value` number, required
      - `group_id` integer
      - `quantity` number, required
    - `quantity` number
    - `reserve_quantity` number
    - `increase_quantity` number
    - `reduce_quantity` number
    - `warehouse_id` string
    - `manufacturer_id` string
    - `weight` number
    - `height` number
    - `length` number
    - `width` number
    - `store_id` string
    - `lang_id` string
    - `tax_class_id` string
    - `backorder_status` string
    - `visible` string
    - `is_default` boolean
    - `in_stock` boolean
    - `is_virtual` boolean
    - `downloadable` boolean
    - `manage_stock` boolean
    - `is_free_shipping` boolean
    - `seo_url` string
    - `meta_title` string
    - `meta_description` string
    - `meta_keywords` string[]
    - `categories_ids` string[]: If an empty array is passed, all entries will be deleted when the 'nested_items_update_behaviour' parameter is set to 'replace'.
    - `stores_ids` string[]
    - `images` object[]: The passed items will completely replace the original items
      - `url` string, required
      - `type` string
      - `label` string
      - `name` string
      - `position` integer
    - `product_images_ids` string[]
    - `related_products_ids` string[]: If an empty array is passed, all entries will be deleted when the 'nested_items_update_behaviour' parameter is set to 'replace'.
    - `up_sell_products_ids` string[]: If an empty array is passed, all entries will be deleted when the 'nested_items_update_behaviour' parameter is set to 'replace'.
    - `cross_sell_products_ids` string[]: If an empty array is passed, all entries will be deleted when the 'nested_items_update_behaviour' parameter is set to 'replace'.
  - `idempotency_key` string: A unique identifier associated with a specific request. Repeated requests with the same <strong>idempotency_key</strong> return a cached response without re-executing the business logic. <strong>Please note that the cache lifetime is 15 minutes.</strong>

## Response `200`

successful operation

- object
  - `return_code` integer
  - `return_message` string
  - `result` object
    - `job_id` string

---

[API](https://skmtc.dev/api2cart/apis/api2cart-openapi.md) · [All operations](https://skmtc.dev/api2cart/apis/api2cart-openapi/llms.txt) · [OpenAPI document](https://skmtc.dev/api2cart/apis/api2cart-openapi/revisions/c34440741693?raw)
