Product Collections
Product Collection की इमेज अपडेट करें
Product collection के लिए इमेज अपलोड करने हेतु presigned S3 URL प्राप्त करें। इमेज को लौटाए गए URL पर 60 सेकंड के भीतर अपलोड करें।
PUT
/
product-collections
/
{id}
/
images
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const response = await client.productCollections.updateImages('pdc_8BWv0hojwUH7iCDabr0NI');
console.log(response.image_id);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
)
response = client.product_collections.update_images(
id="pdc_8BWv0hojwUH7iCDabr0NI",
)
print(response.image_id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
response, err := client.ProductCollections.UpdateImages(
context.TODO(),
"pdc_8BWv0hojwUH7iCDabr0NI",
dodopayments.ProductCollectionUpdateImagesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ImageID)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.productcollections.ProductCollectionUpdateImagesParams;
import com.dodopayments.api.models.productcollections.ProductCollectionUpdateImagesResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
ProductCollectionUpdateImagesResponse response = client.productCollections().updateImages("pdc_8BWv0hojwUH7iCDabr0NI");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.productcollections.ProductCollectionUpdateImagesParams
import com.dodopayments.api.models.productcollections.ProductCollectionUpdateImagesResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val response: ProductCollectionUpdateImagesResponse = client.productCollections().updateImages("pdc_8BWv0hojwUH7iCDabr0NI")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.product_collections.update_images("pdc_8BWv0hojwUH7iCDabr0NI")
puts(response)<?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 {
$response = $client->productCollections->updateImages(
'pdc_8BWv0hojwUH7iCDabr0NI', forceUpdate: true
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.ProductCollections;
DodoPaymentsClient client = new();
ProductCollectionUpdateImagesParams parameters = new()
{
ID = "pdc_8BWv0hojwUH7iCDabr0NI"
};
var response = await client.ProductCollections.UpdateImages(parameters);
Console.WriteLine(response);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let result = client
.product_collections()
.update_images()
.id(id)
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request PUT \
--url https://test.dodopayments.com/product-collections/{id}/images \
--header 'Authorization: Bearer <token>'{
"url": "<string>",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}प्राधिकरण
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
पथ पैरामीटर
Product Collection Id
क्वेरी पैरामीटर
If true, generates a new image ID to force cache invalidation
अंतिम संशोधन 6 अगस्त 2026
वाज़ दिस पेज हेल्पफुल
⌘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
});
const response = await client.productCollections.updateImages('pdc_8BWv0hojwUH7iCDabr0NI');
console.log(response.image_id);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
)
response = client.product_collections.update_images(
id="pdc_8BWv0hojwUH7iCDabr0NI",
)
print(response.image_id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
response, err := client.ProductCollections.UpdateImages(
context.TODO(),
"pdc_8BWv0hojwUH7iCDabr0NI",
dodopayments.ProductCollectionUpdateImagesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.ImageID)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.productcollections.ProductCollectionUpdateImagesParams;
import com.dodopayments.api.models.productcollections.ProductCollectionUpdateImagesResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
ProductCollectionUpdateImagesResponse response = client.productCollections().updateImages("pdc_8BWv0hojwUH7iCDabr0NI");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.productcollections.ProductCollectionUpdateImagesParams
import com.dodopayments.api.models.productcollections.ProductCollectionUpdateImagesResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val response: ProductCollectionUpdateImagesResponse = client.productCollections().updateImages("pdc_8BWv0hojwUH7iCDabr0NI")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.product_collections.update_images("pdc_8BWv0hojwUH7iCDabr0NI")
puts(response)<?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 {
$response = $client->productCollections->updateImages(
'pdc_8BWv0hojwUH7iCDabr0NI', forceUpdate: true
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.ProductCollections;
DodoPaymentsClient client = new();
ProductCollectionUpdateImagesParams parameters = new()
{
ID = "pdc_8BWv0hojwUH7iCDabr0NI"
};
var response = await client.ProductCollections.UpdateImages(parameters);
Console.WriteLine(response);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let result = client
.product_collections()
.update_images()
.id(id)
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request PUT \
--url https://test.dodopayments.com/product-collections/{id}/images \
--header 'Authorization: Bearer <token>'{
"url": "<string>",
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}