车辆广告 Merchant API 指南

本文简要介绍了适用于车辆广告的 Merchant API 规范和指南。设置 Merchant Center 账号后,您可以使用 Merchant API 上传数据源。

本页内容


迁移

如果您已在使用 Content API,现在要迁移到 Merchant API,请按照指南从 Content API for Shopping 迁移到 Merchant API 并迁移您的商品。


API 规范

注意:Merchant API 不再随您首次插入商品时自动注册“API”数据源。在 Merchant API 中,您需要先明确创建数据源,然后才能向其上传商品。这样,您就可以从一开始更好地控制商品数据流水线的组织和管理。

账号管理

有多个 Merhchant API 端点可以与 Merchant Center 高级账号结合使用:

如需查看端点的完整列表,请参阅账号 REST 资源页面。

创建新的 API 数据源

您可以使用 accounts.dataSources.create 方法创建新的 API 数据源。下表列出了在创建新的 API 数据源时需要添加的车辆广告专用字段和属性。

字段 说明 内容
目标平台 [included_destinations]

必需

要为此数据源添加的目标平台数组。如需指定此项,请在 dataSources 对象中将状态声明为已启用(对应于 Merchant Center 中选中的复选框)。

支持的值:
  • vehicle_ads
legacyLocal

必需

确定相应数据源的商品是否仅定位到本地目标平台。

车辆广告是明确的本地目标平台,因此必须进行此声明。

支持的值:
  • true

示例 JSON

以下示例 dataSource 对象可与 accounts.dataSources.create 方法搭配使用,以注册新的 Merchant API 数据源来提交车辆广告。
   "displayName": string,
   "primaryProductDataSource": {
     "legacyLocal": true,
     "feedLabel": string,
     "contentLanguage": string,
     "countries": [string],
     "destinations":[{
       "destination": "VEHICLE_ADS",
       "status": ENABLED
     }]

使用现有的 API 数据源

使用 accounts.dataSources.list 方法提取现有的 API dataSourceId。添加或修改车辆时,必须提供 dataSourceId。

上传商品信息

注意:
  • 价格值现在通过 amountMicros 提交。例如:“amountMicros": "1599000000" 相当于 1599 美元
  • 实体店代码必须在交车 [vehicle_fulfillment] 属性中提供。系统不会将其作为独立属性进行处理。
  • 如需查看完整的车辆广告字段列表,请参阅车辆广告数据源规范。此外,Merchant API 参考文档中还提供了有关如何使用 API 的更多信息。
  • 如需查看端点的完整列表,请参阅账号 REST 资源页面。
  • productInputs.insert 方法中列出了大多数标准字段(您可以使用异步请求或 HTTP 批处理在一次 HTTP 调用中发送多个请求)。
  • 商品输入及其子消息中的所有字段都与商品数据规范中相应属性的英文名称一致,但有一些例外情况。以下参考文档列出的字段名称采用 camelCase 大小写样式,而商品数据规范列出的名称采用 snake_case 大小写样式。

下表列出了需要使用 customAttributes 字段添加的车辆广告专用属性。

属性 说明 内容
交车 [vehicle_fulfillment]

必需

此组属性与 store_code 子属性一起使用,用于在实体店内履单。对于在线商品信息,不需要提供商店代码。了解详情。

支持的值:
  • in_store
  • 在线
针对每项商品信息,此属性最多可重复 3 次,方便经销商为每种履单类型指定一个选项。

车辆类别 [vehicle_category]

在日本,此属性为可选属性

车辆类别。此属性目前仅在日本使用。

Kei Jidosha:轻型车辆,发动机排量不超过 660 毫升

Futsu sha:中型车辆,发动机排量为 660-2,000 毫升,以及未归类为 Kei Jidosha 或 Ogata Sha 的其他车辆

Ogata sha:大型车辆,发动机排量

支持的值

  • kei_jidosha
  • futsu_sha
  • ogata_sha
车辆选项 [vehicle_option]

可选

以英文逗号分隔的已安装选项列表。

(例如:真皮座椅, 后视摄像头, 导航系统, 前座加热器, 空调, 天窗, 蓝牙)

字符串
最多支持 200 个值。每个值最多可包含 256 个字符。
此字段是重复字段,可包含多个值。

示例 JSON

如需查看完整的字段列表,请参阅车辆广告数据源规范和 Merchant API 参考文档。
{ 
    "id": string, 
    "offerId": string, 
    "googleProductCategory": string, 
    "title": string, 
    "description": string, 
    "channel": "local", 
    "includedDestinations": ["VEHICLE_ADS"],
    "price": {
      "amountMicros": string,
      "currency": string
    }, 
    "brand": string, 
    "color": string, 
    "condition": string, 
    "imageLink": string, 
    "contentLanguage": string, 
    "targetCountry": string, 
    "vin" = string
    "model" = string
    "trim" = string
    "bodyStyle" = enum
    "year" = string
    "mileage" = {
      "value" = string
      "unit" = string
    },
     "customAttributes": [
  {
      “name”: “vehicle_fulfillment”,
      “groupValues”: [{
        “name”: “option”,
        “value”: string
      }]
 
... 
 } 
us": ENABLED
     }]
本页面可能包含使用 AI 技术翻译的内容。AI 翻译未必准确无误。
搜索
清除搜索内容
关闭搜索框
主菜单
6305289923960280890
true
搜索支持中心
true
true
true
true
true
true
73067
false
false
true
true
false
false
⌂ 换网址