您应该使用 filtering 参数。似乎无法过滤 status 或 configured_status,但您应该改用 effective_status。
...&filtering=[{ "field": "effective_status","operator": "IN","value": ["ACTIVE" ]}]
例如,对于这个广告集:
<adset-id>/ads?fields=id,status,effective_status
有以下数据:
{
"data": [
{
"id": "<ad-id>",
"status": "ACTIVE",
"effective_status": "ACTIVE"
},
{
"id": "<ad-id>",
"status": "PAUSED",
"effective_status": "PAUSED"
},
{
"id": "<ad-id>",
"status": "PAUSED",
"effective_status": "PAUSED"
},
.....
}
您可以像这样应用过滤:
<adset-id>/ads?fields=id,status,effective_status&filtering=[{ "field": "effective_status","operator": "IN","value": ["ACTIVE" ]}]
将返回:
{
"data": [
{
"id": "<ad-id>",
"status": "ACTIVE",
"effective_status": "ACTIVE"
}
],
....
}