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: { "alias_product": { "code": "product_1", "name": "Product 1", "master_product_code": "the parent product code of alias product", "product_class_name": "product class name for alias product", "status": "active", "product_attributes": { "description": "Product 1 description" } } } Sample: create an alias product in a one level attribute set with minimal data required { "alias_product": { "code": "alias_product_code", "name": "alias_product_name", "master_product_code": "the parent product code of alias product", "product_class_name": "product class name for alias product", "product_attributes": { "description": "content test here", "gender": "Male" } } } Sample: update some fields of an existing alias product { "alias_product": { "code": "alias_product_code-001", "product_attributes": { "description": "content test here", "gender": "Male" } } } Single option, multi option values: { "alias_product": { "code": "sku-12" "product_attributes": { "option1": 2, "option2": [ { "code": "blue" } ], "option3": [4, 5], "option4": [ { "code": "A" }, { "code": "B" } ] } } } Response: { "id": 2712, "product_type": null, "code": "csv-group-1", "master_product_code": "the parent product code of alias product", "status": "active", "product_attributes": null, "name": "csv-group-1", "class_type": "sku", "discontinued": false, "attribute_values": [ { "attribute_definition_id": 25, "attribute_definition_code": "multi_option_attributes", "data": [] }, { "attribute_definition_id": 2, "attribute_definition_code": "short_description", "data": "" } ] }
Param name | Description |
---|---|
alias_product required |
Validations:
|
alias_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:
|
alias_product[name] optional , nil allowed |
Product or sku name Validations:
|
alias_product[code] optional , nil allowed |
Unique identifier for product and sku Validations:
|
alias_product[product_class_name] optional , nil allowed |
Class name that this product is assigned to. This must be created beforehand Validations:
|
alias_product[status] optional , nil allowed |
Validations:
|
alias_product[product_attributes] optional , nil allowed |
Validations:
|
alias_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:
|
alias_product[catalogs] optional , nil allowed |
Link these catalogs with the product. Validations:
|
alias_product[catalogs][id] optional , nil allowed |
Catalog ID Validations:
|
alias_product[catalogs][name] optional , nil allowed |
Catalog name Validations:
|