let newAttributeGroup = {
"name": "color",
"frontendName": {
"de_DE": "Farbe",
"en_GB": "Color"
},
"group": "someName",
"type": "simple",
"cluster": "material",
"isShared": true,
"level": "product"
};
let response = await adminApi.apis.AttributeGroups.createAttributeGroup({}, {requestBody: newAttributeGroup});
let createdAttributeGroup = response.body;
let newAttributeGroup = {
"name": "season",
"frontendName": {
"de_DE": "Saison",
"en_GB": "Season"
},
"group": "someName",
"type": "simpleList",
"cluster": "material",
"isShared": true,
"level": "product"
};
let response = await adminApi.apis.AttributeGroups.createAttributeGroup({}, {requestBody: newAttributeGroup});
let createdAttributeGroup = response.body;
let newAttributeGroup = {
"name": "brand",
"frontendName": {
"de_DE": "Marke",
"en_GB": "Brand"
},
"group": "someName",
"type": "localizedString",
"cluster": "material",
"isShared": true,
"level": "product"
};
let response = await adminApi.apis.AttributeGroups.createAttributeGroup({}, {requestBody: newAttributeGroup});
let createdAttributeGroup = response.body;
let newAttributeGroup = {
"name": "notes",
"frontendName": {
"de_DE": "Hinweise",
"en_GB": "Notes"
},
"group": "someName",
"type": "localizedStringList",
"cluster": "material",
"isShared": false,
"level": "product"
};
let response = await adminApi.apis.AttributeGroups.createAttributeGroup({}, {requestBody: newAttributeGroup});
let createdAttributeGroup = response.body;
let newAttributeGroup = {
"name": "material_composition_textile",
"frontendName": {
"de_DE": "Materialzusammensetzung",
"en_GB": "Material Composition"
},
"type": "advancedList",
"cluster": "material",
"isShared": false,
"level": "product",
"structure": {
"group": {
"type": "attributeGroup",
"attributeGroupName": "overmaterial"
},
"components": {
"type": "array",
"items": {
"fraction": {
"type": "integer"
},
"unit": {
"type": "attribute",
"attributeGroupName": "unit",
"attributeName": "%"
},
"material": {
"type": "attributeGroup",
"attributeGroupName": "material"
}
}
}
},
"shopCountries": [
{
"shopKey": "ms",
"countryCode": "DE"
}
],
"isOverridablePerShop": true
};
let response = await adminApi.apis.AttributeGroups.createAttributeGroup({}, {requestBody: newAttributeGroup});
let createdAttributeGroup = response.body;
let simpleNonSharedAGWithValueTypeOfInteger = {
"name": "simpleNonSharedAGWithValueType",
"frontendName": {
"de_DE": "deName",
"en_GB": "enName"
},
"group": "someName",
"type": "simple",
"cluster": "material",
"simpleValueType": "integer",
"isShared": false,
"level": "product"
};
let response = await adminApi.apis.AttributeGroups.createAttributeGroup({}, {requestBody: simpleNonSharedAGWithValueTypeOfInteger});
let createdAttributeGroup = response.body;
let simpleNonSharedAGWithValueTypeOfAttribute = {
"name": "simpleNonSharedAGWithValueType",
"frontendName": {
"de_DE": "deName",
"en_GB": "enName"
},
"group": "someName",
"type": "simple",
"cluster": "material",
"simpleValueType": "attribute",
"simpleValueTypeConfig": {
"attributeGroupName": "color",
"attributeName": "red"
},
"isShared": false,
"level": "product"
};
let response = await adminApi.apis.AttributeGroups.createAttributeGroup({}, {requestBody: simpleNonSharedAGWithValueTypeOfAttribute});
let createdAttributeGroup = response.body;