オンラインの返品に関するポリシー管理を移行する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Content API リソース OnlineReturnPolicy
と、ReturnPolicyPolicy
や ReturnPolicySeasonalOverride
などの関連フィールドが変更されました。
Content API の returnpolicy
リソースに相当する Merchant API は accounts.onlineReturnPolicies
です。
次の表に、OnlineReturnPolicy
の変更点を示します。
Content API |
Merchant API |
"country": string
|
"countries": [ string ]
|
"policy": {
object (ReturnPolicyPolicy)
}
|
"policy": {
object (Policy)
}
|
"seasonalOverrides": [
{
object (ReturnPolicySeasonalOverride)
}
]
|
"seasonalOverrides": [
{
object (SeasonalOverride)
}
],
|
nonFreeReturnReasons": [ string ]
|
このフィールドは削除されます。
|
kind
|
このフィールドは削除されます。
|
"returnShippingFee": {
object (Price)
}
|
"returnShippingFee": {
object (ReturnShippingFee)
}
|
また、Merchant API では多くのフィールドが新しく追加されています。
Merchant API フィールド |
説明 |
"restockingFee": {
object (RestockingFee)
},
|
省略可。すべての返品理由カテゴリに適用される返品手数料。値が設定されていない場合、これは無料の再入荷手数料として扱われます。
|
"returnMethods": [
enum (ReturnMethod)
]
|
省略可。お客様が商品を返品できる返品方法。返品ポリシーのタイプが noReturns でない限り、この値は空にできません。
|
"itemConditions": [ enum (ItemCondition) ],
|
省略可。返品可能な商品の状態は、返品に関するポリシーのタイプが noReturns. でない限り、空にすることはできません。 |
"returnShippingFee": {
object (ReturnShippingFee)
}
|
省略可。返品送料。お客様が返品ラベルをダウンロードして印刷する必要がある場合にのみ設定します。
|
"returnPolicyUri": string
|
必須。返品に関するポリシーの URI。Google はこれを使用してポリシーを検証します。有効な URL を指定する必要があります。
|
"acceptDefectiveOnly": boolean
|
必須。販売者が返品を受け付けるのは欠陥のある商品のみであることを指定します。
|
"processRefundDays": integer
|
省略可。販売者が払い戻しを処理するのにかかる日数を指定します。
|
"acceptExchange": boolean
|
省略可。販売者がお客様による商品の交換を許可するかどうかを指定します。 |
"returnLabelSource": enum (ReturnLabelSource)
|
返品ラベルのソースを指定します。返品方法が BY_MAIL の場合は必須です。
|
ReturnPolicyPolicy
Content API の ReturnPolicyPolicy
は、Merchant API では Policy
になります。フィールドの変更内容は次のとおりです。
Content API |
Merchant API |
"type": string,
|
"type": enum (Type)
有効な値は次のとおりです。
NUMBER_OF_DAYS_AFTER_DELIVERY, NO_RETURNS or LIFETIME_RETURNS.
|
"numberOfDays": string
|
"days": string
|
"lastReturnDate": string
|
代わりに days を使用してください。これは、商品が配達されてから返品できる日数を表します。1 日は配達タイムスタンプから 24 時間後と定義されます。NUMBER_OF_DAYS_AFTER_DELIVERY の返品に必要です。 |
ReturnPolicySeasonalOverride
Content API の ReturnPolicySeasonalOverride
は、Merchant API では SeasonalOverride
になります。フィールドの変更に加えて、追加フィールド return_window
は returnDays
または returnUntilDate
のいずれかになるユニオンです。
"returnDays": integer,
"returnUntilDate": {
object (Date)
それぞれの意味は次のとおりです。
returnDays
: 商品の返品が可能な(お届け日からの)日数。
returnUntilDate
: 商品を返品できる固定の終了日。
フィールドの変更内容は次のとおりです。
Content API |
Merchant API |
"name": string
|
"label": string
|
"startDate": string
|
"startDate": {
object (Date)
}
|
"endDate": string
|
"endDate": {
object (Date)
}
|
"policy": {
object (ReturnPolicyPolicy)
}
|
policy を代わりに使用してください。
|
その他のオブジェクトの定義
新しい Merchant API オブジェクトの定義
RestockingFee
ReturnMethod
ItemCondition
ReturnShippingFee
Type
ReturnLabelSource
accounts.onlineReturnPolicies
をご覧ください。
メソッド
Merchant API では、Content API のメソッドからいくつかの変更も加えられています。
Content API |
Merchant API |
customBatch
|
Merchant API では、異なるアプローチが採用されています。
同時リクエスト用にコードをリファクタリングするをご覧ください。 |
delete
|
delete
|
get
|
get
|
insert
|
create
|
list
|
list
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-08 UTC。
[null,null,["最終更新日 2025-08-08 UTC。"],[],[],null,["# Migrate online return policy management\n\nThe Content API resource `OnlineReturnPolicy` and associated fields including\n`ReturnPolicyPolicy` and `ReturnPolicySeasonalOverride` have changed.\n\nThe Merchant API equivalent of the\n[`returnpolicy`](/shopping-content/reference/rest/v2.1/returnpolicy) resource in\nContent API is\n[`accounts.onlineReturnPolicies`](/merchant/api/reference/rest/accounts_v1/accounts.onlineReturnPolicies).\n\nThis table explains what changes in `OnlineReturnPolicy`.\n\n| Content API | Merchant API |\n|------------------------------------------------------------------------|-------------------------------------------------------------|\n| ` \"country\": string ` | ` \"countries\": [ string ] ` |\n| ` \"policy\": { object (ReturnPolicyPolicy) } ` | ` \"policy\": { object (Policy) } ` |\n| ` \"seasonalOverrides\": [ { object (ReturnPolicySeasonalOverride) } ] ` | ` \"seasonalOverrides\": [ { object (SeasonalOverride) } ], ` |\n| ` nonFreeReturnReasons\": [ string ] ` | This field goes away.` ` |\n| `kind ` | This field goes away.` ` |\n| ` \"returnShippingFee\": { object (Price) } ` | ` \"returnShippingFee\": { object (ReturnShippingFee) } ` |\n\nIn addition, a number of fields are new with Merchant API.\n\n| Merchant API field | Description |\n|---------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` \"restockingFee\": { object (RestockingFee) }, ` | Optional. The restocking fee that applies to all return reason categories. This would be treated as a free restocking fee if the value is not set. ` ` |\n| ` \"returnMethods\": [ enum (ReturnMethod) ] ` | Optional. The return methods of how customers can return an item. This value is required to not be empty unless the type of return policy is noReturns. ` ` |\n| ` \"itemConditions\": [ enum (ItemCondition) ], ` | Optional. The item conditions accepted for returns must not be empty unless the type of return policy is `noReturns.` |\n| ` \"returnShippingFee\": { object (ReturnShippingFee) } ` | Optional. The return shipping fee. Should be set only when customer need to download and print the return label. ` ` |\n| ` \"returnPolicyUri\": string ` | Required. The return policy URI. Google uses this to validate the policy. It must be a valid URL. ` ` |\n| ` \"acceptDefectiveOnly\": boolean ` | Required. Specifies that a merchant accepts only defective products for returns. ` ` |\n| ` \"processRefundDays\": integer ` | Optional. Specifies the number of days it takes for merchants to process refunds. ` ` |\n| ` \"acceptExchange\": boolean ` | Optional. Specifies whether the merchant allows customers to exchange products. |\n| ` \"returnLabelSource\": enum (ReturnLabelSource) ` | Specifies the return label source. Required when return method is BY_MAIL. ` ` |\n\nReturnPolicyPolicy\n------------------\n\nThe Content API `ReturnPolicyPolicy` becomes `Policy` in Merchant API. Here's\nhow the fields have changed.\n\n| Content API | Merchant API |\n|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` \"type\": string, ` | ` \"type\": enum (Type) ` Possible values include ` NUMBER_OF_DAYS_AFTER_DELIVERY, NO_RETURNS or LIFETIME_RETURNS. ` |\n| ` \"numberOfDays\": string ` | ` \"days\": string ` |\n| ` \"lastReturnDate\": string ` | Use `days` instead. It represents the number of days items can be returned after delivery, where one day is defined as 24 hours after the delivery timestamp. Required for `NUMBER_OF_DAYS_AFTER_DELIVERY` returns. |\n\nReturnPolicySeasonalOverride\n----------------------------\n\nThe Content API `ReturnPolicySeasonalOverride` becomes `SeasonalOverride` in\nMerchant API. In addition to the changes in fields, the additional field\n`return_window` is a union that can be either `returnDays` or `returnUntilDate`: \n\n \"returnDays\": integer,\n \"returnUntilDate\": {\n object (Date)\n\nThey have the following meanings:\n\n- `returnDays`: Number of days (from the delivery date) that the product can still be returned.\n- `returnUntilDate`: Fixed end date until which the product can be returned.\n\nHere's how the fields have changed.\n\n| Content API | Merchant API |\n|-----------------------------------------------|------------------------------------|\n| ` \"name\": string ` | ` \"label\": string ` |\n| ` \"startDate\": string ` | ` \"startDate\": { object (Date) } ` |\n| ` \"endDate\": string ` | ` \"endDate\": { object (Date) } ` |\n| ` \"policy\": { object (ReturnPolicyPolicy) } ` | Use `policy` instead. |\n\nDefinitions of other objects\n----------------------------\n\nFor definitions of the new Merchant API objects\n\n- `RestockingFee`\n- `ReturnMethod`\n- `ItemCondition`\n- `ReturnShippingFee`\n- `Type`\n- `ReturnLabelSource`\n\nsee\n[`accounts.onlineReturnPolicies`](/merchant/api/reference/rest/accounts_v1/accounts.onlineReturnPolicies).\n\nMethods\n-------\n\nWith Merchant API, there are some changes from the Content API methods as well.\n\n| Content API | Merchant API |\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` customBatch ` | With Mechant API, there is a different approach. See [Refactor code for concurrent requests.](/merchant/api/guides/compatibility/refactor-concurrent-requests) |\n| ` delete ` | ` delete ` |\n| ` get ` | ` get ` |\n| ` insert ` | `create` |\n| ` list ` | ` list ` |"]]