Api 苹果搜索广告返回错误,而;groupBy“;条款
我已经设置了一个工具来查询苹果搜索广告API,可以找到它的文档。 可以向请求传递“groupBy”子句,如下所示:Api 苹果搜索广告返回错误,而;groupBy“;条款,api,curl,apple-search-ads,Api,Curl,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":
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
}
我试着在网上寻求帮助,但到目前为止还不够。
任何帮助都将不胜感激。您将使用哪种报告端点 报告/活动 如果是活动端点,请尝试以下有效负载:
{
"startTime": "2019-02-27",
"endTime": "2019-03-27",
"granularity": "DAILY",
"selector": {
"orderBy": [
{
"field": "campaignId",
"sortOrder": "DESCENDING"
}
],
"conditions": [
],
"pagination": {
"offset": 0,
"limit": 10
}
},
"groupBy": [
"countryCode"
],
"timeZone": "UTC",
"returnRecordsWithNoMetrics": false,
"returnRowTotals": false,
"returnGrandTotals": false
}
您正在访问哪个报告端点 报告/活动 如果是活动端点,请尝试以下有效负载:
{
"startTime": "2019-02-27",
"endTime": "2019-03-27",
"granularity": "DAILY",
"selector": {
"orderBy": [
{
"field": "campaignId",
"sortOrder": "DESCENDING"
}
],
"conditions": [
],
"pagination": {
"offset": 0,
"limit": 10
}
},
"groupBy": [
"countryCode"
],
"timeZone": "UTC",
"returnRecordsWithNoMetrics": false,
"returnRowTotals": false,
"returnGrandTotals": false
}
@mastersifu将
groupBy
子句作为数组而不是字符串添加,成功了。谢谢@mastersifu将groupBy
子句作为数组而不是字符串添加,成功了。谢谢