我已经设置了一个工具来查询 Apple Search Ads API,可以在此处找到其文档。可以将“groupBy”子句传递给请求,如下所示:
curl -X POST https://api.searchads.apple.com/api/v1/reports/campaigns \
-H 'Content-Type: application/json' \
-H 'Authorization: orgId=1056160' \
-E pem.pem --key key.key \
-d '{"selector": {"pagination": {"limit": 10, "offset": 0}, "orderBy": [{"sortOrder": "DESCENDING", "field": "campaignId"}]}, "returnRecordsWithNoMetrics": false, "granularity": "DAILY", "returnRowTotals": false, "timeZone": "UTC", "endTime": "2019-03-27", "startTime": "2019-02-27", "groupBy": "countryCode"}' \
| python -m json.tool
并期望返回按 . 分组的数据countryCode
。
但是,从 2019 年 4 月 23 日开始,API 开始返回错误:
{
"data": null,
"error": {
"errors": [
{
"field": "Line#:1 Column#:292",
"message": "This is an invalid request. At least one field format is not readable by the system.",
"messageCode": "INVALID_ATTRIBUTE_TYPE"
}
]
},
"pagination": null
}
我尝试在网上寻求帮助,但到目前为止还不够。任何帮助将不胜感激。