listCollections
get
/ccstore/v1/collections
List Collections. Gets a list of collections based on category IDs. Optionally takes the x-ccasset-language headers to get translated content in another language.Also it can have optional X-CCOrganization header which is a JSON field to specify current Organization id of logged in user. The endpoint also returns dynamic properties for a collection if exists.
Request
Supported Media Types
- application/json
Query Parameters
-
catalogId(optional): string
ID of the catalog.
-
categoryIds: string
List of category IDs.
-
multipleCategoryPaths(optional): boolean
Return multiCatalogCategoryPaths and multiCatalogCategoryIdPaths to display linked paths from multiple catalogs prepended with catalog name and id respectively if the value is set to true. Default value of the parameter is false.
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 : listCollections_response
Type:
Show Source
object
-
items(optional):
array items
The array of collection items.
-
limit(optional):
integer
Limit of number of collections.
-
offset(optional):
integer
Offset of collection inventory.
-
sort(optional):
array sort
List of properties being sorted.
-
total(optional):
integer
Total number of collections.
-
totalResults(optional):
integer
Total number of collections.
Nested Schema : items
Type:
Show Source
object
-
active(optional):
boolean
Whether or not the category is active
-
catalogsCount(optional):
integer
Number of catalogs this category is associated to.
-
categoryImages(optional):
array categoryImages
The category images.
-
categoryPaths(optional):
array categoryPaths
An array of category paths.
-
childCategories(optional):
array childCategories
Array of category objects.
-
childProducts(optional):
array childProducts
Array of product objects. Note, if the catalogId is a filtered view catalog then this will only include the products in that filtered view catalog.
-
childProductsCount(optional):
integer
Count of the child products.
-
creationDate(optional):
string
Creation date of the category.
-
description(optional):
string
Description of the category.
-
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
-
parentCategory(optional):
object parentCategory
Default parent category
-
repositoryId(optional):
string
Repository ID of the category.
-
route(optional):
string
Route of the category.
Nested Schema : childProducts
Type:
array
Array of product objects. Note, if the catalogId is a filtered view catalog then this will only include the products in that filtered view catalog.
Show Source
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 : parentCategory
Type:
object
Default parent category
Show Source
-
repositoryId(optional):
string
Repository id of the default parent category
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The repository Id of the category image.
Nested Schema : items
Type:
Show Source
object
-
catalogsCount(optional):
integer
Number of catalogs this category is associated to.
-
repositoryId(optional):
string
The repository Id of the child category
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
The repository Id of the child product
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
The repository Id of the categories
Nested Schema : items
Type:
Show Source
object
-
order(optional):
string
The order by which the property is sorted.
-
property(optional):
string
The property being sorted.
Example Response (application/json)
[
{
"longDescription":null,
"categoryImages":[
{
"path":"/collections/DSC_0590.JPG",
"metadata":{
"altText":"GiftShop",
"titleText":"GiftShop"
},
"repositoryId":"m10001",
"name":"/collections/giftshop.JPG",
"url":"http://localhost:9080/file/v5688338524333816125/collections/giftshop.JPG",
"tags":[
]
}
],
"displayName":"Gift Shop",
"categoryPaths":[
"/Storefront Navigation/Gift Shop"
],
"active":true,
"description":null,
"categoryIdPaths":[
"rootCategory>cat50056"
],
"childCategories":[
{
"longDescription":null,
"categoryImages":[
],
"displayName":"For Him",
"categoryPaths":[
"/Storefront Navigation/Gift Shop/For Him"
],
"active":true,
"description":null,
"categoryIdPaths":[
"rootCategory>cat50056>cat50067"
],
"childCategories":[
{
"repositoryId":"cat90042"
},
{
"repositoryId":"cat90040"
}
],
"creationDate":"2011-01-07T17:19:47.000Z",
"fixedParentCategories":[
{
"repositoryId":"cat50056"
}
],
"route":"/for-him/category/cat50067",
"repositoryId":"cat50067",
"multiCatalogCategoryPaths":[
"/CloudLake Catalog/Storefront Navigation/Gift Shop/For Him"
],
"multiCatalogCategoryIdPaths":[
"cloudLakeCatalog>rootCategory>cat50056>cat50067"
],
"id":"cat50067"
},
{
"longDescription":null,
"categoryImages":[
],
"displayName":"For Her",
"categoryPaths":[
"/Storefront Navigation/Gift Shop/For Her"
],
"active":true,
"description":null,
"categoryIdPaths":[
"rootCategory>cat50056>cat60001"
],
"childCategories":[
{
"repositoryId":"cat90046"
},
{
"repositoryId":"cat90026"
},
{
"repositoryId":"cat90028"
},
{
"repositoryId":"cat90037"
},
{
"repositoryId":"cat90034"
}
],
"creationDate":"2011-01-07T17:19:47.000Z",
"fixedParentCategories":[
{
"repositoryId":"cat50056"
}
],
"route":"/for-her/category/cat60001",
"repositoryId":"cat60001",
"multiCatalogCategoryPaths":[
"/CloudLake Catalog/Storefront Navigation/Gift Shop/For Her"
],
"multiCatalogCategoryIdPaths":[
"cloudLakeCatalog>rootCategory>cat50056>cat60001"
],
"id":"cat60001"
}
],
"fixedParentCategories":[
{
"longDescription":"Commerce Cloud Root Category",
"categoryImages":[
],
"displayName":"Storefront Navigation",
"categoryPaths":[
"/Storefront Navigation"
],
"active":true,
"description":null,
"categoryIdPaths":[
"rootCategory"
],
"childCategories":[
{
"repositoryId":"cat50056"
},
{
"repositoryId":"cat90016"
},
{
"repositoryId":"homeStoreRootCategory"
}
],
"creationDate":"2011-01-07T17:19:47.000Z",
"fixedParentCategories":[
],
"route":"/storefront-navigation/category/rootCategory",
"repositoryId":"rootCategory",
"multiCatalogCategoryPaths":[
"/CloudLake Catalog/Storefront Navigation"
],
"multiCatalogCategoryIdPaths":[
"cloudLakeCatalog>rootCategory"
],
"id":"rootCategory"
}
],
"creationDate":"2011-01-07T17:19:47.000Z",
"route":"/gift-shop/category/cat50056",
"dimensionId":"943609061",
"repositoryId":"cat50056",
"multiCatalogCategoryPaths":[
"/CloudLake Catalog/Storefront Navigation/Gift Shop"
],
"multiCatalogCategoryIdPaths":[
"cloudLakeCatalog>rootCategory>cat50056"
],
"id":"cat50056"
}
]
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|
|20141|Collection Id passed is null or empty|
|20052|Get List Collections Type Internal Error|
|20140|Collection Id is invalid or non-existent|
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