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
  • application/json
Header Parameters
X-CCAsset-Language
Type: string
Required: true
The asset language of the request
Body Parameter
Root Schema : createProduct_request
Nested Schema : properties
Type: object
Properties of the product to be created.
Nested Schema : listVolumePrices
Type: object
Object with price group IDs as keys and list prices as values
Nested Schema : saleVolumePrices
Type: object
Object with price group IDs as keys and sale prices as values
Nested Schema : priceGroupId1
Type: object
List price of the product in price group 1
Nested Schema : priceGroupId2
Type: object
List price of the product in price group 1
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : priceGroupId1
Type: object
Sale price of the product in price group 1
Nested Schema : priceGroupId2
Type: object
Sale price of the product in price group 1
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createProduct_response
Nested Schema : childSKUs
Type: array
Array having the properties of child SKU of the product.
Nested Schema : fullImageURLs
Type: array
Full Image URLs.
Nested Schema : largeImage
Type: object
Has repository Id and URL of the product.
Nested Schema : largeImageURLs
Type: array
Large Image URLs of SKU.
Nested Schema : listVolumePrice
Type: object
list volume price of the product
Nested Schema : listVolumePrices
Type: object
Object with price group IDs as keys and list prices as values
Nested Schema : mediumImageURLs
Type: array
Medium Image URLs.
Nested Schema : productImages
Type: array
Array of product images.
Nested Schema : saleVolumePrice
Type: object
Sale volume price of the product
Nested Schema : saleVolumePrices
Type: object
Object with price group IDs as keys and sale prices as values
Nested Schema : smallImageURLs
Type: array
Small image URLs of the product.
Nested Schema : sourceImageURLs
Type: array
Source Image URLs.
Nested Schema : thumbImageURLs
Type: array
Thumb Image URLs.
Nested Schema : items
Type: object
Nested Schema : fullImageURLs
Type: array
Full Image URLs of SKU.
Nested Schema : largeImageURLs
Type: array
Large Image URLs of SKU.
Nested Schema : listVolumePrice
Type: object
list volume price of the product
Nested Schema : mediumImageURLs
Type: array
Medium Image URLs SKU.
Nested Schema : saleVolumePrice
Type: object
Sale volume price of the product
Nested Schema : smallImageURLs
Type: array
Small Image URLs of SKU.
Nested Schema : sourceImageURLs
Type: array
Source Image URLs of SKU.
Nested Schema : thumbImageURLs
Type: array
Thumb Image URLs of SKU.
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : priceGroupId1
Type: object
List price of the product in price group 1
Nested Schema : priceGroupId2
Type: object
List price of the product in price group 1
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : priceGroupId1
Type: object
Sale price of the product in price group 1
Nested Schema : priceGroupId2
Type: object
Sale price of the product in price group 1
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Nested Schema : pricingScheme
Type: object
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : levels
Type: array
Price levels array for volume price
Nested Schema : items
Type: object
Example 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,
    "smallImageURLs":[
    ],
    "shippingSurcharges":{
        "UsDollar":100,
        "CaDollar":12
    },
    "id":"xProd10213",
    "saleVolumePrices":{
    },
    "childSKUs":[
        {
            "dynamicPropertyMapLong":{
            },
            "primaryThumbImageURL":null,
            "largeImage":null,
            "smallImage":null,
            "nonreturnable":false,
            "primaryFullImageURL":null,
            "productListingSku":null,
            "largeImageURLs":[
            ],
            "primaryLargeImageURL":null,
            "smallImageURLs":[
            ],
            "thumbnailImage":null,
            "salePriceEndDate":null,
            "salePriceStartDate":null,
            "images":[
            ],
            "quantity":null,
            "salePrice":null,
            "primaryMediumImageURL":null,
            "fullImageURLs":[
            ],
            "active":true,
            "thumbImageURLs":[
            ],
            "mediumImageURLs":[
            ],
            "repositoryId":"sku60303",
            "shippingSurcharge":null,
            "primarySourceImageURL":null,
            "primarySmallImageURL":null,
            "sourceImageURLs":[
            ],
            "listPrice":null
        }
    ],
    "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|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Request:

{
  "catalogId": "cloudCatalog",
  "categoryId": "rootCategory",
  "productType": "",
  "properties": {
    "longDescription": "This is a sample description.",
    "salePrice": 80,
    "nonreturnable": false,
    "displayName": "Sample",
    "length": "20",
    "orderLimit": "100",
    "description": "A Cloud Lake Product.",
    "active": true,
    "weight": "20",
    "listPrices": {"CaDollar": 120},
    "salePrices": {"CaDollar": 100},
    "productNumber": "p1815",
    "taxCode": null,
    "arrivalDate": "2014-03-16T18:30:00.000Z",
    "listVolumePrices": {"UsDollar": {"bulkPrice": {
      "numLevels": 3,
      "levels": [
        {
          "price": 19,
          "levelMinimum": 1,
          "levelMaximum": 5
        },
        {
          "price": 12.35,
          "levelMinimum": 21,
          "levelMaximum": 30
        },
        {
          "price": 10.25,
          "levelMinimum": 31
        }
      ]
    }}},
    "shippingSurcharges": {
      "UsDollar": 100,
      "CaDollar": 12
    },
    "width": "20",
    "shippingSurcharge": null,
    "id": "xProd10213",
    "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
        }
      ]
    }}},
    "listPrice": 100,
    "height": "20"
  }
}

Sample Response Payload returned by endpoint:

{
  "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,
  "smallImageURLs": [],
  "shippingSurcharges": {
    "UsDollar": 100,
    "CaDollar": 12
  },
  "id": "xProd10213",
  "saleVolumePrices": {},
  "childSKUs": [{
    "dynamicPropertyMapLong": {},
    "primaryThumbImageURL": null,
    "largeImage": null,
    "smallImage": null,
    "nonreturnable": false,
    "primaryFullImageURL": null,
    "productListingSku": null,
    "largeImageURLs": [],
    "primaryLargeImageURL": null,
    "smallImageURLs": [],
    "thumbnailImage": null,
    "salePriceEndDate": null,
    "salePriceStartDate": null,
    "images": [],
    "quantity": null,
    "salePrice": null,
    "primaryMediumImageURL": null,
    "fullImageURLs": [],
    "active": true,
    "thumbImageURLs": [],
    "mediumImageURLs": [],
    "repositoryId": "sku60303",
    "shippingSurcharge": null,
    "primarySourceImageURL": null,
    "primarySmallImageURL": null,
    "sourceImageURLs": [],
    "listPrice": null
  }],
  "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
}