getCollection
get
/ccadmin/v1/collections/{id}
Get Collection. Get a collection by ID. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
ID of collection.
Query Parameters
-
catalogId(optional): string
ID of catalog.
-
depth(optional): string
Depth of nested response from 0 to 6. Defaults to 0. NOTE: Caution should be used as increasing depth can negatively affect performance.
-
expand(optional): string
If set to childProducts, then childProducts will be expanded to include details.
-
includeBaseCatalogProducts(optional): boolean
If catalogId is a filtered view catalog then setting this param to true ensure the base products of the filtered view catalog are also returned as childProducts. If expand=childProducts then childProducts in the response will also have an isFilteredCatalogMember field that will be true for those products that are in the filtered view catalog.
-
multipleCategoryPaths(optional): boolean
This parameter is dependent on showCategoryPaths set to true. If the value is set to true then response returns multiCatalogCategoryPaths and multiCatalogCategoryIdPaths to display linked paths from multiple catalogs prepended with catalog name and id respectively. Default value of the parameter is false.
-
showCatalogsInfo(optional): boolean
Boolean flag to determine whether to show or hide catalogsCount and catalogsInfo properties in the response. Default value is false.
-
showCategoryPaths(optional): boolean
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
-
X-CCAsset-Language(optional): string
The asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getCollection_response
Type:
Show Source
object
-
childCategories(optional):
array childCategories
Array of category objects.
-
creationDate(optional):
string
product creation date
-
dimensionId(optional):
string
Dimension ID.
-
displayName(optional):
string
Display Name of the category.
-
fixedParentCategories(optional):
array fixedParentCategories
Array of category objects.
-
id(optional):
string
Category ID.
-
longDescription(optional):
string
Long description of the category.
-
multiCatalogCategoryIdPaths(optional):
array multiCatalogCategoryIdPaths
An array of category ids in the path prepended with catalog id
-
multiCatalogCategoryPaths(optional):
array multiCatalogCategoryPaths
An array of category paths prepended with catalog name
-
repositoryId(optional):
string
Repository ID.
-
route(optional):
string
Route of the category.
Nested Schema : multiCatalogCategoryIdPaths
Type:
array
An array of category ids in the path prepended with catalog id
Show Source
Nested Schema : multiCatalogCategoryPaths
Type:
array
An array of category paths prepended with catalog name
Show Source
Nested Schema : items
Type:
Show Source
object
-
creationDate(optional):
string
product creation date
-
displayName(optional):
string
Display name of the child category.
-
id(optional):
string
ID of the child category.
-
longDescription(optional):
string
Long description of the child category.
-
route(optional):
string
Route of the child category.
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
Repository id of parent category.
Example Response (application/json)
{
"longDescription":"Men's shoes for every occasion. Shop our collection of men's dress shoes, men's oxford shoes, moccasins and trainers from ATG Store.com.",
"childProducts":[
{
"repositoryId":"xprod1042"
},
{
"repositoryId":"xprod1047"
},
{
"repositoryId":"xprod1044"
},
{
"repositoryId":"xprod1043"
}
],
"catalogsCount":2,
"keywords":[
"mens shoes",
"men's shoes",
"mens dress shoes",
"mens casual shoes",
"men's casual shoes",
"mens flip flops",
"men's flip flops",
"ATG Store.com footwear",
"ATG Store.com"
],
"categoryPaths":[
"/Commerce Root/Shoes/Men's Shoes"
],
"displayName":"Men's Shoes",
"seoDescriptionDerived":"Men's Shoes, Men's shoes for every occasion. Shop our collection of men's dress shoes, men's oxford shoes, moccasins and trainers from ATG Store.com.",
"description":"",
"childCategories":null,
"seoTitleDerived":"Men's Shoes",
"seoMetaInfo":{
"seoDescription":"Men's Shoes, Men's shoes for every occasion. Shop our collection of men's dress shoes, men's oxford shoes, moccasins and trainers from ATG Store.com.",
"repositoryId":"100002",
"seoTitle":"Men's Shoes",
"seoKeywords":"Men's Shoes",
"seoUrlSlug":"mens-shoes"
},
"catalogsInfo":[
{
"displayName":"Site Context Test Catalog",
"repositoryId":"SiteContextDummyCatalog"
},
{
"displayName":"QA Movie and Games Catalog",
"repositoryId":"cloudLakeCatalog"
}
],
"multiCatalogCategoryPaths":[
"CloudLake Catalog/Commerce Root/Shoes/Men's Shoes"
],
"id":"cat50077",
"childProductsCount":4,
"categoryImages":[
{
"path":"/collections/mens-shoes.jpg",
"metadata":{
"altText":"Men's Shoes",
"titleText":"Men's Shoes"
},
"name":"/collections/mens-shoes.jpg",
"repositoryId":"m10002",
"url":"http://localhost:9080/file/collections/mens-shoes.jpg"
}
],
"seoKeywordsDerived":"Men's Shoes",
"fixedChildCategories":[
],
"seoUrlSlugDerived":"mens-shoes",
"fixedParentCategories":[
{
"repositoryId":"cat50097"
}
],
"route":"/mens-shoes/category/cat50077",
"repositoryId":"cat50077",
"name":null,
"parentCategory":{
"repositoryId":"cat50097"
},
"multiCatalogCategoryIdPaths":[
"cloudLakeCatalog:rootCategory>m1002"
],
"ancestorCategories":[
{
"repositoryId":"rootCategory"
},
{
"repositoryId":"cat50097"
}
]
}
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|
|------------------|------------------|
|20142|Get Category Id Type Internal Error|
|20140|Collection Id is invalid or non-existent|
|200104|Catalog ID is invalid or not associated with current profile.|
|200240|parentCategoryScope is not revertToBase but parentCategory is not in the request|
|200241|parentCategory is not a parent of the collection|
|200242|catalogSpecific or revertToBase parentCategoryScope but no catalog specified in the request|
|200243|parentCategoryScope invalid/unknown value|
|200244|catalogSpecific parentCategoryScope but parentCategory is not in the specified catalog|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code