> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# BlogCategoryServiceImpl

> Calling public service methods through the REST API: blogCategoryServiceImpl

<ResponseField name="beanId" type="string">
  The Spring bean identifier containing the service being called.

  blogCategoryServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Bean scope. Use PROTOTYPE for service calls.
</ResponseField>

<ResponseField name="functionName" type="string">
  The public service method name shown in the signature below.
</ResponseField>

<ResponseField name="args" type="object[]">
  The method argument array. Each argument is passed as an object with index 0, 1, and so on; the value must match the Java parameter type.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: en
Site-Context: my-site
Authorization: Bearer <token>
```

Send `Lang-Context` and `Site-Context` with every request. For protected methods, send the JWT in the `Authorization` header as `Bearer <token>`.

**Access:** ADMIN. **Bearer Token:** required.

* GUEST — unauthenticated users; only whitelist services are available.
* USER — authentication is required; methods with USER checks are available.
* ADMIN — full access to public methods of all services.
* If a method checks a role internally, GUEST may receive null.

## Methods

<ResponseField name="getRepository" type="BlogCategoryRepository">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### getRepository

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "getRepository",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="searchCategories" type="List<BlogCategory>">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `query`  | `String` | Passed through `args[0].0`. |
  | `from`   | `String` | Passed through `args[1].1`. |
  | `to`     | `String` | Passed through `args[2].2`. |

  ### searchCategories

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "searchCategories",
    "args": [
      {
        "0": null,
        "1": null,
        "2": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="createCategory" type="Optional<BlogCategory>">
  | Argument        | Type                            | Description                 |
  | --------------- | ------------------------------- | --------------------------- |
  | `categoryAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### createCategory

  Example JSON request object:

  ```json theme={null}
  {
      "id":  null,
      "name":  null,
      "parentId":  null,
      "description":  null,
      "active":  false,
      "keywords":  null,
      "searchTerms":  null,
      "translations":  null,
      "containers":  null,
      "children":  null,
      "imageURLs":  null
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "createCategory",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="addChildCategory" type="BlogCategory">
  | Argument   | Type     | Description                 |
  | ---------- | -------- | --------------------------- |
  | `parentId` | `String` | Passed through `args[0].0`. |
  | `childId`  | `String` | Passed through `args[1].1`. |

  ### addChildCategory

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "addChildCategory",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="updateCategory" type="BlogCategory">
  | Argument        | Type                            | Description                 |
  | --------------- | ------------------------------- | --------------------------- |
  | `categoryAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### updateCategory

  Example JSON request object:

  ```json theme={null}
  {
      "id":  null,
      "name":  null,
      "parentId":  null,
      "description":  null,
      "active":  false,
      "keywords":  null,
      "searchTerms":  null,
      "translations":  null,
      "containers":  null,
      "children":  null,
      "imageURLs":  null
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "updateCategory",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeCategoryFromTranslation" type="void">
  | Argument        | Type     | Description                 |
  | --------------- | -------- | --------------------------- |
  | `categoryId`    | `String` | Passed through `args[0].0`. |
  | `translationId` | `String` | Passed through `args[1].1`. |

  ### removeCategoryFromTranslation

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeCategoryFromTranslation",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeCategoryWithDescendants" type="void">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `itemId` | `String` | Passed through `args[0].0`. |

  ### removeCategoryWithDescendants

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeCategoryWithDescendants",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeContainerFromBlogCategory" type="void">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `containerId` | `String` | Passed through `args[0].0`. |
  | `categoryId`  | `String` | Passed through `args[1].1`. |

  ### removeContainerFromBlogCategory

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeContainerFromBlogCategory",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="removeCategoriesByIds" type="void">
  | Argument        | Type                | Description                 |
  | --------------- | ------------------- | --------------------------- |
  | `categoriesIds` | `ArrayList<String>` | Passed through `args[0].0`. |

  ### removeCategoriesByIds

  ```json theme={null}
  {
    "beanId": "blogCategoryServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "removeCategoriesByIds",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>
