Catalog roles allow merchants to specify at the product type, category, and product levels which groups of people are allowed to see the products. This area of the API allows you to manage how that is done.
The following pre-requisites will be necessary to accomplish the goals of this article:
- General understanding of REST and API’s
If you haven’t already done so, you should probably have a development environment ready to development against, complete with Hotcakes installed and configured.
REST API Endpoints for Catalog Roles
There are a handful of REST API endpoints that allow you to display or manage various aspects of catalog roles. Those endpoints are detailed below.
|CatalogRoleCreate||CatalogRoleDTO||Allows you to create a new catalog role assignment.|
|CatalogRoleDelete||Boolean||Permanently deletes the specified catalog role.|
|CatalogRoleFindByCategory||List of CatalogRoleDTO||Returns a collection of the catalog roles that are assigned to the specified category.|
|CatalogRoleFindByProduct||List of CatalogRoleDTO||Returns a collection of the catalog roles that are assigned to the specified product.|
|CatalogRoleFindByProductType||List of CatalogRoleDTO||Returns a collection of the catalog roles that are assigned to the specified product type.|