Product Collections
Actualizar Grupo de Colección de Productos
Actualizar un grupo dentro de una colección de productos.
PATCH
/
product-collections
/
{id}
/
groups
/
{group_id}
JavaScript
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.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
id: 'pdc_8BWv0hojwUH7iCDabr0NI',
});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.update(
group_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
id="pdc_8BWv0hojwUH7iCDabr0NI",
)package main
import (
"context"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
err := client.ProductCollections.Groups.Update(
context.TODO(),
"pdc_8BWv0hojwUH7iCDabr0NI",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
dodopayments.ProductCollectionGroupUpdateParams{},
)
if err != nil {
panic(err.Error())
}
}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.GroupUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
GroupUpdateParams params = GroupUpdateParams.builder()
.id("pdc_8BWv0hojwUH7iCDabr0NI")
.groupId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.build();
client.productCollections().groups().update(params);
}
}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.GroupUpdateParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val params: GroupUpdateParams = GroupUpdateParams.builder()
.id("pdc_8BWv0hojwUH7iCDabr0NI")
.groupId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.build()
client.productCollections().groups().update(params)
}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.update(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
id: "pdc_8BWv0hojwUH7iCDabr0NI"
)
puts(result)<?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->update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
id: 'pdc_8BWv0hojwUH7iCDabr0NI',
groupName: 'group_name',
productOrder: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
status: true,
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}using DodoPayments.Client;
using DodoPayments.Client.Models.ProductCollections.Groups;
DodoPaymentsClient client = new();
GroupUpdateParams parameters = new()
{
ID = "pdc_8BWv0hojwUH7iCDabr0NI",
GroupID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
};
await client.ProductCollections.Groups.Update(parameters);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let group_id = "group_id";
let result = client
.product_collections()
.groups()
.update()
.id(id)
.group_id(group_id)
.body(Default::default())
.await?;
println!("{result:?}");
Ok(())
}curl --request PATCH \
--url https://test.dodopayments.com/product-collections/{id}/groups/{group_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"group_name": "<string>",
"product_order": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"status": true
}
'Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
Product Collection Id
Product Collection Group Id
Cuerpo
application/json
Respuesta
Group updated successfully
Última modificación el 22 de mayo de 2026
¿Esta página le ayudó?
Anterior
Eliminar Grupo de Colección de ProductosEliminar un grupo de una colección de productos.
Siguiente
⌘I
JavaScript
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.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
id: 'pdc_8BWv0hojwUH7iCDabr0NI',
});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.update(
group_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
id="pdc_8BWv0hojwUH7iCDabr0NI",
)package main
import (
"context"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
err := client.ProductCollections.Groups.Update(
context.TODO(),
"pdc_8BWv0hojwUH7iCDabr0NI",
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
dodopayments.ProductCollectionGroupUpdateParams{},
)
if err != nil {
panic(err.Error())
}
}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.GroupUpdateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
GroupUpdateParams params = GroupUpdateParams.builder()
.id("pdc_8BWv0hojwUH7iCDabr0NI")
.groupId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.build();
client.productCollections().groups().update(params);
}
}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.GroupUpdateParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val params: GroupUpdateParams = GroupUpdateParams.builder()
.id("pdc_8BWv0hojwUH7iCDabr0NI")
.groupId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.build()
client.productCollections().groups().update(params)
}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.update(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
id: "pdc_8BWv0hojwUH7iCDabr0NI"
)
puts(result)<?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->update(
'182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
id: 'pdc_8BWv0hojwUH7iCDabr0NI',
groupName: 'group_name',
productOrder: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
status: true,
);
var_dump($result);
} catch (APIException $e) {
echo $e->getMessage();
}using DodoPayments.Client;
using DodoPayments.Client.Models.ProductCollections.Groups;
DodoPaymentsClient client = new();
GroupUpdateParams parameters = new()
{
ID = "pdc_8BWv0hojwUH7iCDabr0NI",
GroupID = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
};
await client.ProductCollections.Groups.Update(parameters);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let group_id = "group_id";
let result = client
.product_collections()
.groups()
.update()
.id(id)
.group_id(group_id)
.body(Default::default())
.await?;
println!("{result:?}");
Ok(())
}curl --request PATCH \
--url https://test.dodopayments.com/product-collections/{id}/groups/{group_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"group_name": "<string>",
"product_order": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"status": true
}
'