Supported Formats

json

Errors

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.

Examples

request:
  Same as product create

response:
  Same as product create

Params

Param name Description
product
required

Validations:

  • Must be a Hash

product[locale]
optional , nil allowed

Locale for this product. Should be one of the language codes defined on CommerceConnect. Defaults to the default language.

Validations:

  • Must be a String

product[name]
optional , nil allowed

Product or sku name

Validations:

  • Must be a String

product[code]
optional , nil allowed

Unique identifier for product and sku

Validations:

  • Must be a String

product[_new_code]
optional , nil allowed

Update the code of existing product

Validations:

  • Must be a String

product[attribute_set]
optional , nil allowed

Attribute set name that this product is assigned to. This must be created beforehand

Validations:

  • Must be a String

product[product_class_name]
optional , nil allowed

Class name that this product is assigned to. This must be created beforehand

Validations:

  • Must be a String

product[product_family_code]
optional , nil allowed

Product family code

Validations:

  • Must be a String

product[product_type]
optional , nil allowed

Validations:

  • Must be one of: product, kit.

product[status]
optional , nil allowed

Validations:

  • Must be one of: inactive, active.

product[kit_create_mode]
optional , nil allowed

Provide this only for creating new kit. Empty kit - create empty kit in the provided attribute set. Clone from existing SKU - create a kit by copying all data from the product with code in base_sku_code_for_clone field

Validations:

  • Must be one of: Empty kit, Clone from existing SKU.

product[base_sku_code_for_clone]
optional , nil allowed

The product code (must be SKU/bottom level product) to clone for new kit. kit_create_mode must be Clone from existing SKU. Provide this only for creating new kit

Validations:

  • Must be a String

product[brand]
optional , nil allowed

Validations:

  • Must be a Hash

product[brand][id]
optional , nil allowed

Brand ID

Validations:

  • Must be a Integer

product[product_attributes]
optional , nil allowed

Validations:

  • Must be a Hash

