API - Feature Variants add

I need some help.
Product uploading via API.

I have created new Product Feature via API, get the new feature id as a result. Its is OK.

But how can I add new variant to an existing feature? Is there any endpoint for it?

Hi!

https://docs.cs-cart.com/latest/developer_guide/api/entities/product_features.html

Use PUT request and specify the variants in the variants parameter.

{
	"feature_id": "549",
	"company_id": "0",
	"feature_type": "S",
	"parent_id": "0",
	"display_on_product": "Y",
	"display_on_catalog": "Y",
	"display_on_header": "N",
	"description": "Color",
	"internal_name": "Color",
	"lang_code": "en",
	"status": "A",
	"comparison": "Y",
	"purpose": "group_catalog_item",
	"feature_style": "dropdown_images",
	"filter_style": "checkbox",
	"variants": {
		"1198": {
			"variant_id": "1198",
			"variant": "Green",
			"lang_code": "en",
			"feature_id": "549"
		},
		"1199": {
			"variant_id": "1199",
			"variant": "Blue",
			"lang_code": "en",
			"feature_id": "549"
		},
		"1200": {
			"variant_id": "1200",
			"variant": "Black",
			"lang_code": "en",
			"feature_id": "549"
		},
		"1201": {
			"variant_id": "1201",
			"variant": "White",
			"lang_code": "en",
			"feature_id": "549"
		}
	}
}
1 Like