category

This class provides RESTful services to get category data for search-based catalog navigation. It performs the services by delegating to the CatalogNavigationView BOD service.

Handler Class:

com.ibm.commerce.rest.search.handler.CategoryViewHandler

Method Summary

HTTP MethodPathDescription
GET/store/{storeId}/categoryview/{categoryIdentifier}Gets category details based on its identifier.
GET/store/{storeId}/categoryview/@topGets all top level categories.
GET/store/{storeId}/categoryview/byId/{categoryId}Gets category details based on its unique ID.
GET/store/{storeId}/categoryview/byParentCategory/{parentCategoryId}Gets child categories based on the parent category unique ID.

Method Details

GET /store/{storeId}/categoryview/{categoryIdentifier}

Gets category details based on its identifier.

Handler Method:

findCategoryByIdentifier

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
categoryIdentifierCategory Identifier.pathstringtrueN/A
catalogIdThe catalog identifier. If none is specified, the store default catalog shall be used.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

categoryview-categoryDetails


Example

Request:
GET /wcs/resources/store/10001/categoryview/Apparel
HTTP Status Code:

200

Response:
{
	"CatalogGroupView": [
		{
			"fullImage": "images\/catalog\/apparel\/women\/category\/catr_wcl_pants.png",
			"fullImageAltDescription": "Image for Apparel from Aurora",
			"identifier": "Apparel",
			"metaDescription": "The latest styles for the entire family.",
			"metaKeyword": "family apparel, cloths, shirt, pants, tops, bottoms, dresses, dress",
			"name": "Apparel",
			"productsURL": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/productview\/byCategory\/10001",
			"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/categoryview\/byId\/10001",
			"shortDescription": "The latest styles for the entire family.",
			"thumbnail": "images\/catalog\/apparel\/women\/category\/catr_wcl_pants.png",
			"title": "Apparel | Aurora",
			"uniqueID": "10001"
		}
	],
	"MetaData": [
		{
			"metaData": "1",
			"metaKey": "price"
		}
	],
	"recordSetComplete": "true",
	"recordSetCount": "1",
	"recordSetStartNumber": "0",
	"recordSetTotal": "1",
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/categoryview\/Apparel",
	"resourceName": "categoryview"
}

GET /store/{storeId}/categoryview/@top

Gets all top level categories.

Handler Method:

findTopCategories

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
catalogIdThe catalog identifier. If none is specified, the store default catalog shall be used.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

categoryview-categoryDetails

GET /store/{storeId}/categoryview/byId/{categoryId}

Gets category details based on its unique ID.

Handler Method:

findCategoryByUniqueId

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
categoryIdCategory ID.pathstringtrueN/A
catalogIdThe catalog identifier. If none is specified, the store default catalog shall be used.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

categoryview-categoryDetails

GET /store/{storeId}/categoryview/byParentCategory/{parentCategoryId}

Gets child categories based on the parent category unique ID.

Handler Method:

findSubCategories

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
parentCategoryIdThe parent category unique ID.pathstringtrueN/A
pageNumberPage number, starting at 1. Valid values include positive integers of 1 and above. The "pageSize" must be specified for paging to work.queryintegerfalsefalse
pageSizePage size. Used to limit the amount of data returned by a query. Valid values include positive integers of 1 and above. The "pageNumber" must be specified for paging to work.queryintegerfalsefalse
catalogIdThe catalog identifier. If none is specified, the store default catalog shall be used.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
201The requested resource has been created.
204The requested completed successfully. No content is returned in the response.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

categoryview-categorySummary


Example

Request:
GET /wcs/resources/store/10001/categoryview/byParentCategory/10001
HTTP Status Code:

200