product[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:

  • Must be a String

product[dimension]
optional , nil allowed

Validations:

  • Must be a Hash

product[dimension][length]
optional , nil allowed

Validations:

  • Must be a Numeric

product[dimension][width]
optional , nil allowed

Validations:

  • Must be a Numeric

product[dimension][height]
optional , nil allowed

Validations:

  • Must be a Numeric

product[dimension][weight]
optional , nil allowed

Validations:

  • Must be a Numeric

product[packed_dimension]
optional , nil allowed

Validations:

  • Must be a Hash

product[packed_dimension][length]
optional , nil allowed

Validations:

  • Must be a Numeric

product[packed_dimension][width]
optional , nil allowed

Validations:

  • Must be a Numeric

product[packed_dimension][height]
optional , nil allowed

Validations:

  • Must be a Numeric

product[packed_dimension][weight]
optional , nil allowed

Validations:

  • Must be a Numeric

product[shipping_zones]
optional , nil allowed

Replace existing shipping zones with these new shipping zones

Validations:

  • Must be an array of String

product[price_items]
optional , nil allowed

Add new prices or update existing prices if they exist.

Validations:

  • Must be an Array of nested elements

product[price_items][price_book_name]
optional , nil allowed

Name of an existing price book to which this price item is linked

Validations:

  • Must be a String

product[price_items][from]
optional , nil allowed

Valid from

Validations:

  • Must be a String

product[price_items][to]
optional , nil allowed

Valid to

Validations:

  • Must be a String

product[price_items][amount]
optional , nil allowed

Validations:

  • Must be a Numeric

product[categories]
optional , nil allowed

Set the product’s categories to these categories (existing categories will be removed)

Validations:

  • Must be an Array of nested elements

product[categories][id]
optional , nil allowed

Category ID

Validations:

  • Must be a Integer

product[catalogs]
optional , nil allowed

Link these catalogs with the product.

Validations:

  • Must be an Array of nested elements

product[catalogs][id]
optional , nil allowed

Catalog ID

Validations:

  • Must be a Integer

product[catalogs][name]
optional , nil allowed

Catalog name

Validations:

  • Must be a String

product[media_items]
optional , nil allowed

Set the product’s media items to these (existing media items will be removed).

Validations:

  • Must be an Array of nested elements

product[media_items][media_item_type]
optional , nil allowed

Validations:

  • Must be one of: ImageMediaItem, VideoMediaItem, FileMediaItem.

product[media_items][url]
optional , nil allowed

URL that stores the corresponding media item

Validations:

  • Must be a String

product[media_items][description]
optional , nil allowed

Description for the media item

Validations:

  • Must be a String

product[media_items][sort_order_position]
optional , nil allowed

The position of the media item. Non negative integer is supported

Validations:

  • Must be a Integer

product[media_items][is_primary]
optional , nil allowed

Make this media item as primary

Validations:

  • Must be one of: true, false, 1, 0.

product[media_items][tag_list]
optional , nil allowed

Tags for this media item

Validations:

  • Must be an array of String

product[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:

  • Must be a Hash

product[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:

  • Must be one of: true, false, 1, 0.

product[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:

  • Must be a String

product[media_items][processing_options][processed_tags]
optional , nil allowed

The tags for the created media item.

Validations:

  • Must be an array of String

product[inventories]
optional , nil allowed

Add new inventory or update existing inventory data

Validations:

  • Must be an Array of nested elements

product[inventories][inventory_source]
optional , nil allowed

Inventory source name to which this inventory is applied

Validations:

  • Must be a String

product[inventories][sku]
optional , nil allowed

Inventory source related SKU

Validations:

  • Must be a String

product[inventories][qty]
optional , nil allowed

Quantity in the inventory source specified

Validations:

  • Must be a Integer

product[inventories][available_qty]
optional , nil allowed

Available quantity in the inventory source specified

Validations:

  • Must be a Integer

product[inventories][stock_availability]
optional , nil allowed

Flag to indicate the stock level

Validations:

  • Must be one of: out_of_stock, in_stock.

product[inventories][out_of_stock_threshold]
optional , nil allowed

Out of stock threshold

Validations:

  • Must be a Integer

product[inventories][dispatch_time]
optional , nil allowed

Dispatch time

Validations:

  • Must be a Integer

product[inventories][dispatch_time_unit]
optional , nil allowed

Dispatch time unit

Validations:

  • Must be one of: day, hour.

product[inventories][unit_cost]
optional , nil allowed

Unit cost of the product for this inventory source

Validations:

  • Must be a Numeric

product[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:

  • Must be one of: dynamic, static.

product[variants]
optional , nil allowed

Validations:

  • Must be a Hash

product[variants][_product_code_]
optional , nil allowed

Child product. It accepts the params of a product

Validations:

  • Must be a Hash

product[virtual_products]
optional , nil allowed

Validations:

  • Must be a Hash

product[virtual_products][_virtual_product_code_]
optional , nil allowed

Validations:

  • Must be a Hash

product[virtual_products][_virtual_product_code_][code]
optional , nil allowed

Unique identifier for virtual product

Validations:

  • Must be a String

product[virtual_products][_virtual_product_code_][name]
optional , nil allowed

Virtual product name. Required for creating new virtual

Validations:

  • Must be a String

product[virtual_products][_virtual_product_code_][status]
optional , nil allowed

Required for creating new virtual product

Validations:

  • Must be one of: inactive, active.

product[virtual_products][_virtual_product_code_][attributes]
optional , nil allowed

Validations:

  • Must be a Hash

product[virtual_products][_virtual_product_code_][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:

  • Must be a String

product[kit_skus]
optional , nil allowed

Validations:

  • Must be an Array of nested elements

product[kit_skus][product_code]
optional

Product code. It must be at bottom level (SKU) and cannot be a Kit

Validations:

  • Must be a String

product[kit_skus][qty]
optional

The qty of the bundled SKU

Validations:

  • Must be a Integer