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 呼叫最多可有 1000 筆記錄。

回應主體

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

授權範圍

需要下列 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)

必填。這個時間戳記用於確保商品目錄更新的順序正確。

使用 RFC 3339,產生的輸出內容一律會經過 Z 正規化,並使用 0、3、6 或 9 個小數位數,也接受「Z」以外的偏移量。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

聯集欄位 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" }