shop.product.massUpdate
Updates multiple products and their variants data.
Parameters
-
product
POST
Optional
Products data array. the sub-array of each product can contain values with the following keys:
- id (int) Product ID. Required field.
- name (string) Product name.
- type_id (int) Product type ID.
- summary (string) Brief description.
- description (string) Full description.
- meta_title (string) TITLE element for product page in storefront.
- meta_keywords (string) META keywords value.
- meta_description (string) META description.
- og (array) Associative array of product properties for social media and online messengers. Examples of allowed array keys are 'title', 'description', 'video', 'image_id'.
- status (int) Publication status: -1 (unpublished), 0 (hidden), 1 (published).
- image_id (int) Default image ID.
- sku_id (int) Default variant ID.
- video_url (string) Video URL.
- url (string) Editable part of the product page URL in the storefront.
- currency (string) 3-letter currency code.
- tax_id (int) Tax rule ID.
- cross_selling (int) Recommended products selection mode (cross-selling). 0: disabled, 1: automatic selection, 2: manually selected recommended products.
- upselling (int) Recommended products selection mode (upselling). 0: disabled, 1: automatic selection, 2: manually selected recommended products.
- badge (int|string) ID of selected default badge or custom badge HTML code.
- sku_type (int) Product variants selection mode for the storefront: 0 (by SKU names), 1 (by feature values).
- stock_base_ratio (float) Stock-to-base quantity unit ratio.
- order_count_step (float) Quantity adjustment value with “+/-” buttons.
- order_count_min (float) Minimum orderable quantity. If not specified then product type setting is applied by default. -
sku
POST
Optional
Product variants data. The sub-array of each variant can contain values with the following keys:
- id (int) Variant ID. Required field.
- sku (string) SKU code.
- sort (int) Sort order value.
- name (string) SKU name.
- image_id (int) Selected image ID.
- price (float) Price.
- purchase_price (float) Purchase price.
- compare_price (float) Strike-through price.
- available (int) Flag (0 or 1) denoting availability for ordering.
- status (int) Flag (0 or 1) denoting visibility in the storefront. Default value is 1.
- stock (array) Variant’s stock quantities. If no stocks are set up in the store settings then the array must contain 1 item with the Variant’s stock quantity in the decimal(15,3) format. If stocks are set up then array keys must be stock IDs and array values must be quantities available on those stocks in the decimal(15,3) format.
- count (int|float|null) Variant’s quantity available in stock. Is used in the case when stocks are not set up in the store settings and the 'stock' parameter is empty. -
jproduct
POST
Optional
If no value is specified for 'product' parameter, then a string value formatted using json_encode() function is used instead.
-
jsku
POST
Optional
If no value is specified for 'sku' parameter, then a string value formatted using json_encode() function is used instead.
-
format
GET
Optional
Sets response format. Available options:
json
(default),xml
.