Create Product
Request Parameters:
This method allows user to create new product:
URL for nopCommerce 4.10 :
Api/Admin/CreateProduct
Headers :
Content-Type : application/json
Parameter:
{
"ApiSecretKey" :"k104r106p102g98k116q107x114x118" ,
"RestAPIAdminAccessKey" :"4fbdf629-be68-4371-a81d-4b191c98a52e",
"VendorId": "1",
"ProductModel": {
"Name":"ZARA T-Shirt",
"ShowOnHomePage": "true",
"SeName": "ZARA",
"SelectedCustomerRoleIds": [1,2],
"SelectedStoreIds": [1, 2],
"SelectedDiscountIds": [1,2]
},
"Product": {
"ProductTypeId": "5",
"ParentGroupedProductId": "0",
"VisibleIndividually": "true",
"Name": "ZARA T-shirt",
"ShortDescription": "PRINTED OR PLAIN T-SHIRTS FOR GIRLS",
"FullDescription": "This season's T-shirts for girls are comprised of fun prints, slogans and colors. Short or long sleeved pieces to refreshyour closet. Combine the latest tops for girls with fashionable garments of the season. Pick out the perfect T-shirt that fits her style and mood.",
"AdminComment": "AdminComment",
"ProductTemplateId": "1",
"VendorId": "1",
"ShowOnHomePage": "true",
"MetaKeywords": "MetaKeywords",
"MetaDescription": "MetaDescription",
"MetaTitle": "MetaTitle",
"AllowCustomerReviews": "true",
"SubjectToAcl": "true",
"LimitedToStores": "true",
"Sku": "sku",
"ManufacturerPartNumber": "ManufacturerPartNumber",
"Gtin": "gtin",
"IsGiftCard": "true",
"GiftCardTypeId": "1",
"RequireOtherProducts": "false",
"RequiredProductIds": "1, 2",
"AutomaticallyAddRequiredProducts": "false",
"IsDownload": "false",
"DownloadId": "1",
"UnlimitedDownloads": "false",
"MaxNumberOfDownloads": "0",
"DownloadExpirationDays": "0",
"DownloadActivationTypeId": "1",
"HasSampleDownload": "false",
"SampleDownloadId": "1",
"HasUserAgreement": "true",
"UserAgreementText": "User Agreement Text",
"IsRecurring": "true",
"RecurringCycleLength": "0",
"RecurringCyclePeriodId": "0",
"RecurringTotalCycles": "0",
"IsRental": "false",
"RentalPriceLength": "0",
"RentalPricePeriodId": "0",
"IsShipEnabled": "true",
"IsFreeShipping": "false",
"ShipSeparately": "false",
"AdditionalShippingCharge": "10.00",
"DeliveryDateId": "0",
"IsTaxExempt": "false",
"TaxCategoryId": "0",
"IsTelecommunicationsOrBroadcastingOrElectronicServices": "true",
"ManageInventoryMethodId": "0",
"UseMultipleWarehouses": "false",
"WarehouseId": "0",
"StockQuantity": "100",
"DisplayStockAvailability": "true",
"DisplayStockQuantity": "true",
"MinStockQuantity": "10",
"LowStockActivityId": "0",
"NotifyAdminForQuantityBelow": "50",
"BackorderModeId": "0",
"AllowBackInStockSubscriptions": "false",
"OrderMinimumQuantity": "1",
"OrderMaximumQuantity": "10",
"AllowedQuantities": "0",
"AllowAddingOnlyExistingAttributeCombinations": "false",
"DisableBuyButton": "false",
"DisableWishlistButton": "true",
"AvailableForPreOrder": "false",
"CallForPrice": "false",
"Price": "200.0000",
"OldPrice": "250.0000",
"ProductCost": "180.0000",
"SpecialPrice": "200.0000",
"CustomerEntersPrice": "false",
"MinimumCustomerEnteredPrice": "1",
"MaximumCustomerEnteredPrice": "10",
"BasepriceEnabled": "true",
"BasepriceAmount": "150.0000",
"BasepriceUnitId": "4",
"BasepriceBaseAmount": "120.0000",
"BasepriceBaseUnitId": "1",
"HasTierPrices": "false",
"HasDiscountsApplied": "false",
"DisplayOrder": "1",
"Published": "true",
"MarkAsNew":"true"
}
}
Response :
{
"Id": 47,
"PictureThumbnailUrl": null,
"ProductTypeId": 5,
"ProductTypeName": null,
"AssociatedToProductId": 0,
"AssociatedToProductName": null,
"VisibleIndividually": true,
"ProductTemplateId": 1,
"AvailableProductTemplates": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Simple product",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Grouped product (with variants)",
"Value": "2"
}
],
"ProductsTypesSupportedByProductTemplates": {
"5": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Simple product",
"Value": "1"
}
],
"10": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Grouped product (with variants)",
"Value": "2"
}
]
},
"Name": "ZARA T-shirt",
"ShortDescription": "PRINTED OR PLAIN T-SHIRTS FOR GIRLS",
"FullDescription": "This season's T-shirts for girls are comprised of fun prints, slogans and colors. Short or long sleeved pieces to refreshyour closet. Combine the latest tops for girls with fashionable garments of the season. Pick out the perfect T-shirt that fits her style and mood.",
"AdminComment": "AdminComment",
"ShowOnHomePage": true,
"MetaKeywords": "MetaKeywords",
"MetaDescription": "MetaDescription",
"MetaTitle": "MetaTitle",
"SeName": "zara",
"AllowCustomerReviews": true,
"ProductTags": "",
"Sku": "sku",
"ManufacturerPartNumber": "ManufacturerPartNumber",
"Gtin": "gtin",
"IsGiftCard": true,
"GiftCardTypeId": 1,
"OverriddenGiftCardAmount": null,
"RequireOtherProducts": false,
"RequiredProductIds": "1, 2",
"AutomaticallyAddRequiredProducts": false,
"IsDownload": false,
"DownloadId": 1,
"UnlimitedDownloads": false,
"MaxNumberOfDownloads": 0,
"DownloadExpirationDays": 0,
"DownloadActivationTypeId": 1,
"HasSampleDownload": false,
"SampleDownloadId": 1,
"HasUserAgreement": true,
"UserAgreementText": "User Agreement Text",
"IsRecurring": true,
"RecurringCycleLength": 0,
"RecurringCyclePeriodId": 0,
"RecurringTotalCycles": 0,
"IsRental": false,
"RentalPriceLength": 0,
"RentalPricePeriodId": 0,
"IsShipEnabled": true,
"IsFreeShipping": false,
"ShipSeparately": false,
"AdditionalShippingCharge": 10,
"DeliveryDateId": 0,
"AvailableDeliveryDates": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "None",
"Value": "0"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "1-2 days",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "3-5 days",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "1 week",
"Value": "3"
}
],
"IsTaxExempt": false,
"TaxCategoryId": 0,
"AvailableTaxCategories": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "[None]",
"Value": "0"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Books",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Electronics & Software",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Downloadable Products",
"Value": "3"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Jewelry",
"Value": "4"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Apparel",
"Value": "5"
}
],
"IsTelecommunicationsOrBroadcastingOrElectronicServices": true,
"ManageInventoryMethodId": 0,
"ProductAvailabilityRangeId": 0,
"AvailableProductAvailabilityRanges": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "None",
"Value": "0"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "2-4 days",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "7-10 days",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "2 week",
"Value": "3"
}
],
"UseMultipleWarehouses": false,
"WarehouseId": 0,
"AvailableWarehouses": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "None",
"Value": "0"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Warehouse 1 (New York)",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Warehouse 2 (Los Angeles)",
"Value": "2"
}
],
"StockQuantity": 100,
"LastStockQuantity": 100,
"StockQuantityStr": null,
"DisplayStockAvailability": true,
"DisplayStockQuantity": true,
"MinStockQuantity": 10,
"LowStockActivityId": 0,
"NotifyAdminForQuantityBelow": 50,
"BackorderModeId": 0,
"AllowBackInStockSubscriptions": false,
"OrderMinimumQuantity": 1,
"OrderMaximumQuantity": 10,
"AllowedQuantities": "0",
"AllowAddingOnlyExistingAttributeCombinations": false,
"NotReturnable": false,
"DisableBuyButton": false,
"DisableWishlistButton": true,
"AvailableForPreOrder": false,
"PreOrderAvailabilityStartDateTimeUtc": null,
"CallForPrice": false,
"Price": 200,
"OldPrice": 250,
"ProductCost": 180,
"CustomerEntersPrice": false,
"MinimumCustomerEnteredPrice": 1,
"MaximumCustomerEnteredPrice": 10,
"BasepriceEnabled": true,
"BasepriceAmount": 150,
"BasepriceUnitId": 4,
"AvailableBasepriceUnits": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "ounce(s)",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "lb(s)",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "kg(s)",
"Value": "3"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "gram(s)",
"Value": "4"
}
],
"BasepriceBaseAmount": 120,
"BasepriceBaseUnitId": 1,
"AvailableBasepriceBaseUnits": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "ounce(s)",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "lb(s)",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "kg(s)",
"Value": "3"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "gram(s)",
"Value": "4"
}
],
"MarkAsNew": true,
"MarkAsNewStartDateTimeUtc": null,
"MarkAsNewEndDateTimeUtc": null,
"Weight": 0,
"Length": 0,
"Width": 0,
"Height": 0,
"AvailableStartDateTimeUtc": null,
"AvailableEndDateTimeUtc": null,
"DisplayOrder": 1,
"Published": true,
"CreatedOn": "2018-08-30T11:54:48.9001185",
"UpdatedOn": "2018-08-30T11:54:48.9001185",
"PrimaryStoreCurrencyCode": "USD",
"BaseDimensionIn": "inch(es)",
"BaseWeightIn": "lb(s)",
"Locales": [],
"SelectedCustomerRoleIds": [],
"AvailableCustomerRoles": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Administrators",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Forum Moderators",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Guests",
"Value": "4"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Registered",
"Value": "3"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Vendors",
"Value": "5"
}
],
"SelectedStoreIds": [],
"AvailableStores": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "store1",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "store2",
"Value": "2"
}
],
"SelectedCategoryIds": [],
"AvailableCategories": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Computers",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Desktops",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Notebooks",
"Value": "3"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Software",
"Value": "4"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Electronics",
"Value": "5"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Camera & photo",
"Value": "6"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Cell phones",
"Value": "7"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Others",
"Value": "8"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Apparel",
"Value": "9"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Shoes",
"Value": "10"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Clothing",
"Value": "11"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Accessories",
"Value": "12"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Digital downloads",
"Value": "13"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Books",
"Value": "14"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Jewelry",
"Value": "15"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Gift Cards",
"Value": "16"
}
],
"SelectedManufacturerIds": [],
"AvailableManufacturers": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Apple",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "HP",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Nike",
"Value": "3"
}
],
"VendorId": 1,
"AvailableVendors": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "No vendor",
"Value": "0"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Vendor 1",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Vendor 2",
"Value": "2"
}
],
"SelectedDiscountIds": [],
"AvailableDiscounts": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Sample discount with coupon code",
"Value": "1"
}
],
"IsLoggedInAsVendor": false,
"AddPictureModel": {
"ProductId": 0,
"PictureId": 0,
"PictureUrl": null,
"DisplayOrder": 0,
"OverrideAltAttribute": null,
"OverrideTitleAttribute": null,
"Id": 0,
"Form": null,
"CustomProperties": {}
},
"ProductPictureModels": [],
"ProductAttributesExist": true,
"AddSpecificationAttributeModel": {
"SpecificationAttributeId": 0,
"AttributeTypeId": 0,
"SpecificationAttributeOptionId": 0,
"CustomValue": null,
"AllowFiltering": false,
"ShowOnProductPage": true,
"DisplayOrder": 0,
"AvailableAttributes": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Screensize",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Color",
"Value": "5"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "CPU Type",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Memory",
"Value": "3"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Hard drive",
"Value": "4"
}
],
"AvailableOptions": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "13.0''",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "13.3''",
"Value": "2"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "14.0''",
"Value": "3"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "15.0''",
"Value": "4"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "15.6''",
"Value": "5"
}
],
"Form": null,
"CustomProperties": {}
},
"ProductWarehouseInventoryModels": [
{
"WarehouseId": 1,
"WarehouseName": "Warehouse 1 (New York)",
"WarehouseUsed": false,
"StockQuantity": 0,
"ReservedQuantity": 0,
"PlannedQuantity": 0,
"Form": null,
"CustomProperties": {}
},
{
"WarehouseId": 2,
"WarehouseName": "Warehouse 2 (Los Angeles)",
"WarehouseUsed": false,
"StockQuantity": 0,
"ReservedQuantity": 0,
"PlannedQuantity": 0,
"Form": null,
"CustomProperties": {}
}
],
"CopyProductModel": {
"Name": "ZARA T-shirt - copy",
"CopyImages": true,
"Published": true,
"Id": 47,
"Form": null,
"CustomProperties": {}
},
"ProductEditorSettingsModel": {
"ActiveStoreScopeConfiguration": 0,
"Id": false,
"ProductType": false,
"VisibleIndividually": false,
"ProductTemplate": false,
"AdminComment": false,
"Vendor": false,
"Stores": false,
"ACL": false,
"ShowOnHomePage": false,
"DisplayOrder": false,
"AllowCustomerReviews": false,
"ProductTags": false,
"ManufacturerPartNumber": false,
"GTIN": false,
"ProductCost": false,
"TierPrices": false,
"Discounts": false,
"DisableBuyButton": false,
"DisableWishlistButton": false,
"AvailableForPreOrder": false,
"CallForPrice": false,
"OldPrice": false,
"CustomerEntersPrice": false,
"PAngV": false,
"RequireOtherProductsAddedToTheCart": false,
"IsGiftCard": false,
"DownloadableProduct": false,
"RecurringProduct": false,
"IsRental": false,
"FreeShipping": false,
"ShipSeparately": false,
"AdditionalShippingCharge": false,
"DeliveryDate": false,
"TelecommunicationsBroadcastingElectronicServices": false,
"ProductAvailabilityRange": false,
"UseMultipleWarehouses": false,
"Warehouse": false,
"DisplayStockAvailability": false,
"DisplayStockQuantity": false,
"MinimumStockQuantity": false,
"LowStockActivity": false,
"NotifyAdminForQuantityBelow": false,
"Backorders": false,
"AllowBackInStockSubscriptions": false,
"MinimumCartQuantity": false,
"MaximumCartQuantity": false,
"AllowedQuantities": false,
"AllowAddingOnlyExistingAttributeCombinations": false,
"NotReturnable": false,
"Weight": true,
"Dimensions": true,
"AvailableStartDate": false,
"AvailableEndDate": false,
"MarkAsNew": false,
"MarkAsNewStartDate": false,
"MarkAsNewEndDate": false,
"Published": false,
"CreatedOn": false,
"UpdatedOn": false,
"RelatedProducts": false,
"CrossSellsProducts": false,
"Seo": false,
"PurchasedWithOrders": false,
"OneColumnProductPage": false,
"ProductAttributes": true,
"SpecificationAttributes": true,
"Manufacturers": false,
"StockQuantityHistory": false,
"Form": null,
"CustomProperties": {}
},
"StockQuantityHistory": {
"WarehouseName": null,
"AttributeCombination": null,
"QuantityAdjustment": 0,
"StockQuantity": 0,
"Message": null,
"CreatedOn": "0001-01-01T00:00:00",
"Id": 0,
"Form": null,
"CustomProperties": {}
},
"RelatedProductSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"CrossSellProductSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"AssociatedProductSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"ProductPictureSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"ProductSpecificationAttributeSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"ProductOrderSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"TierPriceSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"StockQuantityHistorySearchModel": {
"ProductId": 47,
"WarehouseId": 0,
"AvailableWarehouses": [
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "All",
"Value": "0"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Warehouse 1 (New York)",
"Value": "1"
},
{
"Disabled": false,
"Group": null,
"Selected": false,
"Text": "Warehouse 2 (Los Angeles)",
"Value": "2"
}
],
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"ProductAttributeMappingSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"ProductAttributeCombinationSearchModel": {
"ProductId": 47,
"Page": 1,
"PageSize": 15,
"AvailablePageSizes": "10, 15, 20, 50, 100",
"Form": null,
"CustomProperties": {}
},
"Form": null,
"CustomProperties": {}
}