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)

適用於非原型設計動態饋給。

Base64 編碼字串。

protoRecord

object

適用於 proto 型動態饋給。

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