The getCatagory actor-chain allows the user to browse the catalog sub-categories. The actor-chain looks for a category using its categoryId. If the category is located, the chain checks whether the category belongs to the user’s catalog in their current profile, and if the item belongs to the current site. If it does, the chain returns the category. If the category is not found using the catalogId, the chain will return an empty response. If the category does not belong to a user’s catalog or current site, the chain will return an error message.

Parameter

Description

categoryId

The ID of the category.

filterBySite

Identifies if the output is filtered by site. Set to true by default.

filterByCatalog

Identifies if the output is filtered by catalog. Set to true by default.

Get Catalog By Sub-Categories Example
curl -L -v -b customer_cookies.txt -H "Content-Type: application/json" –d
"{ \"categoryId\" : \"cat50056\" }" "http://localhost:8280/rest/model/atg/
commerce/catalog/ProductCatalogActor/getCategory"

The server response might be similar to the following:

{
  "childCategories": [
    {
      "id": "cat50056",
      "description": null,
      "defaultParentCategory": null,
      "displayName": "Gift Shop",
      "type": null
    },
    {
      "id": "cat50001",
      "description": "",
      "defaultParentCategory": null,
      "displayName": "Women",
      "type": null
    },
    {
      "id": "catMen",
      "description": "",
      "defaultParentCategory": null,
      "displayName": "Men",
      "type": null
    },
    {
      "id": "cat50097",
      "description": "",
      "defaultParentCategory": null,
      "displayName": "Shoes",
      "type": null
    },
    {
      "id": "cat10016",
      "description": null,
      "defaultParentCategory": null,
      "displayName": "Home Accents",
      "type": null
    }
  ],
  "category": {
    "id": "rootCategory",
    "description": null,
    "defaultParentCategory": null,
    "displayName": "Commerce Root",
    "type": null
  }
}

Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices