# 設定 Google Shopping 評價任務

**API:** Data API

**Endpoint:** `POST /v1/beta/dataforseo/merchant/google/reviews/task_post`

**Tags:** DataForSEO

排入取得一個 Google Shopping 商品的評價，傳回任務 `id`。使用 `product_id` 以及商品結果中的 `gid` 或 `data_docid` 來識別商品。此系列全程非同步：提交會在 `tasks[0].id` 中回傳任務 `id`，擷取工具會在結果就緒後回傳結果。以 `get_dataforseo_merchant_google_reviews_fetch` 取得結果。

### 計費參考

- 計量方式：依回報的回應成本計量。
- 參考請求估算：0.012 美元。
- 參考客戶倍率：1.0。不得對已結算的客戶金額再次套用。

僅供參考的中繼資料，並非帳戶報價、保證價格或消費上限。資源額度並非 Felo 額度。最終費用依 Felo 計費記錄為準。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "gid": {
        "type": "string",
        "description": "Google Shopping 上的全域商品識別碼 必填欄位 為獲得最佳結果，建議將 gid 與 data_docid 和 product_id 一起指定； 可個別向 Google Shopping Products 端點發出請求，取得某個商品的此值 範例：4702526954592161872 有關此參數的更多資訊，請參閱這篇說明中心指南"
      },
      "product_id": {
        "type": "string",
        "description": "Google Shopping 上的唯一商品識別碼。選填欄位。建議將 product_id 與 data_docid 和 gid 一起指定，以獲得最佳結果；你可以個別向 Google Shopping Products 端點發出請求，取得某個商品的此值。範例：4485466949985702538 如需此參數的詳細資訊，請參閱這份說明中心指南。"
      },
      "data_docid": {
        "type": "string",
        "description": "SERP 資料元素的唯一識別碼 選填欄位 為獲得最佳結果，建議將 data_docid 與 product_id 和 gid 一起指定； 可個別向 Google Shopping Products 端點發出請求，取得某個元素的此值 範例：13071766526042404278"
      },
      "priority": {
        "type": "integer",
        "description": "任務優先順序。選填欄位。可採用下列值：1 – 一般執行優先順序（預設設定）；2 – 高執行優先順序。高執行優先順序的任務將額外收費。費用可在定價頁面計算。"
      },
      "location_name": {
        "type": "string",
        "description": "搜尋引擎地點全名 未指定 location_code 或 location_coordinate 時為必填欄位 如果使用此欄位，則無需指定 location_code 或 location_coordinate 可個別向 https://api.dataforseo.com/v3/merchant/google/locations 發出請求，取得可用地點及其 location_name 參數 範例：HA1,England,United Kingdom"
      },
      "location_code": {
        "type": "integer",
        "description": "搜尋引擎地點代碼 未指定 location_name 或 location_coordinate 時為必填欄位 如果使用此欄位，則無需指定 location_name 或 location_coordinate 可個別向 https://api.dataforseo.com/v3/merchant/google/locations 發出請求，取得可用地點及其 location_code 參數 範例：9045969"
      },
      "location_coordinate": {
        "type": "string",
        "description": "地點的 GPS 座標 未指定 location_name 或 location_code 時為必填欄位 如果使用此欄位，則無需指定 location_name 或 location_code location_coordinate 參數應採用 “latitude,longitude,radius” 格式 “latitude” 與 “longitude” 的最大小數位數：7 “radius” 的最小值：199.9 範例：53.476225,-2.243572,200"
      },
      "language_name": {
        "type": "string",
        "description": "搜尋引擎語言全名 未指定 language_code 時為必填欄位 如果使用此欄位，則無需指定 language_code 可個別向 https://api.dataforseo.com/v3/merchant/google/languages 發出請求，取得可用的語言及其 language_name 參數 範例：English (United Kingdom)"
      },
      "language_code": {
        "type": "string",
        "description": "搜尋引擎語言代碼 未指定 language_name 時為必填欄位 如果使用此欄位，則無需指定 language_name 可個別向 https://api.dataforseo.com/v3/merchant/google/languages 發出請求，取得可用的語言及其 language_code 參數 範例：en_GB"
      },
      "se_domain": {
        "type": "string",
        "description": "搜尋引擎網域。選填欄位。我們會根據你指定的地點與語言自動選擇相關的搜尋引擎網域；不過，你也可以在此欄位中設定自訂的搜尋引擎網域。範例：google.co.uk、google.com.au、google.de 等。"
      },
      "depth": {
        "type": "integer",
        "description": "解析深度 選填欄位 SERP 中的評論數量；我們強烈建議將解析深度設定為 10 的倍數，因為系統會連續處理 10 則評論；最大值：8000 預設值：10 你的帳戶將依每個最多包含 10 筆結果的 SERP 計費； 如果將深度設定為 10 以上，且搜尋引擎傳回超過 10 筆結果，可能會產生額外費用； 費用可在價格頁計算。"
      },
      "tag": {
        "type": "string",
        "description": "使用者自訂任務識別碼 選填欄位 字元數上限為 255 可使用此參數識別任務，並將其與結果對應 可在回應的 data 物件中找到指定的 tag 值"
      },
      "postback_url": {
        "type": "string",
        "description": "用於傳送任務結果的 URL 選填欄位 任務完成後，我們會將其結果以 gzip 格式壓縮，並向你指定的 postback_url 傳送 POST 請求 可將 ‘$id’ 字串用作 $id 變數，將 ‘$tag’ 用作經 URL 編碼的 $tag 變數。傳送請求前我們會設定必要的值。範例：http://your-server.com/postbackscript?id=$id http://your-server.com/postbackscript?id=$id&tag=$tag 注意：postback_url 中的特殊字元會進行 URL 編碼；例如，# 字元會編碼為 %23 詳情請參閱我們的說明中心"
      },
      "postback_data": {
        "type": "string",
        "description": "postback_url 資料類型 選填欄位 對應將傳送到你伺服器的資料類型 可能的值：advanced"
      },
      "pingback_url": {
        "type": "string",
        "description": "任務完成通知 URL 選填欄位 任務完成後，我們會向你指定的 URL 傳送 GET 請求進行通知 可將 ‘$id’ 字串用作 $id 變數，將 ‘$tag’ 用作經 URL 編碼的 $tag 變數。傳送請求前我們會設定必要的值。範例：http://your-server.com/pingscript?id=$id http://your-server.com/pingscript?id=$id&tag=$tag 注意：pingback_url 中的特殊字元會進行 URL 編碼；例如，# 字元會編碼為 %23 詳情請參閱我們的說明中心"
      }
    },
    "required": [
      "gid"
    ],
    "allOf": [
      {
        "anyOf": [
          {
            "required": [
              "location_name"
            ]
          },
          {
            "required": [
              "location_code"
            ]
          },
          {
            "required": [
              "location_coordinate"
            ]
          }
        ]
      },
      {
        "anyOf": [
          {
            "required": [
              "language_name"
            ]
          },
          {
            "required": [
              "language_code"
            ]
          }
        ]
      }
    ]
  }
}
```

## Responses

### 200 — 成功回應

Headers:
- `X-Request-Id` (string) — 聯絡 Felo 支援時需提供的請求識別碼。

**application/json**

Schema: object

```json
{
  "type": "object",
  "properties": {
    "version": {
      "type": "string",
      "description": "API 的目前版本"
    },
    "status_code": {
      "type": "integer",
      "description": "一般狀態碼 完整回應碼清單請見此處 注意：我們強烈建議設計必要的系統來處理相關的例外或錯誤情況"
    },
    "status_message": {
      "type": "string",
      "description": "一般資訊訊息 完整的一般資訊訊息清單請見此處"
    },
    "time": {
      "type": "string",
      "description": "執行時間，秒"
    },
    "cost": {
      "type": "number",
      "description": "任務總費用，美元"
    },
    "tasks_count": {
      "type": "integer",
      "description": "tasks 陣列中的任務數量"
    },
    "tasks_error": {
      "type": "integer",
      "description": "tasks 陣列中傳回錯誤的任務數"
    },
    "tasks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "任務陣列"
    },
    "tasks.id": {
      "type": "string",
      "description": "我們系統中任務的唯一識別碼，採用通用唯一識別碼（UUID）格式"
    },
    "tasks.status_code": {
      "type": "integer",
      "description": "由 DataForSEO 產生的任務狀態碼；可位於下列範圍：10000-60000"
    },
    "tasks.status_message": {
      "type": "string",
      "description": "任務的資訊性訊息"
    },
    "tasks.time": {
      "type": "string",
      "description": "執行時間，秒"
    },
    "tasks.cost": {
      "type": "number",
      "description": "任務費用，美元"
    },
    "tasks.result_count": {
      "type": "integer",
      "description": "result 陣列中的元素數"
    },
    "tasks.path": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "URL 路徑"
    },
    "tasks.data": {
      "type": "object",
      "description": "包含你在 POST 請求中指定的相同參數"
    },
    "tasks.result": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "結果陣列 此處該值將為 null"
    }
  }
}
```

### 400 — 無法處理該要求。請檢查請求參數。

### 401 — 需要有效的 Felo API 金鑰。

### 402 — 由於未符合計費要求，要求無法繼續。

### 403 — 該帳戶無權執行此操作。

### 429 — 已達到要求或支出上限。

### 502 — 服務無法完成該要求。

### 503 — API 或計費服務暫時無法使用。

### 504 — 服務在處理要求時逾時。

### default — 錯誤回應；上游透傳回應可能採用供應商格式

**application/json**

Schema:

```json
{}
```
