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.
Request
Supported Media Types
- application/json
Query Parameters
- catalogId
-
Type:
stringID of the catalog.- categoryIds
Type:stringRequired:trueList of category IDs.
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe asset language of the request
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listCollections_response
- items
-
Type:
arrayitemsAdditional Properties Allowed:The array of category objects.
Nested Schema : items
Nested Schema : items
Type:
object- active
-
Type:
booleanWhether or not the category is active - 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. - creationDate
-
Type:
stringproduct creation date - dimensionId
-
Type:
stringDimension ID. - displayName
-
Type:
stringDisplay Name of the category. - fixedParentCategories
-
Type:
arrayfixedParentCategoriesAdditional Properties Allowed:Array of fixed child 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 : childCategories
Nested Schema : fixedParentCategories
Nested Schema : items
Type:
object- metadata
-
Type:
objectmetadataAdditional Properties Allowed:Category Image Metadata. - name
-
Type:
stringImage Name. - path
-
Type:
stringImage Path. - repositoryId
-
Type:
stringRepository ID of Image Media. - url
-
Type:
stringImage URL.
Nested Schema : metadata
Type:
objectCategory Image Metadata.
- altText
-
Type:
stringAlt text for category image. - titleText
-
Type:
stringTitle text for category image.
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringRepository ID of the child category.
Nested Schema : items
Type:
object- repositoryId
-
Type:
stringRepository id of parent category.
Example 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",
"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",
"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",
"id":"rootCategory"
}
],
"creationDate":"2011-01-07T17:19:47.000Z",
"route":"/gift-shop/category/cat50056",
"dimensionId":"943609061",
"repositoryId":"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|
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 Response Payload returned by endpoint:
[{
"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",
"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",
"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",
"id": "rootCategory"
}],
"creationDate": "2011-01-07T17:19:47.000Z",
"route": "/gift-shop/category/cat50056",
"dimensionId": "943609061",
"repositoryId": "cat50056",
"id": "cat50056"
}]