{
  "openapi": "3.0.1",
  "info": {
    "title": "Catalog Groups",
    "version": "9.1.20.0",
    "description": "Create and administer catalog groups by store and usage.",
    "x-introduced": "9.1.0.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Catalog Groups",
      "description": "Provide RESTful services to manage catalog groups."
    }
  ],
  "paths": {
    "/catalog-groups": {
      "get": {
        "tags": [
          "Catalog Groups"
        ],
        "summary": "Get catalog groups by store and usage.",
        "operationId": "getCatalogGroups",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId"
            },
            "x-context-data": "storeId"
          },
          {
            "name": "catalogId",
            "in": "query",
            "description": "The unique numeric ID for identifying the catalog.",
            "required": true,
            "schema": {
              "type": "string",
              "x-context-data": "catalogId"
            },
            "x-context-data": "catalogId"
          },
          {
            "name": "searchText",
            "in": "query",
            "description": "The name pattern to search.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topCatalogGroup",
            "in": "query",
            "description": "The top category indicator used to search for top level catalog groups.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "parentCatalogGroupId",
            "in": "query",
            "description": "The unique numeric ID for identifying the parent catalog group.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "The unique numeric ID for identifying the catalog group.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "dataLanguageIds",
            "in": "query",
            "description": "The integer(s) for identifying the language of the catalog group description. For a list of the integers that map to the supported default languages, refer to the Knowledge Center. Multiple identifiers should be specified as a comma-separated list.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-entity-path": "dataArea/get/recordSetStartNumber"
            },
            "x-entity-path": "dataArea/get/recordSetStartNumber"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-entity-path": "dataArea/get/maxItems"
            },
            "x-entity-path": "dataArea/get/maxItems"
          }
        ],
        "responses": {
          "200": {
            "description": "The operation is successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogGroupCollection"
                }
              }
            },
            "x-entity-path": "dataArea/catalogGroup"
          }
        },
        "x-expression-builder-class": "com.ibm.commerce.rest.admin.v2.catalog.CatalogGroupExpressionBuilder",
        "x-expression-builder-method": "formatExpression",
        "x-facade-client-class": "com.ibm.commerce.catalog.facade.client.CatalogGroupFacadeClient",
        "x-facade-client-method": "getCatalogGroup",
        "x-parameters": {
          "accessProfile": "IBM_Admin_Details"
        },
        "x-request-bod-class": "com.ibm.commerce.catalog.facade.datatypes.GetCatalogGroupType"
      },
      "post": {
        "tags": [
          "Catalog Groups"
        ],
        "summary": "Create a catalog group.",
        "operationId": "createCatalogGroups",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId"
            },
            "x-context-data": "storeId"
          },
          {
            "name": "catalogId",
            "in": "query",
            "description": "The unique numeric ID for identifying the catalog .",
            "required": true,
            "schema": {
              "type": "string",
              "x-context-data": "catalogId"
            },
            "x-context-data": "catalogId"
          }
        ],
        "requestBody": {
          "description": "The request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CatalogGroup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation is successful.",
            "headers": {
              "Location": {
                "description": "The URI of the catalog group.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {},
            "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/uniqueID",
            "links": {
              "getCatalogGroupById": {
                "operationRef": "#/paths/~1/catalog-groups/{id}/get",
                "parameters": {
                  "id": "$request.body#/id",
                  "storeId": "$request.query.storeId",
                  "dataLanguageIds": "$response.header.Location"
                },
                "description": "The `id`,`storeId`,`dataLanguageIds` value used in the request body can be used as the `id`,`storeId`,`dataLanguageIds` parameter in `GET /catalog-groups/{id}`.\n"
              },
              "deleteCatalogGroup": {
                "operationRef": "#/paths/~1/catalog-groups/{id}/delete",
                "parameters": {
                  "id": "$request.body#/id",
                  "storeId": "$request.query.storeId"
                },
                "description": "The `id`,`storeId` value used in the request body can be used as the `id`,`storeId` parameter  in DELETE /catalog-groups/{id}`.\n"
              },
              "updateCatalogGroup": {
                "operationRef": "#/paths/~1/catalog-groups/{id}/patch",
                "parameters": {
                  "catalogId": "$request.path.catalogId",
                  "id": "$request.body#/id",
                  "storeId": "$request.query.storeId"
                },
                "description": "The `catalogId`,`id`,`storeId` value used in the request body can be used as the `catalogId`,`id`,`storeId` parameter  in PATCH /catalog-groups/{id}`.\n"
              }
            }
          }
        },
        "x-action-code": "Create",
        "x-expression-template": "/CatalogGroup[1]",
        "x-facade-client-class": "com.ibm.commerce.catalog.facade.client.CatalogGroupFacadeClient",
        "x-facade-client-method": "processCatalogGroup",
        "x-request-bod-class": "com.ibm.commerce.catalog.facade.datatypes.ProcessCatalogGroupType",
        "x-request-verb": "process",
        "x-codegen-request-body-name": "body"
      }
    },
    "/catalog-groups/{id}": {
      "get": {
        "tags": [
          "Catalog Groups"
        ],
        "summary": "Get a catalog group based on the ID of the catalog group.",
        "operationId": "getCatalogGroupById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the catalog group.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId"
            },
            "x-context-data": "storeId"
          },
          {
            "name": "dataLanguageIds",
            "in": "query",
            "description": "The data language IDs.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The operation is successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogGroup"
                }
              }
            },
            "x-entity-path": "dataArea/catalogGroup[1]"
          }
        },
        "x-expression-template": "{_wcf.ap='{accessProfile}';_wcf.dataLanguageIds='{dataLanguageIds}'}/CatalogGroup[CatalogGroupIdentifier[(UniqueID='{id}')]]",
        "x-facade-client-class": "com.ibm.commerce.catalog.facade.client.CatalogGroupFacadeClient",
        "x-facade-client-method": "getCatalogGroup",
        "x-parameters": {
          "accessProfile": "IBM_Admin_Details"
        },
        "x-request-bod-class": "com.ibm.commerce.catalog.facade.datatypes.GetCatalogGroupType"
      },
      "delete": {
        "tags": [
          "Catalog Groups"
        ],
        "summary": "Delete a catalog group based on the ID of the catalog group.",
        "operationId": "deleteCatalogGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the catalog group.",
            "required": true,
            "schema": {
              "type": "string",
              "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/uniqueID"
            },
            "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/uniqueID"
          },
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId",
              "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/externalIdentifier/storeIdentifier/uniqueID"
            },
            "x-context-data": "storeId",
            "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/externalIdentifier/storeIdentifier/uniqueID"
          }
        ],
        "responses": {
          "204": {
            "description": "The operation is successful.",
            "content": {}
          }
        },
        "x-action-code": "Delete",
        "x-expression-template": "/CatalogGroup[1]",
        "x-facade-client-class": "com.ibm.commerce.catalog.facade.client.CatalogGroupFacadeClient",
        "x-facade-client-method": "processCatalogGroup",
        "x-request-bod-class": "com.ibm.commerce.catalog.facade.datatypes.ProcessCatalogGroupType",
        "x-request-verb": "process"
      },
      "patch": {
        "tags": [
          "Catalog Groups"
        ],
        "summary": "Update a catalog group based on the ID of the catalog group.",
        "operationId": "updateCatalogGroup",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique numeric ID for identifying the catalog group.",
            "required": true,
            "schema": {
              "type": "string",
              "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/uniqueID"
            },
            "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/uniqueID"
          },
          {
            "name": "catalogId",
            "in": "query",
            "description": "The unique numeric ID for identifying the catalog .",
            "required": true,
            "schema": {
              "type": "string",
              "x-context-data": "catalogId"
            },
            "x-context-data": "catalogId"
          },
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "x-context-data": "storeId",
              "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/externalIdentifier/storeIdentifier/uniqueID"
            },
            "x-context-data": "storeId",
            "x-entity-path": "dataArea/catalogGroup[1]/catalogGroupIdentifier/externalIdentifier/storeIdentifier/uniqueID"
          }
        ],
        "requestBody": {
          "description": "The request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CatalogGroup"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The operation is successful.",
            "content": {}
          }
        },
        "x-action-code": "Change",
        "x-expression-template": "/CatalogGroup[1]/CatalogGroupIdentifier",
        "x-facade-client-class": "com.ibm.commerce.catalog.facade.client.CatalogGroupFacadeClient",
        "x-facade-client-method": "changeCatalogGroup",
        "x-request-bod-class": "com.ibm.commerce.catalog.facade.datatypes.ChangeCatalogGroupType",
        "x-request-verb": "change",
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "CatalogGroup": {
        "type": "object",
        "properties": {
          "displaySequence": {
            "type": "number",
            "description": "The display sequence of the catalog group.",
            "format": "double",
            "x-entity-path": "displaySequence"
          },
          "id": {
            "type": "string",
            "description": "The internal unique reference number of the catalog group. In Delete, either this field or the PartNumber is required.",
            "x-entity-path": "catalogGroupIdentifier/uniqueID",
            "readOnly": true
          },
          "identifier": {
            "type": "string",
            "description": "The external name that is used to identify the catalog group.",
            "x-entity-path": "catalogGroupIdentifier/externalIdentifier/groupIdentifier"
          },
          "longDescription": {
            "type": "string",
            "description": "The catalog group long description.",
            "x-entity-path": "description[1]/longDescription"
          },
          "name": {
            "type": "string",
            "description": "The catalog group name.",
            "x-entity-path": "description[1]/name"
          },
          "ownerId": {
            "type": "string",
            "description": "The numeric identifier of the organization that owns the catalog group.",
            "x-entity-path": "catalogGroupIdentifier/externalIdentifier/ownerID"
          },
          "owningStoreDirectory": {
            "type": "string",
            "description": "The owningStoreDirectory of the catalog group.",
            "x-entity-path": "owningStoreDirectory"
          },
          "parentCatalogGroupId": {
            "type": "string",
            "description": "The unique numeric ID for identifying the parent catalog group.",
            "x-entity-path": "parentCatalogGroupIdentifier/uniqueID"
          },
          "shortDescription": {
            "type": "string",
            "description": "The catalog group short description.",
            "x-entity-path": "description[1]/shortDescription"
          },
          "storeId": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the store.",
            "format": "int32",
            "x-entity-path": "catalogGroupIdentifier/externalIdentifier/storeIdentifier/uniqueID"
          },
          "topCatalogGroup": {
            "type": "boolean",
            "description": "The top category indicator"
          }
        },
        "description": "A catalog group.",
        "x-entity-class": "com.ibm.commerce.catalog.facade.datatypes.CatalogGroupType"
      },
      "CatalogGroupCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The number of catalog groups found.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogGroup"
            }
          }
        },
        "description": "A collection of catalog groups."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
