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

# Update Group Item

> Update a product item within a product collection group.



## OpenAPI

````yaml patch /product-collections/{id}/groups/{group_id}/items/{item_id}
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.105.0
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /product-collections/{id}/groups/{group_id}/items/{item_id}:
    patch:
      tags:
        - Product Collections
      operationId: patch_product_collection_group_product
      parameters:
        - name: id
          in: path
          description: Product Collection Id
          required: true
          schema:
            type: string
        - name: group_id
          in: path
          description: Product Collection Group Id
          required: true
          schema:
            type: string
            format: uuid
        - name: item_id
          in: path
          description: Collection item Id (product membership in group)
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchProductCollectionGroupProductRequest'
        required: true
      responses:
        '200':
          description: Product updated successfully
        '404':
          description: Collection, Group, or Product not found
        '422':
          description: Invalid Request Object or Parameters
        '500':
          description: Something went wrong :(
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import DodoPayments from 'dodopayments';


            const client = new DodoPayments({
              bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
            });


            await
            client.productCollections.groups.items.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            {
              id: 'id',
              group_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              status: true,
            });
        - lang: Python
          source: |-
            import os
            from dodopayments import DodoPayments

            client = DodoPayments(
                bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
            )
            client.product_collections.groups.items.update(
                item_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                id="id",
                group_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                status=True,
            )
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\terr := client.ProductCollections.Groups.Items.Update(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tdodopayments.ProductCollectionGroupItemUpdateParams{\n\t\t\tStatus: dodopayments.F(true),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n"
        - lang: Java
          source: >-
            package com.dodopayments.api.example;


            import com.dodopayments.api.client.DodoPaymentsClient;

            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;

            import
            com.dodopayments.api.models.productcollections.groups.items.ItemUpdateParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

                    ItemUpdateParams params = ItemUpdateParams.builder()
                        .id("id")
                        .groupId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                        .itemId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                        .status(true)
                        .build();
                    client.productCollections().groups().items().update(params);
                }
            }
        - lang: Kotlin
          source: >-
            package com.dodopayments.api.example


            import com.dodopayments.api.client.DodoPaymentsClient

            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient

            import
            com.dodopayments.api.models.productcollections.groups.items.ItemUpdateParams


            fun main() {
                val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

                val params: ItemUpdateParams = ItemUpdateParams.builder()
                    .id("id")
                    .groupId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                    .itemId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                    .status(true)
                    .build()
                client.productCollections().groups().items().update(params)
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

            dodo_payments = Dodopayments::Client.new(
              bearer_token: "My Bearer Token",
              environment: "test_mode" # defaults to "live_mode"
            )

            result = dodo_payments.product_collections.groups.items.update(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              id: "id",
              group_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              status: true
            )

            puts(result)
        - lang: PHP
          source: |-
            <?php

            require_once dirname(__DIR__) . '/vendor/autoload.php';

            use Dodopayments\Client;
            use Dodopayments\Core\Exceptions\APIException;

            $client = new Client(
              bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
              environment: 'test_mode',
            );

            try {
              $result = $client->productCollections->groups->items->update(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                id: 'id',
                groupID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                status: true,
              );

              var_dump($result);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using DodoPayments.Client;
            using DodoPayments.Client.Models.ProductCollections.Groups.Items;

            DodoPaymentsClient client = new();

            ItemUpdateParams parameters = new()
            {
                ID = "id",
                GroupID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                ItemID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                Status = true,
            };

            await client.ProductCollections.Groups.Items.Update(parameters);
components:
  schemas:
    PatchProductCollectionGroupProductRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: boolean
          description: Status of the product in the group
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````