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

# Rename Product Group

> Rename a product group. Its products stay in it.

[Subtotal Connector tool: rename\_product\_group](/docs/connector/tools.md#rename_product_group)

Renames a group; its products stay in it. A name another of your groups uses returns `409`, and a group that isn't yours returns `404`, like an unknown id.

Call it with your API key, or with a [Subtotal Connector](/docs/connector/introduction.md) OAuth token that includes `product_groups:write`. A token without it receives `403 insufficient_scope`. [Partner app](/docs/partner-apps/introduction.md#fixed-permissions) tokens don't include it.


## OpenAPI

````yaml patch /product-groups/{product_group_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /product-groups/{product_group_id}:
    patch:
      tags:
        - product groups
      summary: Rename Product Group
      description: Rename a product group. Its products stay in it.
      operationId: rename_product_group_product_groups__product_group_id__patch
      parameters:
        - name: product_group_id
          in: path
          required: true
          schema:
            type: string
            description: The group's `product_group_id`
            title: Product Group Id
          description: The group's `product_group_id`
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductGroupNameRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductGroupSummary'
        '404':
          description: Product group not found
        '409':
          description: >-
            You already have another group with this name (names are
            case-insensitive)
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ProductGroupNameRequest:
      properties:
        name:
          type: string
          maxLength: 60
          minLength: 1
          title: Name
      type: object
      required:
        - name
      title: ProductGroupNameRequest
      description: >-
        Create / rename body (ENG-3282). Stripped first so a whitespace-only
        name cannot satisfy min_length.
    ProductGroupSummary:
      properties:
        product_group_id:
          type: string
          title: Product Group Id
        name:
          type: string
          title: Name
        product_count:
          type: integer
          title: Product Count
        creation_date:
          type: string
          format: date-time
          title: Creation Date
      type: object
      required:
        - product_group_id
        - name
        - product_count
        - creation_date
      title: ProductGroupSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.