product

product.variant.update

Update variant.

put/product.variant.update.json

Request

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

Request body

idstring

Defines variant update specified by variant id

product_idstring

Defines product's id where the variant has to be updated

store_idstring

Defines store id where the variant should be found

lang_idstring

Language id

namestring

Defines variant's name that has to be updated

descriptionstring

Specifies variant's description

short_descriptionstring

Defines short description

modelstring

Specifies variant's model that has to be added

skustring

Defines new product's variant sku

visiblestring

Set visibility status

statusstring

Defines product variant's status

backorder_statusstring

Set backorder status

low_stock_thresholdnumber

Specify the quantity threshold below which the product is considered low in stock

available_for_saleboolean

Specifies the set of visible/invisible product's variants for sale

availboolean

Defines category's visibility status

is_defaultboolean

Defines as a default variant

is_free_shippingboolean

Specifies variant's free shipping flag that has to be added

taxableboolean

Specifies whether a tax is charged

tax_class_idstring

Defines tax classes where entity has to be added

is_virtualboolean

Defines whether the product is virtual

manage_stockboolean

Defines inventory tracking for product variant. When true, quantity sets the stock level and the stock status is derived from it; when false, quantity is ignored and in_stock sets the status directly.

in_stockboolean

Set stock status. Effective only when manage_stock is false — when stock is managed, the status is derived from quantity automatically and this parameter is ignored.

warehouse_idstring

This parameter is used for selecting a warehouse where you need to set/modify a product quantity.

reserve_quantitynumber

This parameter allows to reserve/unreserve product variants quantity.

quantitynumber

Defines new products' variants quantity. Effective only when manage_stock is true — otherwise the value is ignored. To enable stock tracking and set a quantity in one call, pass manage_stock=true together with quantity.

increase_quantitynumber

Defines the incremental changes in product quantity. Effective only when manage_stock is true — otherwise the value is ignored.

reduce_quantitynumber

Defines the decrement changes in product quantity. Effective only when manage_stock is true.

prices_inc_taxboolean

Indicates whether prices include tax.

pricenumber

Defines new product's variant price

special_pricenumber

Defines new product's variant special price

retail_pricenumber

Defines new product's retail price

old_pricenumber

Defines product's old price

cost_pricenumber

Defines new product's cost price

fixed_cost_shipping_pricenumber

Specifies fixed cost shipping price

sprice_createstring

Defines the date of special price creation

sprice_expirestring

Defines the term of special price offer duration

measure_unitstring

Unit for the price per unit. Must be in allowed list

unit_pricenumber

Defines new product's unit price

weightnumber

Weight

barcodestring

A barcode is a unique code composed of numbers used as a product identifier.

widthnumber

Defines product's width

weight_unitstring

Weight Unit

heightnumber

Defines product's height

lengthnumber

Defines product's length

gtinstring

Global Trade Item Number. An GTIN is an identifier for trade items.

upcstring

Universal Product Code. A UPC (UPC-A) is a commonly used identifer for many different products.

mpnstring

Manufacturer Part Number. A MPN is an identifier of a particular part design or material used.

eanstring

European Article Number. An EAN is a unique 8 or 13-digit identifier that many industries (such as book publishers) use to identify products.

isbnstring

International Standard Book Number. An ISBN is a unique identifier for books.

harmonized_system_codestring

Harmonized System Code. An HSC is a 6-digit identifier that allows participating countries to classify traded goods on a common basis for customs purposes

country_of_originstring

The country where the inventory item was made

meta_titlestring

Defines unique meta title for each entity

meta_descriptionstring

Defines unique meta description of a entity

meta_keywordsstring

Defines unique meta keywords for each entity

manufacturerstring

Specifies the product variant's manufacturer

reindexboolean

Is reindex required

clear_cacheboolean

Is cache clear required

processing_profile_idinteger

The numeric ID of the processing profile (readiness state) for physical products in Etsy. You can find possible values in the "cart.info" API method response, in the field processing_profiles[]->readiness_state_id.

idempotency_keystring

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>

Example request

{
  "store_id": "1",
  "name": "Bag Green L",
  "description": "Product variant",
  "short_description": "Short description. This is very short description",
  "model": "bag_01",
  "sku": "bag_01",
  "visible": "catalog",
  "status": "disabled",
  "backorder_status": "true",
  "low_stock_threshold": 1,
  "is_default": true,
  "is_free_shipping": true,
  "in_stock": true,
  "warehouse_id": "1",
  "quantity": 6,
  "increase_quantity": 4,
  "reduce_quantity": 4,
  "prices_inc_tax": true,
  "price": 99.9,
  "special_price": 56.9,
  "retail_price": 6.9,
  "old_price": 99.9,
  "cost_price": 65.9,
  "fixed_cost_shipping_price": 5.5,
  "sprice_create": "2018-08-25 23:56:12",
  "sprice_expire": "2018-08-25 23:56:12",
  "measure_unit": "Piece",
  "unit_price": 10.5,
  "weight": 23.69,
  "barcode": "9770317847001",
  "width": 56.12,
  "weight_unit": "lb",
  "height": 56.12,
  "length": 56.12,
  "gtin": "12345678912345",
  "upc": "9770317847001",
  "mpn": "9770317847001",
  "ean": "5901234123457",
  "isbn": "9783161484100",
  "harmonized_system_code": "123456",
  "country_of_origin": "123456",
  "meta_title": "category,test",
  "meta_description": "category,test",
  "meta_keywords": "category,test",
  "manufacturer": "Samsung",
  "idempotency_key": "098f6bcd4621d373cade4e832627b4f6"
}

Response

successful operation

return_codeinteger
return_messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.