Method: inventory.partners.feeds.record.batchPush

插入和/或更新指定動態饋給類型的記錄。請只執行基本驗證 (例如格式錯誤的要求),然後再立即將適當的回應傳回給合作夥伴。Google 會以非同步方式對要求執行商業邏輯驗證。這項批次呼叫不保證不可分割性。

HTTP 要求

POST https://mapsbooking.googleapis.com/v1alpha/inventory/{parent=partners/*/feeds/*}/record:batchPush

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
parent

string

資源名稱,格式為 - partners/{partner_id}/feeds/{feed_name}

要求主體

要求主體的資料會採用以下結構:

JSON 表示法
{
  "records": [
    {
      object (GenericRecord)
    }
  ]
}
欄位
records[]

object (GenericRecord)

要插入及/或更新的記錄。一個 API 呼叫中最多只能包含 1,000 筆記錄。

回應主體

如果成功,回應主體會是空白的。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/mapsbooking

GenericRecord

網址要求中提及的動態饋給類型記錄。

JSON 表示法
{
  "generationTimestamp": string,

  // Union field record_type can be only one of the following:
  "dataRecord": string,
  "protoRecord": {
    "@type": string,
    field1: ...,
    ...
  }
  // End of list of possible types for union field record_type.
}
欄位
generationTimestamp

string (Timestamp format)

必要欄位。時間戳記可以確保商品目錄更新內容的順序正確。

RFC3339 世界標準時間「Zulu」格式的時間戳記,採用奈秒解析度,且最多 9 個小數位數。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

聯集欄位 record_type。封裝不同類型的動態饋給 (ndjson、以 proto 為基礎的等)record_type 只能是下列其中一項:
dataRecord

string (bytes format)

適用於非 proto 的動態饋給。

Base64 編碼的字串。

protoRecord

object

適用於 proto 動態饋給。

包含任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。例如:{ "id": 1234, "@type": "types.example.com/standard/id" }.