Code | Description |
---|---|
401 | Unauthorized. Include a WWW-Authenticate header field containing a challenge applicable to the requested resource. |
403 | Forbidden. The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. the user does not have the necessary permissions for the resource. |
404 | Not Found. The requested resource could not be found. |
422 | Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors. |
500 | Internal Server Error. An unexpected condition was encountered. |
request: { "variant": { "code": "variant_1", "name": "Variant 1 Updated" } } response: { "id": 2, "product_type": "product", "code": "variant_1", "status": "active", "product_attributes": { "description": { "base_type": "html", "value": "Variant 1 description" }, "short_description": { "base_type": "html", "value": "" } }, "name": "Variant 1 Updated", "is_complete": false, "incomplete_fields": { "missing_image": true, "missing_category": false, "missing_price": true, "missing_attributes": null }, "discontinued": false, "shipping_options": [], "attribute_set": { "id": 1, "name": "Automotive" }, "product_level": { "id": 1, "name": "Products" }, "brand": { "id": 1, "name": "MOTUL", "description": null, "logo_link": "" }, "product_categories": [ { "is_primary": true, "category_id": 1, "name": "Engine Oil", "path": "Engine Oil", "category_set": { "id": 1, "name": "default" } } ], "catalogs": [], "shipping_zones": [ { "id": 1, "name": "AU_FREE" } ], "media_items": [] }
Param name | Description |
---|---|
variant required |
Validations:
|
variant[locale] optional , nil allowed |
Locale for this product. Should be one of the language codes defined on CommerceConnect. Defaults to the default language. Validations:
|
variant[name] optional , nil allowed |
Variant or sku name Validations:
|
variant[code] optional |
Unique identifier for variant and sku Validations:
|
variant[status] optional , nil allowed |
Validations:
|
variant[product_attributes] optional , nil allowed |
Validations:
|
variant[product_attributes][_any_attribute_code_] optional , nil allowed |
The key of attribute is attribute code and value is a valid json type that matches the base type of the attribute Validations:
|
variant[dimension] optional , nil allowed |
Validations:
|
variant[dimension][length] optional , nil allowed |
Validations:
|
variant[dimension][width] optional , nil allowed |
Validations:
|
variant[dimension][height] optional , nil allowed |
Validations:
|
variant[dimension][weight] optional , nil allowed |
Validations:
|
variant[packed_dimension] optional , nil allowed |
Validations:
|
variant[packed_dimension][length] optional , nil allowed |
Validations:
|
variant[packed_dimension][width] optional , nil allowed |
Validations:
|
variant[packed_dimension][height] optional , nil allowed |
Validations:
|
variant[packed_dimension][weight] optional , nil allowed |
Validations:
|
variant[price_items] optional , nil allowed |
Add new prices or update existing prices if they exist. Validations:
|
variant[price_items][price_book_name] optional , nil allowed |
Name of an existing price book to which this price item is linked Validations:
|
variant[price_items][from] optional , nil allowed |
Valid from Validations:
|
variant[price_items][to] optional , nil allowed |
Valid to Validations:
|
variant[price_items][amount] optional , nil allowed |
Validations:
|
variant[categories] optional , nil allowed |
Set the product’s categories to these categories (existing categories will be removed) Validations:
|
variant[categories][id] optional , nil allowed |
Category ID Validations:
|
variant[catalogs] optional , nil allowed |
Link these catalogs with the product. Validations:
|
variant[catalogs][id] optional , nil allowed |
Catalog ID Validations:
|
variant[catalogs][name] optional , nil allowed |
Catalog name Validations:
|
variant[media_items] optional , nil allowed |
Set the product’s media items to these (existing media items will be removed). Validations:
|
variant[media_items][media_item_type] optional , nil allowed |
Validations:
|
variant[media_items][url] optional , nil allowed |
URL that stores the corresponding media item Validations:
|
variant[media_items][description] optional , nil allowed |
Description for the media item Validations:
|
variant[media_items][sort_order_position] optional , nil allowed |
The position of the media item. Non negative integer is supported Validations:
|
variant[media_items][is_primary] optional , nil allowed |
Make this media item as primary Validations:
|
variant[media_items][tag_list] optional , nil allowed |
Tags for this media item Validations:
|
variant[media_items][processing_options] optional , nil allowed |
Options to perform extra image processing on the media item. This is applicable only when media_item_type is ‘ImageMediaItem’ Validations:
|
variant[media_items][processing_options][apply_background] optional , nil allowed |
Setting this to true would result in a new media item created against the product with background applied. Removes transparency. Validations:
|
variant[media_items][processing_options][background_colour] optional , nil allowed |
The colour name or a hex colour code for the background colour for the created media item. Defaults to white. Validations:
|
variant[media_items][processing_options][tags] optional , nil allowed |
The tags for the created media item. Validations:
|
variant[inventories] optional , nil allowed |
Add new inventory or update existing inventory data Validations:
|
variant[inventories][inventory_source] optional , nil allowed |
Inventory source name to which this inventory is applied Validations:
|
variant[inventories][sku] optional , nil allowed |
Inventory source related SKU Validations:
|
variant[inventories][qty] optional , nil allowed |
Quantity in the inventory source specified Validations:
|
variant[inventories][stock_availability] optional , nil allowed |
Flag to indicate the stock level Validations:
|
variant[inventories][out_of_stock_threshold] optional , nil allowed |
Out of stock threshold Validations:
|
variant[inventories][dispatch_time] optional , nil allowed |
Dispatch time Validations:
|
variant[inventories][dispatch_time_unit] optional , nil allowed |
Dispatch time unit Validations:
|
variant[inventories][unit_cost] optional , nil allowed |
Unit cost of the product for this inventory source Validations:
|
variant[inventories][lead_time] optional , nil allowed |
Lead time Validations:
|
variant[inventories][lead_time_unit] optional , nil allowed |
Lead time unit Validations:
|
variant[inventories][style] optional , nil allowed |
Dynamic means Qty changes and Static means Qty stays the same. This is related to inventory decrement for order download Validations:
|