Method: customers.uploadCallConversions

处理指定的来电转化。

抛出的错误列表:AuthenticationError AuthorizationError HeaderError InternalError PartialFailureError QuotaError RequestError

HTTP 请求

POST https://googleads.googleapis.com/v16/customers/{customerId}:uploadCallConversions

网址采用 gRPC 转码语法。

路径参数

参数
customerId

string

必需。执行上传的客户的 ID。

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "conversions": [
    {
      object (CallConversion)
    }
  ],
  "partialFailure": boolean,
  "validateOnly": boolean
}
字段
conversions[]

object (CallConversion)

必需。将上传的转化数据。

partialFailure

boolean

必需。如果为 true,将执行成功的操作,而无效操作将返回错误。如果为 false,当且仅当所有操作均有效时,所有操作都将在一个事务中执行。此字段始终都应设为 true。如需详细了解部分失败,请参阅 https://developers.google.com/google-ads/api/docs/best-practices/partial-failures

validateOnly

boolean

如果为 true,则会验证该请求,但不会执行该请求。系统只会返回错误,不会返回结果。

响应正文

ConversionUploadService.UploadCallConversions 的响应消息。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "partialFailureError": {
    object (Status)
  },
  "results": [
    {
      object (CallConversionResult)
    }
  ]
}
字段
partialFailureError

object (Status)

与部分失败模式下的转化失败相关的错误。当所有错误都发生在转化内时,系统会返回此错误代码。如果转化之外发生任何错误(例如身份验证错误),我们会返回 RPC 级错误。如需详细了解部分失败,请参阅 https://developers.google.com/google-ads/api/docs/best-practices/partial-failures

results[]

object (CallConversionResult)

针对成功处理的转化返回。对于收到错误的行,Proto 将为空。当 verifyOnly 为 true 时,不返回结果。

授权范围

需要以下 OAuth 作用域:

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

有关详情,请参阅 OAuth 2.0 概览

CallConversion

来电转化。

JSON 表示法
{
  "customVariables": [
    {
      object (CustomVariable)
    }
  ],
  "consent": {
    object (Consent)
  },
  "callerId": string,
  "callStartDateTime": string,
  "conversionAction": string,
  "conversionDateTime": string,
  "conversionValue": number,
  "currencyCode": string
}
字段
customVariables[]

object (CustomVariable)

与此转化相关联的自定义变量。

consent

object (Consent)

事件的用户意见征求设置。

callerId

string

拨出此电话的来电显示。来电显示应采用 E.164 格式,且前面带有“+”符号,例如“+16502531234”。

callStartDateTime

string

来电发生的日期和时间。必须指定时区。格式为“yyyy-mm-dd hh:mm:ss+|-hh:mm”,例如“2019-01-01 12:32:45-08:00”。

conversionAction

string

与此转化相关联的转化操作的资源名称。注意:虽然此资源名称由客户 ID 和转化操作 ID 组成,但验证过程会忽略客户 ID,并将转化操作 ID 用作转化操作的唯一标识符。

conversionDateTime

string

转化发生的日期和时间。必须晚于通话时间。必须指定时区。格式为“yyyy-mm-dd hh:mm:ss+|-hh:mm”,例如“2019-01-01 12:32:45-08:00”。

conversionValue

number

广告客户的转化价值。

currencyCode

string

与转化价值相关联的币种。这是由 3 个字符组成的 ISO 4217 货币代码。例如:USD、EUR。

CallConversionResult

成功处理的 CallConversionUpload 的标识信息。

JSON 表示法
{
  "callerId": string,
  "callStartDateTime": string,
  "conversionAction": string,
  "conversionDateTime": string
}
字段
callerId

string

拨出此电话的来电显示。来电显示应采用 E.164 格式,且前面带有“+”符号。

callStartDateTime

string

来电发生的日期和时间。格式为“yyyy-mm-dd hh:mm:ss+|-hh:mm”,例如“2019-01-01 12:32:45-08:00”。

conversionAction

string

与此转化相关联的转化操作的资源名称。

conversionDateTime

string

转化发生的日期和时间。格式为“yyyy-mm-dd hh:mm:ss+|-hh:mm”,例如“2019-01-01 12:32:45-08:00”。