createCollection

post

/ccadmin/v1/collections

Create Collection. Create a collection based on request paramenters. **Requires the x-ccasset-language header so translated content can be set for a specific language.**

Request

Supported Media Types
Query Parameters
  • If set to false then category path related properties, namely, categoryPaths, categoryIdPaths, multiCatalogCategoryPaths and multiCatalogCategoryIdPaths, are not returned. If set to true then categoryPaths and categoryIdPaths are returned. For multiCatalogCategoryPaths and multiCatalogCategoryIdPaths use multipleCategoryPaths parameter. Default value of the parameter is true.
Header Parameters
Body ()
Root Schema : createCollection_request
Type: object
Show Source
  • ID of the catalog. If this field is not provided the request will default to using the product catalog.
  • Set to true to ensure this product is created unassigned with no parents. This field cannot be used if catalogId, parentCategoryId or parentCategoryIds fields are used.
  • ID of the parent category for the new collection. If parentCategoryIds, orphaned and this field are not provided then the request will put the collection under the root navigation category of the catalog.
  • parentCategoryIds
    ID of multiple parent categories for the new collection. If parentCategoryId, orphaned and this field are not provided then the request will put the collection under the root navigation category of the catalog.
  • properties
    List of properties of the collection.
Example:
{
    "catalogId":"cloudLakeCatalog",
    "properties":{
        "displayName":"Electronics"
    }
}
Nested Schema : parentCategoryIds
Type: array
ID of multiple parent categories for the new collection. If parentCategoryId, orphaned and this field are not provided then the request will put the collection under the root navigation category of the catalog.
Show Source
Nested Schema : properties
Type: object
List of properties of the collection.
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : createCollection_response
Type: object
Show Source
Nested Schema : categoryImages
Type: array
Array of category images.
Show Source
Nested Schema : categoryPaths
Type: array
An array of category paths.
Show Source
Nested Schema : childProducts
Type: array
Array of child products.
Show Source
Nested Schema : fixedParentCategories
Type: array
Array of category objects.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : categoryImages
Type: array
Array of category images.
Show Source
Nested Schema : categoryPaths
Type: array
An array of category paths.
Show Source
Nested Schema : childCategories
Type: array
Array of category objects.
Show Source
Nested Schema : childProducts
Type: array
Array of child products.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : categoryImages
Type: array
Array of category images.
Show Source
Nested Schema : categoryPaths
Type: array
An array of category paths.
Show Source
Nested Schema : childCategories
Type: array
Array of category objects.
Show Source
Nested Schema : childProducts
Type: array
Array of child products.
Show Source
Nested Schema : fixedParentCategories
Type: array
Array of category objects.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "longDescription":null,
    "childProducts":null,
    "route":"/electronics/category/cat90020",
    "childProductsCount":0,
    "categoryPaths":[
        "/Commerce Root/Electronics"
    ],
    "displayName":"Electronics",
    "repositoryId":"cat90020",
    "active":true,
    "childCategories":null,
    "id":"cat90020",
    "fixedParentCategories":[
        {
            "longDescription":"ATG Store commerce root",
            "childProducts":null,
            "route":"/commerce-root/category/rootCategory",
            "childProductsCount":0,
            "categoryPaths":[
                "/Commerce Root"
            ],
            "displayName":"Commerce Root",
            "repositoryId":"rootCategory",
            "active":true,
            "childCategories":[
                {
                    "longDescription":null,
                    "childProducts":null,
                    "route":"/electronics/category/cat90020",
                    "childProductsCount":0,
                    "categoryPaths":[
                        "/Commerce Root/Electronics"
                    ],
                    "displayName":"Electronics",
                    "repositoryId":"cat90020",
                    "active":true,
                    "childCategories":null,
                    "id":"cat90020",
                    "fixedParentCategories":[
                        {
                            "repositoryId":"rootCategory"
                        }
                    ]
                }
            ],
            "id":"rootCategory",
            "fixedParentCategories":[
            ]
        }
    ]
}

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| |------------------|------------------| |20066|Collection ID of a collection must be unique. {0} is already in use.| |20065|Invalid collection ID {0}. Collection ID may only contain alphanumeric characters.| |20064|Collection name passed is already in Use| |20060|Create Category Type Internal Error| |84001|The following input fields conflict with each other.| |200225|Operation on collection is not allowed for the custom catalog| |200240|parentCategoryScope is not revertToBase but parentCategory is not in the request| |200241|parentCategory is not a parent of the collection| |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