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:
string
Required:true
The asset language of the request
Body Parameter
Root Schema : createCollection_request
{
"catalogId":"cloudLakeCatalog",
"properties":{
"displayName":"Electronics",
"name":"Electronics"
}
}
- catalogId
-
Type:
string
Required:true
ID of the catalog. - parentCategoryId
-
Type:
string
ID of the parent category for the new collection. - properties
-
Type:
object
propertiesRequired:true
Additional Properties Allowed:List of properties of the collection.
Nested Schema : properties
Type:
object
List of properties of the collection.
- active
-
Type:
boolean
Whether or not the category is active. Can be set to null to inherit from parents. - description
-
Type:
string
Description of the category. - displayName
-
Type:
string
Required:true
Display name of the collection. - id
-
Type:
string
Category ID. - longDescription
-
Type:
string
Long description of the category. - name
-
Type:
string
Required:true
Name 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:
boolean
Whether or not the collection is active. Value is inherited from parents if not set. - categoryImages
-
Type:
array
categoryImagesAdditional Properties Allowed:Array of category images. - categoryPaths
-
Type:
array
categoryPathsAdditional Properties Allowed:An array of category paths. - childCategories
-
Type:
string
Array of category objects. - description
-
Type:
string
Description of the category. - displayName
-
Type:
string
Display Name of the category. - fixedParentCategories
-
Type:
array
fixedParentCategoriesAdditional Properties Allowed:Array of category objects. - id
-
Type:
string
Category ID. - longDescription
-
Type:
string
Long description of the category. - repositoryId
-
Type:
string
Repository ID. - route
-
Type:
string
Route of the category.
Nested Schema : categoryImages
Nested Schema : categoryPaths
Nested Schema : fixedParentCategories
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
Image repository ID.
Nested Schema : items
Type:
object
- active
-
Type:
boolean
Whether or not the collection is active. Value is inherited from parents if not set. - categoryImages
-
Type:
array
categoryImagesAdditional Properties Allowed:Array of category images. - categoryPaths
-
Type:
array
categoryPathsAdditional Properties Allowed:An array of category paths. - childCategories
-
Type:
array
childCategoriesAdditional Properties Allowed:Array of category objects. - description
-
Type:
string
Description of the category. - displayName
-
Type:
string
Display Name of the category. - id
-
Type:
string
id of parent category. - longDescription
-
Type:
string
Long description of the category. - repositoryId
-
Type:
string
Repository id of parent category. - route
-
Type:
string
Route of the category.
Nested Schema : categoryImages
Nested Schema : categoryPaths
Nested Schema : childCategories
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
Image repository ID.
Nested Schema : items
Type:
object
- categoryImages
-
Type:
array
categoryImagesAdditional Properties Allowed:Array of category images. - categoryPaths
-
Type:
array
categoryPathsAdditional Properties Allowed:An array of category paths. - childCategories
-
Type:
array
childCategoriesAdditional Properties Allowed:Array of category objects. - displayName
-
Type:
string
Display Name of the category. - fixedParentCategories
-
Type:
array
fixedParentCategoriesAdditional Properties Allowed:Array of category objects. - id
-
Type:
string
id of child category. - repositoryId
-
Type:
string
Repository id of child category. - route
-
Type:
string
Route of the category.
Nested Schema : categoryImages
Nested Schema : categoryPaths
Nested Schema : childCategories
Nested Schema : fixedParentCategories
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
Image repository ID.
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
Repository id of child category.
Nested Schema : items
Type:
object
- repositoryId
-
Type:
string
Repository 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:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The 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": [] }] }