Response:
{
	"CatalogGroupView": [
		{
			"identifier": "Girls",
			"name": "Girls",
			"parentCatalogGroupID": [
				"10001"
			],
			"productsURL": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/productview\/byCategory\/10005",
			"resourceId": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/categoryview\/byId\/10005",
			"shortDescription": "Girls",
			"thumbnail": "images\/catalog\/apparel\/girls\/category\/catr_app_girls.png",
			"uniqueID": "10005"
		},
		{
			"identifier": "Boys",
			"name": "Boys",
			"parentCatalogGroupID": [
				"10001"
			],
			"productsURL": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/productview\/byCategory\/10004",
			"resourceId": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/categoryview\/byId\/10004",
			"shortDescription": "boys",
			"thumbnail": "images\/catalog\/apparel\/boys\/category\/catr_app_boys.png",
			"uniqueID": "10004"
		},
		{
			"identifier": "Women",
			"name": "Women",
			"parentCatalogGroupID": [
				"10001"
			],
			"productsURL": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/productview\/byCategory\/10003",
			"resourceId": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/categoryview\/byId\/10003",
			"shortDescription": "Women",
			"thumbnail": "images\/catalog\/apparel\/women\/category\/catr_app_women.png",
			"uniqueID": "10003"
		},
		{
			"identifier": "Men",
			"name": "Men",
			"parentCatalogGroupID": [
				"10001"
			],
			"productsURL": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/productview\/byCategory\/10002",
			"resourceId": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/categoryview\/byId\/10002",
			"shortDescription": "Men",
			"thumbnail": "images\/catalog\/apparel\/men\/category\/catr_app_men.png",
			"uniqueID": "10002"
		}
	],
	"MetaData": [
		{
			"metaData": "1",
			"metaKey": "price"
		}
	],
	"recordSetComplete": "true",
	"recordSetCount": "4",
	"recordSetStartNumber": "0",
	"recordSetTotal": "4",
	"resourceId": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/categoryview\/byParentCategory\/10001",
	"resourceName": "categoryview"
}

Data Type Details

categoryview-categoryDetails

Properties:
NameData TypeRequired
indexStatusstringfalse
userDataFieldcategoryview-categoryDetails.userDataField arrayfalse
SuggestionViewcategoryview-categoryDetails.SuggestionView arrayfalse
WebContentViewcategoryview-categoryDetails.WebContentView arrayfalse
recordSetCompletestringfalse
CatalogGroupViewcategoryview-categoryDetails.CatalogGroupView arrayfalse
MetaDatacategoryview-categoryDetails.MetaData arrayfalse
finalQuerystringfalse
recordSetTotalstringfalse
BreadCrumbTrailEntryViewcategoryview-categoryDetails.BreadCrumbTrailEntryView arrayfalse
reportstring arrayfalse
recordSetStartNumberstringfalse
FacetViewcategoryview-categoryDetails.FacetView arrayfalse
recordSetCountstringfalse

categoryview-categoryDetails.BreadCrumbTrailEntryView

Properties:
NameData TypeRequired
valuestringfalse
labelstringfalse
typestringfalse

categoryview-categoryDetails.CatalogGroupView

Properties:
NameData TypeRequired
longDescriptionstringfalse
shortDescriptionstringfalse
metaKeywordstringfalse
userDataFieldcategoryview-categoryDetails.CatalogGroupView.userDataField arrayfalse
identifierstringfalse
parentCatalogGroupIDstring arrayfalse
namestringfalse
thumbnailstringfalse
fullImagestringfalse
uniqueIDstringfalse
MetaDatacategoryview-categoryDetails.CatalogGroupView.MetaData arrayfalse
fullPathstringfalse
metaDescriptionstringfalse
titlestringfalse
fullImageAltDescriptionstringfalse

categoryview-categoryDetails.CatalogGroupView.MetaData

Properties:
NameData TypeRequired
metaKeystringtrue
metaDatastringfalse

categoryview-categoryDetails.CatalogGroupView.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

categoryview-categoryDetails.FacetView

Properties:
NameData TypeRequired
valuestringfalse
Entrycategoryview-categoryDetails.FacetView.Entry arrayfalse
namestringfalse

categoryview-categoryDetails.FacetView.Entry

Properties:
NameData TypeRequired
labelstringfalse
imagestringfalse
countstringfalse
entryValuestringfalse

