amzn / ads-advanced-tools-docs

Code samples and supplements for the Amazon Ads advanced tools center
https://advertising.amazon.com/API/docs/en-us/index
MIT No Attribution
88 stars 33 forks source link

在获取sp广告活动中获取extendedData对象 #137

Closed 936447225 closed 1 year ago

936447225 commented 1 year ago

curl --location --request POST 'https://advertising-api.amazon.com/sp/campaigns/list' \ --header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.20dxxxxxxx' \ --header 'Authorization: Atxxxxxxx91zr' \ --header 'Amazon-Advertising-API-Scope: 7128xxxxxxx' \ --header 'Content-Type: application/vnd.spCampaign.v3+json' \ --header 'Accept: application/vnd.spCampaign.v3+json' \ --data-raw '{ "campaignIdFilter" : { "include": ["1268xxxxx"] } }' 我通过这个接口的调用并没有返回extendedData 字段的值,我观测到sd目前有/extended这样的接口能拿到,那么sp类型的该如何获取呢?我非常需要这个字段里的值

elizafarley commented 1 year ago

To get extended data fields in the response, add "includeExtendedDataFields" : true in the request body.

curl --location 'https://advertising-api.amazon.com/sp/campaigns/list' \
--header 'Amazon-Advertising-API-ClientId: amzn1.application-oa2-client.xxxxxxx' \
--header 'Authorization: Bearer xxxxxxx' \
--header 'Amazon-Advertising-API-Scope: xxxxxxx' \
--header 'Accept: application/vnd.spCampaign.v3+json' \
--header 'Content-Type: application/vnd.spCampaign.v3+json' \
--data '{
  "includeExtendedDataFields": true
}'