createProduct

post

/ccadmin/v1/products

Create Product. Creates a new product. **Requires the x-ccasset-language header so translated content can be set for a specific language.**

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : createProduct_request
Type: object
Show Source
  • Catalog ID of the product to be created. If this field is not provided then the request will default to using the product catalog.
  • Category ID of the selected product. If this field is not provided or if it references a catalog root category then the request will instead place the product under the given catalog's default category for products, or create the product unassigned if the default category for products is not set for the catalog.
  • Indicates whether the promotions should be applied to this SKU or not. If the value is true then promotion discounts can be applied to this SKU; else no promotions can be applied to this SKU. Default value is true
  • Boolean flag to determine whether to include price maps for the products in the response.
  • Set to true to ensure the product is created unassigned with no parents. This field is only valid if both catalogId and categoryId are not provided in the request.
  • Price list group id for adding the prices to the product in the response.
  • Product type of the selected product. If product type is omitted, then base product type is used.
  • properties
    Properties of the product to be created.
Example:
{
    "catalogId":"cloudCatalog",
    "categoryId":"menswear",
    "productType":"MensApparel",
    "properties":{
        "longDescription":"This is a sample description.",
        "nonreturnable":false,
        "displayName":"Sample",
        "orderLimit":"100",
        "description":"A Cloud Lake Product.",
        "listPrices":{
            "CaDollar":120
        },
        "salePrices":{
            "CaDollar":100
        },
        "listVolumePrices":{
            "UsDollar":{
                "bulkPrice":{
                    "numLevels":3,
                    "levels":[
                        {
                            "price":19,
                            "levelMinimum":1,
                            "levelMaximum":5
                        },
                        {
                            "price":12.35,
                            "levelMinimum":21,
                            "levelMaximum":30
                        },
                        {
                            "price":10.25,
                            "levelMinimum":31
                        }
                    ]
                }
            }
        },
        "shippable":true,
        "addOnProducts":[
            {
                "addOnOptions":[
                    {
                        "product":"prod10005",
                        "sku":"sku30051"
                    },
                    {
                        "product":"prod10005",
                        "sku":"sku30053"
                    }
                ]
            }
        ],
        "shippingSurcharges":{
            "UsDollar":100,
            "CaDollar":12
        },
        "id":"xProd10213",
        "discountable":true,
        "brand":"SampleBrand",
        "notForIndividyalSale:":true,
        "saleVolumePrices":{
            "UsDollar":{
                "bulkPrice":{
                    "numLevels":3,
                    "levels":[
                        {
                            "price":19,
                            "levelMinimum":1,
                            "levelMaximum":5
                        },
                        {
                            "price":12.35,
                            "levelMinimum":21,
                            "levelMaximum":30
                        },
                        {
                            "price":10.25,
                            "levelMinimum":31
                        }
                    ]
                }
            }
        },
        "height":"20",
        "salePrice":80,
        "length":"20",
        "active":true,
        "weight":"20",
        "productNumber":"p1815",
        "taxCode":null,
        "arrivalDate":"2014-03-16T18:30:00.000Z",
        "width":"20",
        "shippingSurcharge":null,
        "listPrice":100
    }
}
Nested Schema : properties
Type: object
Properties of the product to be created.
Show Source
Nested Schema : addOnProducts
Type: array
The array of add-on product groups
Show Source
Nested Schema : listVolumePrices
Type: object
Object with price group IDs as keys and list prices as values
Show Source
Nested Schema : saleVolumePrices
Type: object
Object with price group IDs as keys and sale prices as values
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : addOnOptions
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : priceGroupId1
Type: object
List price of the product in price group 1
Show Source
Nested Schema : priceGroupId2
Type: object
List price of the product in price group 1
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : priceGroupId1
Type: object
Sale price of the product in price group 1
Show Source
Nested Schema : priceGroupId2
Type: object
Sale price of the product in price group 1
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : createProduct_response
Type: object
Show Source
Nested Schema : addOnProducts
Type: array
The array of add-on product groups.
Show Source
Nested Schema : childSKUs
Type: array
Array having the properties of child SKU of the product.
Show Source
Nested Schema : fullImageURLs
Type: array
Full Image URLs.
Show Source
Nested Schema : largeImage
Type: object
Has repository Id and URL of the product.
Show Source
Nested Schema : largeImageURLs
Type: array
Large Image URLs of SKU.
Show Source
Nested Schema : listVolumePrice
Type: object
list volume price of the product
Show Source
Nested Schema : listVolumePrices
Type: object
Object with price group IDs as keys and list prices as values
Show Source
Nested Schema : mediumImageURLs
Type: array
Medium Image URLs.
Show Source
Nested Schema : productImages
Type: array
Array of product images.
Show Source
Nested Schema : saleVolumePrice
Type: object
Sale volume price of the product
Show Source
Nested Schema : saleVolumePrices
Type: object
Object with price group IDs as keys and sale prices as values
Show Source
Nested Schema : smallImageURLs
Type: array
Small image URLs of the product.
Show Source
Nested Schema : sourceImageURLs
Type: array
Source Image URLs.
Show Source
Nested Schema : thumbImageURLs
Type: array
Thumb Image URLs.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : addOnOptions
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : product
Type: object
The add-on product
Show Source
Nested Schema : sku
Type: object
The add-on sku
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : fullImageURLs
Type: array
Full Image URLs of SKU.
Show Source
Nested Schema : largeImageURLs
Type: array
Large Image URLs of SKU.
Show Source
Nested Schema : listVolumePrice
Type: object
list volume price of the product
Show Source
Nested Schema : mediumImageURLs
Type: array
Medium Image URLs SKU.
Show Source
Nested Schema : saleVolumePrice
Type: object
Sale volume price of the product
Show Source
Nested Schema : smallImageURLs
Type: array
Small Image URLs of SKU.
Show Source
Nested Schema : sourceImageURLs
Type: array
Source Image URLs of SKU.
Show Source
Nested Schema : thumbImageURLs
Type: array
Thumb Image URLs of SKU.
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : priceGroupId1
Type: object
List price of the product in price group 1
Show Source
Nested Schema : priceGroupId2
Type: object
List price of the product in price group 1
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : priceGroupId1
Type: object
Sale price of the product in price group 1
Show Source
Nested Schema : priceGroupId2
Type: object
Sale price of the product in price group 1
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
Nested Schema : levels
Type: array
Price levels array for volume price
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "longDescription":"This is a sample description.",
    "primaryThumbImageURL":null,
    "largeImage":null,
    "smallImage":null,
    "listVolumePrice":null,
    "displayName":"Sample",
    "orderLimit":100,
    "description":"A Cloud Lake Product.",
    "listPrices":{
        "UsDollar":100,
        "CaDollar":120
    },
    "primaryFullImageURL":null,
    "salePrices":{
        "UsDollar":80,
        "CaDollar":100
    },
    "largeImageURLs":[
    ],
    "listVolumePrices":{
    },
    "primaryLargeImageURL":null,
    "addOnProducts":[
        {
            "repositoryId":"cp10001",
            "addOnOptions":[
                {
                    "product":{
                        "displayName":"Short Sleeve Plaid Button Down",
                        "repositoryId":"prod10005",
                        "active":true
                    },
                    "repositoryId":"co10001",
                    "sku":{
                        "displayName":"Short Sleeve Plaid Button Down",
                        "repositoryId":"sku30051",
                        "active":true
                    }
                },
                {
                    "product":{
                        "displayName":"Short Sleeve Plaid Button Down",
                        "repositoryId":"prod10005",
                        "active":true
                    },
                    "repositoryId":"co10002",
                    "sku":{
                        "displayName":"Short Sleeve Plaid Button Down",
                        "repositoryId":"sku30053",
                        "active":true
                    }
                }
            ]
        }
    ],
    "smallImageURLs":[
    ],
    "shippingSurcharges":{
        "UsDollar":100,
        "CaDollar":12
    },
    "id":"xProd10213",
    "discountable":true,
    "saleVolumePrices":{
    },
    "childSKUs":[
    ],
    "saleVolumePrice":null,
    "primaryMediumImageURL":null,
    "salePrice":80,
    "fullImageURLs":[
    ],
    "thumbImageURLs":null,
    "productImages":[
    ],
    "route":"/sample/product/xProd10213",
    "mediumImageURLs":[
    ],
    "repositoryId":"xProd10213",
    "primarySourceImageURL":null,
    "shippingSurcharge":100,
    "primarySmallImageURL":null,
    "sourceImageURLs":[
    ],
    "avgCustRating":null,
    "listPrice":100
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |20001|Null Properties Type Internal Error| |25011|List price must be a positive number or 0| |25022|Prices are not present for some of the price list groups which are active and has the flag include all products set to true| |20000|create Product Type Internal Error| |20141|Collection Id passed is null or empty| |25001|Price is invalid| |25015|set Property RepositoryItem Internal Error| |25014|convert InputProperty Type Internal Error| |10003|validate Create Item Type Internal Error| |20018|Invalid product ID, Product ID may only contain alphanumeric characters| |20006|{0} of a product must be unique. {1} is already in use| |25009|Error Setting Price| |200226|CRUD operation on product is not allowed for the custom catalog| |84001|The following input fields conflict with each other| |200240|parentCategoryScope is not revertToBase but parentCategory is not in the request| |200241|parentCategory is not a parent of the collection| |200242|catalogSpecific or revertToBase parentCategoryScope but no catalog specified in the request| |200243|parentCategoryScope invalid/unknown value| |200244|catalogSpecific parentCategoryScope but parentCategory is not in the specified catalog|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top