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
- application/json
Header Parameters
- X-CCAsset-Language
-
Type:
stringRequired:trueThe asset language of the request
Body Parameter
Root Schema : createCollection_request
{
"catalogId":"cloudLakeCatalog",
"properties":{
"displayName":"Electronics",
"name":"Electronics"
}
}
- catalogId
-
Type:
stringRequired:trueID of the catalog. - parentCategoryId
-
Type:
stringID of the parent category for the new collection. - properties
-
Type:
objectpropertiesRequired:trueAdditional Properties Allowed:List of properties of the collection.
Nested Schema : properties
Type:
objectList of properties of the collection.
- active
-
Type:
booleanWhether or not the category is active. Can be set to null to inherit from parents. - description
-
Type:
stringDescription of the category. - displayName
-
Type:
stringRequired:trueDisplay name of the collection. - id
-
Type:
stringCategory ID. - longDescription
-
Type:
stringLong description of the category. - name
-
Type:
stringRequired:trueName of the collection.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createCollection_response
- active
-
Type:
booleanWhether or not the collection is active. Value is inherited from parents if not set. - categoryImages
-
Type:
arraycategoryImagesAdditional Properties Allowed:Array of category images. - categoryPaths
-
Type:
arraycategoryPathsAdditional Properties Allowed:An array of category paths. - childCategories
-
Type:
stringArray of category objects. - description
-
Type:
stringDescription of the category. - displayName
-
Type:
stringDisplay Name of the category. - fixedParentCategories
-
Type:
arrayfixedParentCategoriesAdditional Properties Allowed:Array of category objects. - id
-
Type:
stringCategory ID. - longDescription
-
Type:
stringLong description of the category. - repositoryId
-
Type:
stringRepository ID. - route
-
Type:
stringRoute of the category.
Nested Schema : categoryImages
Nested Schema : categoryPaths
Nested Schema : fixedParentCategories
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringImage repository ID.
Nested Schema : items
Type:
object- active
-
Type:
booleanWhether or not the collection is active. Value is inherited from parents if not set. - categoryImages
-
Type:
arraycategoryImagesAdditional Properties Allowed:Array of category images. - categoryPaths
-
Type:
arraycategoryPathsAdditional Properties Allowed:An array of category paths. - childCategories
-
Type:
arraychildCategoriesAdditional Properties Allowed:Array of category objects. - description
-
Type:
stringDescription of the category. - displayName
-
Type:
stringDisplay Name of the category. - id
-
Type:
stringid of parent category. - longDescription
-
Type:
stringLong description of the category. - repositoryId
-
Type:
stringRepository id of parent category. - route
-
Type:
stringRoute of the category.
Nested Schema : categoryImages
Nested Schema : categoryPaths
Nested Schema : childCategories
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringImage repository ID.
Nested Schema : items
Type:
object- categoryImages
-
Type:
arraycategoryImagesAdditional Properties Allowed:Array of category images. - categoryPaths
-
Type:
arraycategoryPathsAdditional Properties Allowed:An array of category paths. - childCategories
-
Type:
arraychildCategoriesAdditional Properties Allowed:Array of category objects. - displayName
-
Type:
stringDisplay Name of the category. - fixedParentCategories
-
Type:
arrayfixedParentCategoriesAdditional Properties Allowed:Array of category objects. - id
-
Type:
stringid of child category. - repositoryId
-
Type:
stringRepository id of child category. - route
-
Type:
stringRoute of the category.
Nested Schema : categoryImages
Nested Schema : categoryPaths
Nested Schema : childCategories
Nested Schema : fixedParentCategories
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringImage repository ID.
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringRepository id of child category.
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringRepository id of parent category.
Example application/json
{
"longDescription":null,
"route":"/electronics/category/cat90020",
"categoryPaths":[
"/Commerce Root/Electronics"
],
"displayName":"Electronics",
"repositoryId":"cat90020",
"active":true,
"childCategories":null,
"id":"cat90020",
"fixedParentCategories":[
{
"longDescription":"ATG Store commerce root",
"route":"/commerce-root/category/rootCategory",
"categoryPaths":[
"/Commerce Root"
],
"displayName":"Commerce Root",
"repositoryId":"rootCategory",
"active":true,
"childCategories":[
{
"longDescription":"Looking for an inspired quality gift? ATG Store gift shop has a wide choice of gifts for both men and women suitable for every occassion. Shopping for gifts is simple and convenient at ATG Store.com.",
"route":"/gift-shop/category/cat50056",
"categoryPaths":[
"/Commerce Root/Gift Shop"
],
"displayName":"Gift Shop",
"repositoryId":"cat50056",
"active":true,
"childCategories":[
{
"repositoryId":"cat50067"
},
{
"repositoryId":"cat60001"
}
],
"id":"cat50056",
"fixedParentCategories":[
{
"repositoryId":"rootCategory"
}
]
},
{
"longDescription":"Shop our chic collection of women's apparel, featuring women's dresses, women's shoes, skirts, jackets, and pants. Personalized style and comfort is simple and easy when you shop women's fashions from ATG Store.com.",
"route":"/women/category/cat50001",
"categoryPaths":[
"/Commerce Root/Women"
],
"displayName":"Women",
"repositoryId":"cat50001",
"active":true,
"childCategories":[
{
"repositoryId":"cat70002"
},
{
"repositoryId":"cat70004"
},
{
"repositoryId":"cat70006"
},
{
"repositoryId":"cat70008"
},
{
"repositoryId":"cat70010"
},
{
"repositoryId":"cat70012"
},
{
"repositoryId":"cat70014"
}
],
"id":"cat50001",
"fixedParentCategories":[
{
"repositoryId":"rootCategory"
}
]
},
{
"longDescription":"Shop our fashionable collection of men's apparel, featuring men's shoes, shirts, jackets, shorts, and pants. Personalized style and comfort is simple and easy when you shop men's fashions from ATG Store.com.",
"route":"/men/category/catMen",
"categoryPaths":[
"/Commerce Root/Men"
],
"displayName":"Men",
"repositoryId":"catMen",
"active":true,
"childCategories":[
{
"repositoryId":"catMenShirts"
},
{
"repositoryId":"catMenPants"
},
{
"repositoryId":"catMenShorts"
},
{
"repositoryId":"catMenJackets"
},
{
"repositoryId":"catMenAccessories"
}
],
"id":"catMen",
"fixedParentCategories":[
{
"repositoryId":"rootCategory"
}
]
},
{
"longDescription":"Browse our selection of quality men's and women's shoes. Women's pumps, slingbacks, and trainers, men's oxfords, moccasins, trainers, and more. Buy stylish shoes from ATG Store and step out in style.",
"route":"/shoes/category/cat50097",
"categoryPaths":[
"/Commerce Root/Shoes"
],
"displayName":"Shoes",
"repositoryId":"cat50097",
"active":true,
"childCategories":[
{
"repositoryId":"cat50087"
},
{
"repositoryId":"cat50077"
}
],
"id":"cat50097",
"fixedParentCategories":[
{
"repositoryId":"rootCategory"
}
]
},
{
"longDescription":"ATG Home commerce root",
"route":"/for-the-home/category/homeStoreRootCategory",
"categoryPaths":[
"/Commerce Root/For the Home"
],
"displayName":"For the Home",
"repositoryId":"homeStoreRootCategory",
"active":true,
"childCategories":[
{
"repositoryId":"homeStoreGiftShop"
},
{
"repositoryId":"homeStoreTables"
},
{
"repositoryId":"homeStoreSeating"
},
{
"repositoryId":"homeStoreStorage"
},
{
"repositoryId":"cat10016"
},
{
"repositoryId":"catBlankets"
},
{
"repositoryId":"catClocks"
}
],
"id":"homeStoreRootCategory",
"fixedParentCategories":[
{
"repositoryId":"rootCategory"
}
]
},
{
"longDescription":null,
"route":"/temp/category/cat90016",
"categoryPaths":[
"/Commerce Root/Temp"
],
"displayName":"Temp",
"repositoryId":"cat90016",
"active":true,
"childCategories":null,
"id":"cat90016",
"fixedParentCategories":[
{
"repositoryId":"rootCategory"
}
]
},
{
"longDescription":null,
"route":"/electronics/category/cat90020",
"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 already exists|
|20065|Collection Id is invalid, may only contain alphanumeric characters |
|20064|Collection name passed is already in Use|
|20060|Create Category Type Internal Error|
|20071|Collection Id is invalid or non-existent|
|20070|Collection Id passed is null or empty|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{
"catalogId": "cloudLakeCatalog",
"properties": {
"displayName": "Electronics",
"name": "Electronics"
}
}
Sample Response Payload returned by endpoint:
{
"longDescription": null,
"route": "/electronics/category/cat90020",
"categoryPaths": ["/Commerce Root/Electronics"],
"displayName": "Electronics",
"repositoryId": "cat90020",
"active": true,
"childCategories": null,
"id": "cat90020",
"fixedParentCategories": [{
"longDescription": "ATG Store commerce root",
"route": "/commerce-root/category/rootCategory",
"categoryPaths": ["/Commerce Root"],
"displayName": "Commerce Root",
"repositoryId": "rootCategory",
"active": true,
"childCategories": [
{
"longDescription": "Looking for an inspired quality gift? ATG Store gift shop has a wide choice of gifts for both men and women suitable for every occassion. Shopping for gifts is simple and convenient at ATG Store.com.",
"route": "/gift-shop/category/cat50056",
"categoryPaths": ["/Commerce Root/Gift Shop"],
"displayName": "Gift Shop",
"repositoryId": "cat50056",
"active": true,
"childCategories": [
{"repositoryId": "cat50067"},
{"repositoryId": "cat60001"}
],
"id": "cat50056",
"fixedParentCategories": [{"repositoryId": "rootCategory"}]
},
{
"longDescription": "Shop our chic collection of women's apparel, featuring women's dresses, women's shoes, skirts, jackets, and pants. Personalized style and comfort is simple and easy when you shop women's fashions from ATG Store.com.",
"route": "/women/category/cat50001",
"categoryPaths": ["/Commerce Root/Women"],
"displayName": "Women",
"repositoryId": "cat50001",
"active": true,
"childCategories": [
{"repositoryId": "cat70002"},
{"repositoryId": "cat70004"},
{"repositoryId": "cat70006"},
{"repositoryId": "cat70008"},
{"repositoryId": "cat70010"},
{"repositoryId": "cat70012"},
{"repositoryId": "cat70014"}
],
"id": "cat50001",
"fixedParentCategories": [{"repositoryId": "rootCategory"}]
},
{
"longDescription": "Shop our fashionable collection of men's apparel, featuring men's shoes, shirts, jackets, shorts, and pants. Personalized style and comfort is simple and easy when you shop men's fashions from ATG Store.com.",
"route": "/men/category/catMen",
"categoryPaths": ["/Commerce Root/Men"],
"displayName": "Men",
"repositoryId": "catMen",
"active": true,
"childCategories": [
{"repositoryId": "catMenShirts"},
{"repositoryId": "catMenPants"},
{"repositoryId": "catMenShorts"},
{"repositoryId": "catMenJackets"},
{"repositoryId": "catMenAccessories"}
],
"id": "catMen",
"fixedParentCategories": [{"repositoryId": "rootCategory"}]
},
{
"longDescription": "Browse our selection of quality men's and women's shoes. Women's pumps, slingbacks, and trainers, men's oxfords, moccasins, trainers, and more. Buy stylish shoes from ATG Store and step out in style.",
"route": "/shoes/category/cat50097",
"categoryPaths": ["/Commerce Root/Shoes"],
"displayName": "Shoes",
"repositoryId": "cat50097",
"active": true,
"childCategories": [
{"repositoryId": "cat50087"},
{"repositoryId": "cat50077"}
],
"id": "cat50097",
"fixedParentCategories": [{"repositoryId": "rootCategory"}]
},
{
"longDescription": "ATG Home commerce root",
"route": "/for-the-home/category/homeStoreRootCategory",
"categoryPaths": ["/Commerce Root/For the Home"],
"displayName": "For the Home",
"repositoryId": "homeStoreRootCategory",
"active": true,
"childCategories": [
{"repositoryId": "homeStoreGiftShop"},
{"repositoryId": "homeStoreTables"},
{"repositoryId": "homeStoreSeating"},
{"repositoryId": "homeStoreStorage"},
{"repositoryId": "cat10016"},
{"repositoryId": "catBlankets"},
{"repositoryId": "catClocks"}
],
"id": "homeStoreRootCategory",
"fixedParentCategories": [{"repositoryId": "rootCategory"}]
},
{
"longDescription": null,
"route": "/temp/category/cat90016",
"categoryPaths": ["/Commerce Root/Temp"],
"displayName": "Temp",
"repositoryId": "cat90016",
"active": true,
"childCategories": null,
"id": "cat90016",
"fixedParentCategories": [{"repositoryId": "rootCategory"}]
},
{
"longDescription": null,
"route": "/electronics/category/cat90020",
"categoryPaths": ["/Commerce Root/Electronics"],
"displayName": "Electronics",
"repositoryId": "cat90020",
"active": true,
"childCategories": null,
"id": "cat90020",
"fixedParentCategories": [{"repositoryId": "rootCategory"}]
}
],
"id": "rootCategory",
"fixedParentCategories": []
}]
}