購物廣告和免費產品資訊的退貨設定

如果您是透過購物廣告或免費產品資訊刊登產品,可以使用 returnpolicyonline 建立、查看、編輯或刪除含有下列屬性的線上退貨政策:

透過購物廣告或免費產品資訊銷售的產品不需要退貨地址。

詳情請參閱「設定購物廣告和免費產品資訊的退貨政策」一文。

list

您可以使用 returnpolicyonline.list 列出所有現有的線上退貨政策。如要依 ID 查看特定退貨政策,請參閱 get

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline

以下是回應範例:

{
 "returnPolicies": [
   {
     "returnPolicyId": "transactions:US:default",
     "label": "default",
     "countries": [
       "GB"
     ],
     "policy": {
       "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
       "days": "90"
     },
     "restockingFee": {
       "fixedFee": {
         "value": "5.99",
         "currency": "GBP"
       }
     },
     "returnMethods": [
       "IN_STORE",
       "BY_MAIL"
     ],
     "itemConditions": [
       "NEW",
       "USED"
     ],
     "returnReasonCategoryInfo": [
       {
         "returnReasonCategory": "ITEM_DEFECT",
         "returnLabelSource": "DOWNLOAD_AND_PRINT",
         "returnShippingFee": {
           "type": "FIXED",
           "fixedFee": {
             "value": "0.00",
             "currency": "GBP"
           }
         }
       },
       {
         "returnReasonCategory": "BUYER_REMORSE",
         "returnLabelSource": "DOWNLOAD_AND_PRINT",
         "returnShippingFee": {
           "type": "FIXED",
           "fixedFee": {
             "value": "0.00",
             "currency": "GBP"
           }
         }
       }
     ],
     "returnPolicyUri": "https://www.example.com/return-policy"
   },
   {
     "returnPolicyId": "transactions:US:default",
     "label": "default120days",
     "countries": [
       "US",
       "FR"
     ],
     "name": "returnpolicy120days",
     "policy": {
       "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
       "days": "90"
     },
     "restockingFee": {
       "fixedFee": {
         "value": "0.00",
         "currency": "USD"
       }
     },
     "returnMethods": [
       "BY_MAIL"
     ],
     "itemConditions": [
       "NEW",
       "USED"
     ],
     "returnReasonCategoryInfo": [
       {
         "returnReasonCategory": "ITEM_DEFECT",
         "returnLabelSource": "DOWNLOAD_AND_PRINT",
         "returnShippingFee": {
           "type": "FIXED",
           "fixedFee": {
             "value": "0.00",
             "currency": "USD"
           }
         }
       },
       {
         "returnReasonCategory": "BUYER_REMORSE",
         "returnLabelSource": "DOWNLOAD_AND_PRINT",
         "returnShippingFee": {
           "type": "FIXED",
           "fixedFee": {
             "value": "0.00",
             "currency": "USD"
           }
         }
       }
     ],
     "returnPolicyUri": "https://www.example.com/return-policy"
   }
 ]
}

get

您可以使用 returnpolicyonline.getreturnPolicyId 前取得特定的退貨政策。這個方法會傳回單一退貨政策。如要一次查看所有退貨政策,請參閱 list

GET https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline/returnPolicyId

以下是回應範例:

{
  "returnPolicyId": "transactions:US:default",
  "label": "default",
  "countries": [
    "US"
  ],
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "restockingFee": {
    "fixedFee": {
      "value": "0.00",
      "currency": "USD"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    },
    {
      "returnReasonCategory": "BUYER_REMORSE",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

create

您可以使用 returnpolicyonline.create 新增退貨政策。回應會包含更新後的政策。

POST https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline

以下是要求範例:

{
  "returnPolicyId": "12345678",
  "label": "default90days",
  "name": "returnpolicy90days",
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "countries": [
    "US"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "restockingFee": {
    "fixedFee": {
      "currency": "USD",
      "value": "0.00"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

以下是回應範例:

{
  "returnPolicyId": "12345678",
  "label": "default90days",
  "countries": [
    "US"
  ],
  "name": "returnpolicy90days",
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "restockingFee": {
    "fixedFee": {
      "value": "0.00",
      "currency": "USD"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

patch

您可以使用 returnpolicyonline.patch,在 returnPolicyId前更新現有的線上退貨政策。

PATCH https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline/returnPolicyId

以下是要求範例:

{
  "returnPolicyId": "12345678",
  "label": "default90days",
  "countries": [
    "US",
    "FR"
  ],
  "name": "returnpolicy90days",
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "restockingFee": {
    "fixedFee": {
      "value": "0.00",
      "currency": "USD"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    },
    {
      "returnReasonCategory": "BUYER_REMORSE",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

以下是回應範例:

{
  "returnPolicyId": "12345678",
  "label": "default90days",
  "countries": [
    "US",
    "FR"
  ],
  "name": "returnpolicy90days",
  "policy": {
    "type": "NUMBER_OF_DAYS_AFTER_DELIVERY",
    "days": "90"
  },
  "restockingFee": {
    "fixedFee": {
      "value": "0.00",
      "currency": "USD"
    }
  },
  "returnMethods": [
    "BY_MAIL"
  ],
  "itemConditions": [
    "NEW",
    "USED"
  ],
  "returnReasonCategoryInfo": [
    {
      "returnReasonCategory": "ITEM_DEFECT",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    },
    {
      "returnReasonCategory": "BUYER_REMORSE",
      "returnLabelSource": "DOWNLOAD_AND_PRINT",
      "returnShippingFee": {
        "type": "FIXED",
        "fixedFee": {
          "value": "0.00",
          "currency": "USD"
        }
      }
    }
  ],
  "returnPolicyUri": "https://www.example.com/return-policy"
}

delete

您可以使用 returnpolicyonline.delete,在 returnPolicyId前刪除現有的線上退貨政策。如果要求成功,這個方法會傳回 200 代碼;如果要求發生錯誤,則會傳回 404 代碼。

DELETE https://shoppingcontent.googleapis.com/content/v2.1/merchantId/returnpolicyonline/returnPolicyId

以下是要求範例:

{
  "error": {
    "code": "404",
    "message": "Return policy not found.",
    "status": "NOT_FOUND",
    "details": [
      {
        "type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "notFound",
        "domain": "global"
      }
    ]
  }
}