# Product Categories

## get_product_categories

`TOOL get_product_categories`

Get list of product categories for the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `search` (argument, string, optional) - Search term for category name
  Type: string
  
  Search term for category name

- `relations` (argument, array, optional) - Relations to include (e.g., ["products", "image"])
  Type: array
  
  Relations to include (e.g., ["products", "image"])
  
  Items:
    Type: string

- `langCode` (argument, string, optional) - Language code for translations
  Type: string
  
  Language code for translations

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_product_categories",
    "arguments": {
        "page": 1,
        "limit": 10,
        "search": "string",
        "relations": [
          "string"
        ],
        "langCode": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_product_categories",
  "arguments": {
    "page": 1,
    "limit": 10,
    "search": "string",
    "relations": [
      "string"
    ],
    "langCode": "string"
  }
});
```

### Python

```python
result = await session.call_tool("get_product_categories", arguments={
  "page": 1,
  "limit": 10,
  "search": "string",
  "relations": [
    "string"
  ],
  "langCode": "string"
})
```


## get_product_category_count

`TOOL get_product_category_count`

Get product category count in the authenticated user's organization

Authentication: no security requirement declared for this operation.

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_product_category_count",
    "arguments": {}
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_product_category_count",
  "arguments": {}
});
```

### Python

```python
result = await session.call_tool("get_product_category_count", arguments={})
```


## create_product_category

`TOOL create_product_category`

Create a new product category in the authenticated user's organization

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

- `category_data` (required)
  Type: object
  
  The data for creating the product category
  
  - `name` (required)
    Type: string
    
    The name (required)
  
  - `translations` (optional)
    Type: array
    
    Category translations for different languages
    
    Items:
      Type: object
      
      - `languageCode` (required)
        Type: string
      
      - `name` (required)
        Type: string
      
      - `description` (optional)
        Type: string
  
  Additional properties: 
    Type: unknown

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_product_category",
    "arguments": {
        "category_data": {
          "name": "string",
          "translations": [
            {
              "languageCode": "string",
              "name": "string",
              "description": "string"
            }
          ]
        }
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "create_product_category",
  "arguments": {
    "category_data": {
      "name": "string",
      "translations": [
        {
          "languageCode": "string",
          "name": "string",
          "description": "string"
        }
      ]
    }
  }
});
```

### Python

```python
result = await session.call_tool("create_product_category", arguments={
  "category_data": {
    "name": "string",
    "translations": [
      {
        "languageCode": "string",
        "name": "string",
        "description": "string"
      }
    ]
  }
})
```


## update_product_category

`TOOL update_product_category`

Update an existing product category

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

- `id` (required)
  Type: string, uuid
  
  The product category ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `category_data` (required)
  Type: object
  
  The data for updating the product category
  
  - `translations` (optional)
    Type: array
    
    Category translations for different languages
    
    Items:
      Type: object
      
      - `languageCode` (required)
        Type: string
      
      - `name` (required)
        Type: string
      
      - `description` (optional)
        Type: string
  
  Additional properties: 
    Type: unknown

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_product_category",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "category_data": {
          "translations": [
            {
              "languageCode": "string",
              "name": "string",
              "description": "string"
            }
          ]
        }
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "update_product_category",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "category_data": {
      "translations": [
        {
          "languageCode": "string",
          "name": "string",
          "description": "string"
        }
      ]
    }
  }
});
```

### Python

```python
result = await session.call_tool("update_product_category", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "category_data": {
    "translations": [
      {
        "languageCode": "string",
        "name": "string",
        "description": "string"
      }
    ]
  }
})
```


## get_products_by_category

`TOOL get_products_by_category`

Get all products in a specific category

Authentication: no security requirement declared for this operation.

Parameters:

- `categoryId` (argument, string, uuid, required) - The product category ID
  Type: string, uuid
  
  The product category ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `enabled` (argument, boolean, optional) - Filter by enabled status
  Type: boolean
  
  Filter by enabled status

- `relations` (argument, array, optional) - Relations to include
  Type: array
  
  Relations to include
  
  Items:
    Type: string

- `langCode` (argument, string, optional) - Language code for translations
  Type: string
  
  Language code for translations

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_products_by_category",
    "arguments": {
        "categoryId": "550e8400-e29b-41d4-a716-446655440000",
        "page": 1,
        "limit": 10,
        "enabled": true,
        "relations": [
          "string"
        ],
        "langCode": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_products_by_category",
  "arguments": {
    "categoryId": "550e8400-e29b-41d4-a716-446655440000",
    "page": 1,
    "limit": 10,
    "enabled": true,
    "relations": [
      "string"
    ],
    "langCode": "string"
  }
});
```

### Python

```python
result = await session.call_tool("get_products_by_category", arguments={
  "categoryId": "550e8400-e29b-41d4-a716-446655440000",
  "page": 1,
  "limit": 10,
  "enabled": true,
  "relations": [
    "string"
  ],
  "langCode": "string"
})
```
