Insert Product Attribute Combination
Request Parameters:
This method allows to insert new product attribute combination:
URL for nopCommerce 4.10 :
Api/Admin/InsertAttributeCombination
Headers :
Content-Type : application/json
Parameter: Required [ProductId]
{
"ApiSecretKey" :"k104r106p102g98k116q107x114x118" ,
"RestAPIAdminAccessKey" :"4fbdf629-be68-4371-a81d-4b191c98a52e",
"ProductId":"25",
"ProductAttributeControlTypeModel":
{
"TextBoxValue": "shoes_Attribute",
"DatePickerList": [15, 2, 2016],
"ReadOnlyCheckboxList": [78, 79],
"DropdownId": 80,
"RadioButtonId": 81,
"CheckboxsList": [82, 87],
"MultilineTextbox": "",
"Colorsqures": 84
},
"ProductAttributeCombinationModel":
{
"AllowOutOfStockOrders": "true",
"Gtin": "GTIN1234",
"ManufacturerPartNumber": "shoes_Manufacturer",
"OverriddenPrice": "100",
"Sku": "Shoes_123",
"StockQuantity": "10000"
}
}
Response :
{
"ProductId": 25,
"AttributesXml": null,
"StockQuantity": 10000,
"AllowOutOfStockOrders": true,
"Sku": "Shoes_123",
"ManufacturerPartNumber": "shoes_Manufacturer",
"Gtin": "GTIN1234",
"OverriddenPrice": 100,
"NotifyAdminForQuantityBelow": 0,
"PictureId": 0,
"PictureThumbnailUrl": null,
"ProductAttributes": [
{
"ProductAttributeId": 8,
"Name": "Size",
"TextPrompt": null,
"IsRequired": true,
"AttributeControlType": 1,
"Values": [
{
"Name": "8",
"IsPreSelected": false,
"Checked": null,
"Id": 21,
"Form": null,
"CustomProperties": {}
},
{
"Name": "9",
"IsPreSelected": false,
"Checked": null,
"Id": 22,
"Form": null,
"CustomProperties": {}
},
{
"Name": "10",
"IsPreSelected": false,
"Checked": null,
"Id": 23,
"Form": null,
"CustomProperties": {}
},
{
"Name": "11",
"IsPreSelected": false,
"Checked": null,
"Id": 24,
"Form": null,
"CustomProperties": {}
}
],
"Id": 9,
"Form": null,
"CustomProperties": {}
},
{
"ProductAttributeId": 1,
"Name": "Color",
"TextPrompt": null,
"IsRequired": true,
"AttributeControlType": 40,
"Values": [
{
"Name": "Red",
"IsPreSelected": true,
"Checked": null,
"Id": 25,
"Form": null,
"CustomProperties": {}
},
{
"Name": "Blue",
"IsPreSelected": false,
"Checked": null,
"Id": 26,
"Form": null,
"CustomProperties": {}
},
{
"Name": "Silver",
"IsPreSelected": false,
"Checked": null,
"Id": 27,
"Form": null,
"CustomProperties": {}
}
],
"Id": 10,
"Form": null,
"CustomProperties": {}
}
],
"ProductPictureModels": [
{
"ProductId": 25,
"PictureId": 53,
"PictureUrl": "http://localhost:98/images/thumbs/0000053_adidas-consortium-campus-80s-running-shoes.jpg",
"DisplayOrder": 1,
"OverrideAltAttribute": null,
"OverrideTitleAttribute": null,
"Id": 32,
"Form": null,
"CustomProperties": {}
},
{
"ProductId": 25,
"PictureId": 54,
"PictureUrl": "http://localhost:98/images/thumbs/0000054_adidas-consortium-campus-80s-running-shoes.jpg",
"DisplayOrder": 2,
"OverrideAltAttribute": null,
"OverrideTitleAttribute": null,
"Id": 33,
"Form": null,
"CustomProperties": {}
},
{
"ProductId": 25,
"PictureId": 55,
"PictureUrl": "http://localhost:98/images/thumbs/0000055_adidas-consortium-campus-80s-running-shoes.jpg",
"DisplayOrder": 3,
"OverrideAltAttribute": null,
"OverrideTitleAttribute": null,
"Id": 34,
"Form": null,
"CustomProperties": {}
}
],
"Warnings": [],
"Id": 14,
"Form": null,
"CustomProperties": {}
}