Update a one-time product’s content. If the content has changed, a new immutable version is created automatically. If the content is identical to the current version, no new version is created.
POST /v1/actions/onetime-product/update-product
認証: API Key
商品のステータス(active/inactive)を変更するには ステータスの更新 エンドポイントを使用してください。このエンドポイントはコンテンツの更新のみに使用します。
リクエストボディ
フィールド 型 必須 説明 idstring はい 商品 ID(Short ID 形式 PROD_xxx) namestring はい 更新後の商品名 descriptionstring いいえ 更新後の説明 pricesobject はい 更新後のマルチ通貨価格マップ mediaarray いいえ 更新後のメディアアイテム successUrlstring いいえ 更新後のリダイレクト URL metadataobject いいえ 更新後のカスタムメタデータ
prices と media オブジェクトの形式については、商品の作成 を参照してください。
リクエスト例
SDK
TypeScript (fetch)
Java
Python
Go
Rust
C
C++
cURL
wget
const { product } = await client . onetimeProducts . update ({
id: "PROD_3kF9mNpQrStUvWxYz1A2bC" ,
name: "Premium Template Pack v2" ,
description: "75 premium design templates — expanded collection." ,
prices: {
USD: { amount: "59.00" , taxIncluded: false , taxCategory: TaxCategory . DigitalGoods },
EUR: { amount: "55.00" , taxIncluded: true , taxCategory: TaxCategory . DigitalGoods },
},
successUrl: "https://example.com/thank-you" ,
});
成功レスポンス (200)
{
"data" : {
"id" : "PROD_3kF9mNpQrStUvWxYz1A2bC" ,
"storeId" : "STO_2aUyqjCzEIiEcYMKj7TZtw" ,
"prodVersionId" : null ,
"testVersionId" : "PROD_8eH5iKlMnOpQrStUvWxYz2" ,
"prodStatus" : "inactive" ,
"testStatus" : "active" ,
"createdAt" : "2026-01-15T10:30:00.000Z" ,
"updatedAt" : "2026-01-15T11:00:00.000Z" ,
"version" : {
"id" : "PROD_8eH5iKlMnOpQrStUvWxYz2" ,
"productId" : "PROD_3kF9mNpQrStUvWxYz1A2bC" ,
"versionNumber" : 2 ,
"name" : "Premium Template Pack v2" ,
"description" : "75 premium design templates — expanded collection." ,
"prices" : {
"USD" : { "amount" : "59.00" , "taxIncluded" : false , "taxCategory" : "digital_goods" },
"EUR" : { "amount" : "55.00" , "taxIncluded" : true , "taxCategory" : "digital_goods" }
},
"media" : [],
"successUrl" : "https://example.com/thank-you" ,
"metadata" : null ,
"createdAt" : "2026-01-15T11:00:00.000Z"
}
}
}
レスポンスフィールド
商品作成のレスポンス と同じです。
商品バージョンはイミュータブル です。既存の注文は元のバージョンを保持します。新規購入は常に最新バージョンを使用します。送信されたコンテンツが現在のバージョンと同一の場合、新しいバージョンは作成されず、既存のバージョンが返されます。
エラーレスポンス
ステータス エラー 説明 400 Missing required field: idid not provided400 Missing required field: namename not provided400 Prices must not be emptyprices is missing or an empty object400 No version in current environmentProduct has no version in the current environment (test/prod) 404 Product not foundProduct does not exist or is not accessible