Brands
Cập nhật hình ảnh thương hiệu
Nhận URL S3 được ký trước để tải hình ảnh lên cho một thương hiệu. Tải hình ảnh lên URL được trả về trong vòng 60 giây.
PUT
/
brands
/
{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.brands.updateImages('brnd_8dFiAW42v28JzhlVSocjq');
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.brands.update_images(
"brnd_8dFiAW42v28JzhlVSocjq",
)
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.Brands.UpdateImages(context.TODO(), "brnd_8dFiAW42v28JzhlVSocjq")
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.brands.BrandUpdateImagesParams;
import com.dodopayments.api.models.brands.BrandUpdateImagesResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
BrandUpdateImagesResponse response = client.brands().updateImages("brnd_8dFiAW42v28JzhlVSocjq");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.brands.BrandUpdateImagesParams
import com.dodopayments.api.models.brands.BrandUpdateImagesResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val response: BrandUpdateImagesResponse = client.brands().updateImages("brnd_8dFiAW42v28JzhlVSocjq")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.brands.update_images("brnd_8dFiAW42v28JzhlVSocjq")
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->brands->updateImages('brnd_8dFiAW42v28JzhlVSocjq');
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Brands;
DodoPaymentsClient client = new();
BrandUpdateImagesParams parameters = new()
{
ID = "brnd_8dFiAW42v28JzhlVSocjq"
};
var response = await client.Brands.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
.brands()
.update_images()
.id(id)
.await?;
println!("{result:?}");
Ok(())
}curl --request PUT \
--url https://test.dodopayments.com/brands/{id}/images \
--header 'Authorization: Bearer <token>'{
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}Ủy quyền
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Tham số đường dẫn
Brand Id
Lần sửa đổi cuối 6 tháng 8, 2026
Trang này có hữu ích không?
⌘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.brands.updateImages('brnd_8dFiAW42v28JzhlVSocjq');
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.brands.update_images(
"brnd_8dFiAW42v28JzhlVSocjq",
)
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.Brands.UpdateImages(context.TODO(), "brnd_8dFiAW42v28JzhlVSocjq")
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.brands.BrandUpdateImagesParams;
import com.dodopayments.api.models.brands.BrandUpdateImagesResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
BrandUpdateImagesResponse response = client.brands().updateImages("brnd_8dFiAW42v28JzhlVSocjq");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.brands.BrandUpdateImagesParams
import com.dodopayments.api.models.brands.BrandUpdateImagesResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val response: BrandUpdateImagesResponse = client.brands().updateImages("brnd_8dFiAW42v28JzhlVSocjq")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.brands.update_images("brnd_8dFiAW42v28JzhlVSocjq")
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->brands->updateImages('brnd_8dFiAW42v28JzhlVSocjq');
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Brands;
DodoPaymentsClient client = new();
BrandUpdateImagesParams parameters = new()
{
ID = "brnd_8dFiAW42v28JzhlVSocjq"
};
var response = await client.Brands.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
.brands()
.update_images()
.id(id)
.await?;
println!("{result:?}");
Ok(())
}curl --request PUT \
--url https://test.dodopayments.com/brands/{id}/images \
--header 'Authorization: Bearer <token>'{
"image_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}