categoryview-categoryDetails.MetaData

Properties:
NameData TypeRequired
metaKeystringtrue
metaDatastringfalse

categoryview-categoryDetails.SuggestionView

Properties:
NameData TypeRequired
Entrycategoryview-categoryDetails.SuggestionView.Entry arrayfalse
labelstringfalse
identifierstringfalse

categoryview-categoryDetails.SuggestionView.Entry

Properties:
NameData TypeRequired
valuestringfalse
userDataFieldcategoryview-categoryDetails.SuggestionView.Entry.userDataField arrayfalse
imagestringfalse
namestringfalse

categoryview-categoryDetails.SuggestionView.Entry.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

categoryview-categoryDetails.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

categoryview-categoryDetails.WebContentView

Properties:
NameData TypeRequired
userDataFieldcategoryview-categoryDetails.WebContentView.userDataField arrayfalse
namestringfalse
uniqueIDstringfalse
URLstringtrue
MetaDatacategoryview-categoryDetails.WebContentView.MetaData arrayfalse

categoryview-categoryDetails.WebContentView.MetaData

Properties:
NameData TypeRequired
metaDatastringfalse

categoryview-categoryDetails.WebContentView.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

categoryview-categorySummary

Properties:
NameData TypeRequired
indexStatusstringfalse
userDataFieldcategoryview-categorySummary.userDataField arrayfalse
SuggestionViewcategoryview-categorySummary.SuggestionView arrayfalse
WebContentViewcategoryview-categorySummary.WebContentView arrayfalse
recordSetCompletestringfalse
CatalogGroupViewcategoryview-categorySummary.CatalogGroupView arrayfalse
MetaDatacategoryview-categorySummary.MetaData arrayfalse
finalQuerystringfalse
recordSetTotalstringfalse
BreadCrumbTrailEntryViewcategoryview-categorySummary.BreadCrumbTrailEntryView arrayfalse
reportstring arrayfalse
recordSetStartNumberstringfalse
FacetViewcategoryview-categorySummary.FacetView arrayfalse
recordSetCountstringfalse

categoryview-categorySummary.BreadCrumbTrailEntryView

Properties:
NameData TypeRequired
valuestringfalse
labelstringfalse
typestringfalse

categoryview-categorySummary.CatalogGroupView

Properties:
NameData TypeRequired
shortDescriptionstringfalse
identifierstringfalse
namestringfalse
parentCatalogGroupIDstring arrayfalse
thumbnailstringfalse
uniqueIDstringfalse

categoryview-categorySummary.FacetView

Properties:
NameData TypeRequired
valuestringfalse
Entrycategoryview-categorySummary.FacetView.Entry arrayfalse
namestringfalse

categoryview-categorySummary.FacetView.Entry

Properties:
NameData TypeRequired
labelstringfalse
imagestringfalse
countstringfalse
entryValuestringfalse

categoryview-categorySummary.MetaData

Properties:
NameData TypeRequired
metaKeystringtrue
metaDatastringfalse

categoryview-categorySummary.SuggestionView

Properties:
NameData TypeRequired
Entrycategoryview-categorySummary.SuggestionView.Entry arrayfalse
labelstringfalse
identifierstringfalse

categoryview-categorySummary.SuggestionView.Entry

Properties:
NameData TypeRequired
valuestringfalse
userDataFieldcategoryview-categorySummary.SuggestionView.Entry.userDataField arrayfalse
namestringfalse
imagestringfalse

categoryview-categorySummary.SuggestionView.Entry.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

categoryview-categorySummary.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue

categoryview-categorySummary.WebContentView

Properties:
NameData TypeRequired
userDataFieldcategoryview-categorySummary.WebContentView.userDataField arrayfalse
namestringfalse
uniqueIDstringfalse
URLstringtrue
MetaDatacategoryview-categorySummary.WebContentView.MetaData arrayfalse

categoryview-categorySummary.WebContentView.MetaData

Properties:
NameData TypeRequired
metaDatastringfalse

categoryview-categorySummary.WebContentView.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue