> ## 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.

# Update Product Group Products

> Add and/or remove products in one call, up to 500 ids each. Adding a product already in the group and removing one that isn't are no-ops. Only products in your catalog can be added: if any isn't, nothing changes and the call 404s without naming it.

[Subtotal Connector tool: update\_product\_group\_products](/docs/connector/tools.md#update_product_group_products)

Adds and removes products in one call, up to 500 product ids each. Adding a product already in the group, or removing one that isn't, changes nothing.

Only products from your [brand catalog](/docs/api-reference/products/get-products.md) can be added. If any product to add isn't in it, the call returns `404` and nothing changes.

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 put /product-groups/{product_group_id}/products
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /product-groups/{product_group_id}/products:
    put:
      tags:
        - product groups
      summary: Update Product Group Products
      description: >-
        Add and/or remove products in one call, up to 500 ids each. Adding a
        product already in the group and removing one that isn't are no-ops.
        Only products in your catalog can be added: if any isn't, nothing
        changes and the call 404s without naming it.
      operationId: >-
        update_product_group_products_product_groups__product_group_id__products_put
      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/UpdateProductGroupMembersRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductGroupSummary'
        '404':
          description: Product group not found, or a product to add isn't in your catalog
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateProductGroupMembersRequest:
      properties:
        add:
          items:
            type: string
          type: array
          maxItems: 500
          title: Add
        remove:
          items:
            type: string
          type: array
          maxItems: 500
          title: Remove
      type: object
      title: UpdateProductGroupMembersRequest
      description: >-
        One membership edit: products to add and/or remove. Adds are idempotent;
        removes of non-members are no-ops.
    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.