调用Google Merchant API报错:ProductPerformanceView表名无效
问题分析与解决
你的请求报错核心原因是查询语句里的表名ProductPerformanceView无效,Google Merchant API Reports v1beta版本不支持这个名称的视图。
正确的产品性能统计视图名称是product_performance(采用蛇形小写命名规则,而非驼峰+View后缀)。
修正后的curl请求代码如下:
curl -X POST \ 'https://merchantapi.googleapis.com/reports/v1beta/accounts/{merchantId}/reports:search' \ -H 'Authorization: Bearer $token' \ -H 'Content-Type: application/json' \ -d '{ "query" : "SELECT marketingMethod, offerId, impressions, clicks, clickThroughRate FROM product_performance WHERE date BETWEEN '\''2024-09-01'\'' AND '\''2024-09-30'\''" }'
API支持的报告视图均采用蛇形小写命名,无View后缀,可通过官方文档确认所有有效视图名称。
内容的提问来源于stack exchange,提问作者Developer
相关产品推荐
相关产品推荐

