listCollections
get
/ccagent/v1/collections
List Collections. Get a list of collections. Use the name query param to list the collections whose display name CONTAINS IGNORECASE the given search string. Use the categoryIds param to get a list of collections whose ids match those listed in the comma delimted string value. Either categoryIds or name must be provided. Optionally takes the x-ccasset-language header to get translated content in another language. Takes X-CCAgentContext header which is a JSON object with 'shopperProfileId' as a property. If 'shopperProfileId' is not provided, it is considered as an anonymous profile.Additonally takes x-ccsite header to return the data specific to the site. This endpoint also returns dynamic properties of a collection if exists.
Request
Supported Media Types
- application/json
Query Parameters
-
catalogId(optional): string
ID of catalog. If a catalogId is not passed, the catalog associated with the shopperProfileId passed in the X-CCAgentContext header is used. If no shopperProfileId is passed in the header, default catalog associated with the site is used.
-
categoryIds: string
List of collection ids to get.
-
name(optional): string
Partial display name of a collection. 'true' if categoryIds not provided
Header Parameters
-
x-ccsite(optional): string
the site id on which the orders is laced
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 category objects.
Nested Schema : items
Type:
Show Source
object
-
active(optional):
boolean
Whether or not the category is active
-
categoryImages(optional):
array categoryImages
Array of category images.
-
categoryPaths(optional):
array categoryPaths
An array of category paths.
-
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 fixed child 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 : fixedParentCategories
Type:
array
Array of fixed child category objects.
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 : items
Type:
Show Source
object
-
metadata(optional):
object metadata
Category Image Metadata.
-
name(optional):
string
Image Name.
-
path(optional):
string
Image Path.
-
repositoryId(optional):
string
Repository ID of Image Media.
-
url(optional):
string
Image URL.
Nested Schema : metadata
Type:
object
Category Image Metadata.
Show Source
-
altText(optional):
string
Alt text for category image.
-
titleText(optional):
string
Title text for category image.
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
Repository ID of the child category.
Nested Schema : items
Type:
Show Source
object
-
repositoryId(optional):
string
Repository id of parent category.
Example Response (application/json)
{
"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":false,
"childCategories":[
{
"longDescription":"Looking for gift ideas for him? Let us help you find that perfect gift for him at ATG Store. Shopping for gifts is simple and convenient at ATG Store.com.",
"route":"/for-him/category/cat50067",
"categoryPaths":[
"/Commerce Root/Gift Shop/For Him"
],
"displayName":"For Him",
"repositoryId":"cat50067",
"active":false,
"childCategories":null,
"id":"cat50067",
"fixedParentCategories":[
{
"repositoryId":"cat50056"
}
]
},
{
"longDescription":"Looking for gift ideas for her? Find that amazing gift that she'll love at ATG Store. Shopping for gifts is simple and convenient at ATG Store.com.",
"route":"/for-her/category/cat60001",
"categoryPaths":[
"/Commerce Root/Gift Shop/For Her"
],
"displayName":"For Her",
"repositoryId":"cat60001",
"active":false,
"childCategories":null,
"id":"cat60001",
"fixedParentCategories":[
{
"repositoryId":"cat50056"
}
]
}
],
"id":"cat50056",
"fixedParentCategories":[
{
"longDescription":"ATG Store commerce root",
"route":"/commerce-root/category/rootCategory",
"categoryPaths":[
"/Commerce Root"
],
"displayName":"Commerce Root",
"repositoryId":"rootCategory",
"active":false,
"childCategories":[
{
"repositoryId":"cat50056"
},
{
"repositoryId":"cat50001"
},
{
"repositoryId":"catMen"
},
{
"repositoryId":"cat50097"
},
{
"repositoryId":"homeStoreRootCategory"
},
{
"repositoryId":"cat90028"
},
{
"repositoryId":"cat90030"
}
],
"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|
|------------------|------------------|
|30015|SiteId passed in x-ccsite header is currently inactive|
|30014|SiteId passed in x-ccsite header is invalid or the site was deleted|
|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