Pinterest API:在 entity_fields 参数中传递多个值

Pinterest API: pass multiple values in entity_fields parameter

使用此 Pinterest 分析 API:

/ads/v3/reports/async/{advertiser}/delivery_metrics/

当entity_fields参数是单个值时我成功了 像这样:

https://api.pinterest.com/ads/v3/reports/async/<advertiserId>/delivery_metrics/?start_date=2021-04-04&end_date=2021-04-05&level=PIN_PROMOTION&entity_fields=AD_GROUP_ID

不过我还需要 CAMPAIGN_ID,但是当我尝试在 entity_fields 参数中包含多个值时,我收到了错误的请求。我尝试了几种形式,但都失败了:

entity_fields=CAMPAIGN_ID&entity_fields=AD_GROUP_ID
entity_fields=CAMPAIGN_ID AD_GROUP_ID
entity_fields="CAMPAIGN_ID AD_GROUP_ID"

这是一个错误示例,尽管错误的确切语法取决于我尝试参数化的方式 entity_fields:

{"code":1,"data":null,"endpoint_name":"ads_v3_create_advertiser_delivery_metrics_report","error":{"message":"Parameter 'entity_fields' (value CAMPAIGN_ID AD_GROUP_ID) is not one of PRODUCT_GROUP_ID, PIN_PROMOTION_ID, PIN_PROMOTION_NAME, PIN_PROMOTION_STATUS, AD_GROUP_ID, AD_GROUP_NAME, AD_GROUP_STATUS, CAMPAIGN_ID, CAMPAIGN_NAME, CAMPAIGN_STATUS, CAMPAIGN_MANAGED_STATUS. "},"message":"Invalid parameters.","message_detail":"Parameter 'entity_fields' (value CAMPAIGN_ID AD_GROUP_ID) is not one of PRODUCT_GROUP_ID, PIN_PROMOTION_ID, PIN_PROMOTION_NAME, PIN_PROMOTION_STATUS, AD_GROUP_ID, AD_GROUP_NAME, AD_GROUP_STATUS, CAMPAIGN_ID, CAMPAIGN_NAME, CAMPAIGN_STATUS, CAMPAIGN_MANAGED_STATUS. ","status":"failure"}

Pinterest api 服务器如何期望 entity_fields 参数被格式化?在此先感谢您的任何见解。

很抱歉回答我自己的问题,但我收到了 pinterest 支持人员的回复。要在entity_fields参数中传递多个字段名,用逗号分隔:

https://api.pinterest.com/ads/v3/reports/async/<advertiserId>/delivery_metrics/?start_date=2021-04-04&end_date=2021-04-05&level=PIN_PROMOTION&entity_fields=AD_GROUP_ID,CAMPAIGN_ID