createCatalog

post

/ccadmin/v1/catalogs

Create Catalog. Create a catalog based on request parameters. **Requires the x-ccasset-language header so translated content can be set for a specific language.** Commerce Cloud lets you create three types of catalogs: * Independent catalogs are catalogs that are not dependent on any other catalog in your environment. Collections and products you add to an independent catalog can be exclusive to that catalog, or can be linked to a number of different catalogs. The Product Catalog that Commerce Cloud includes by default is structured as an independent catalog. * Filtered View catalogs are catalogs that reference an independent catalog as a base for their collection hierarchy but can have their own product membership which will be a subset of the base catalog's set of products. * Legacy catalogs are secondary catalogs that provide custom views into the Product Catalog. Unlike independent catalogs, which can contain different collections and products, legacy catalogs reference only products and collections that are already in the Product Catalog. Prior to 18D release, all additional catalogs created in Commerce Cloud were legacy catalogs. If you upgraded to this release from Commerce Cloud 18C-MP or earlier, any additional catalogs you already created in previous releases remain in your instance as legacy catalogs. Before you can create legacy catalogs, you must enable support for creating them. To do this, you use the **saveAdminConfiguration** in the Admin REST API to set the value of the supportVersion1Catalogs property. If your Commerce Cloud environment has any legacy catalogs, the value of supportVersion1Catalogs property defaults to true. If your Commerce Cloud environment does not have any legacy catalogs, the value of this property defaults to false, but you are free to change the value to true. * If supportVersion1Catalogs is false, the createCatalog endpoint can create only independent catalogs. If you attempt to set catalogVersion to 1 to create a legacy catalog, the call returns an error. * If supportVersion1Catalogs is true, the createCatalog endpoint creates a legacy catalog by default. You can override the default behavior and create an independent catalog by setting the catalogVersion property to 2. Refer to Manage Your Catalog section in the Using Oracle Commerce Cloud documentation for additional details about creating Independent and Legacy catalogs.

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : createCatalog_request
Type: object
Show Source
Example:
{
    "catalogVersion":"2",
    "defaultCategoryForProducts":"defaultAppleCategory",
    "categoryIds":[
        "defaultAppleCategory"
    ],
    "catalogId":"appleCatalog",
    "displayName":"Apple Catalog"
}
Nested Schema : baseCatalog
Type: object
(Only used for filtered view catalogs) This references the independent catalog that will be the base catalog for the filtered view.
Show Source
Nested Schema : categoryIds
Type: array
(Not used for filtered view catalogs) List of category ids to be associated with this catalog. Categories are set as children of the root navigation category.
Show Source
Nested Schema : rootCategories
Type: array
Array of root categories of the base catalog
Show Source
Nested Schema : rootNavigationCategory
Type: object
Navigation category for the base catalog.
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 : createCatalog_response
Type: object
Show Source
Nested Schema : baseCatalog
Type: object
(Only present for filtered view catalogs) This references the independent catalog that is the base catalog for the filtered view.
Show Source
Nested Schema : rootCategories
Type: array
Array of categories associated with the catalog.
Show Source
Nested Schema : rootNavigationCategory
Type: object
Navigation category for the catalog.
Show Source
Nested Schema : rootCategories
Type: array
Array of root categories of the base catalog
Show Source
Nested Schema : rootNavigationCategory
Type: object
Navigation category for the base catalog.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "catalogVersion":2,
    "defaultCategoryForProducts":"appleDefaultCategory",
    "rootNavigationCategory":"cat10098",
    "displayName":"Apple Catalog",
    "repositoryId":"appleCatalog",
    "rootCategories":[
        {
            "repositoryId":"cat10098"
        },
        {
            "repositoryId":"cat10099"
        }
    ],
    "id":"appleCatalog"
}

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| |------------------|------------------| |200100|Catalog name missing.| |200102|Catalog repository error.| |200101|Catalog name is blank.| |200104|Invalid catalog ID.| |200229|Invalid catalog version| |200231|It is not allowed to set the default category for products to be a root category| |200245|Creation of a filtered view catalog requires a base catalog.| |200246|Specified base catalog {0} is not a version 2 catalog.| |200247|Category input fields are invalid for filtered view catalogs.|
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