shop.product.skus.add
Adds a new product variant.
Parameters
-
product_id
GET
Product ID.
-
sku
POST
Optional
SKU code.
-
sort
POST
Optional
Sort order value.
-
name
POST
Optional
SKU name.
-
image_id
POST
Optional
Selected image ID.
-
price
POST
Optional
Price.
-
purchase_price
POST
Optional
Purchase price.
-
compare_price
POST
Optional
Strike-through price.
-
available
POST
Optional
Flag (0 or 1) denoting the product variant’s availability for ordering.
-
status
POST
Optional
Flag (0 or 1) denoting visibility in the storefront. Default value is 1.
-
stock
POST
Optional
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
POST
Optional
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.
-
stock_base_ratio
POST
Optional
Stock-to-base quantity unit ratio. If not specified then product settings value is applied by default.
-
order_count_min
POST
Optional
Quantity adjustment value with “+/-” buttons. If not specified then product settings value is applied by default.
-
order_count_step
POST
Optional
Minimum orderable quantity. If not specified then product settings value is applied by default.
-
format
GET
Optional
Sets response format. Available options:
json
(default),xml
.
Error codes
-
invalid_request
Invalid formed request. Additional information about the error is available in
error_description
parameter. -
access_denied
Access to the specified API method for the current token is denied.
-
invalid_method
Unknown API method.