2017-03-17 51 views
0

我正在嘗試通過Apple Search Ads API創建廣告系列。所以我用如何通過Apple Search Ads API創建廣告系列

curl -X POST https://api.searchads.apple.com/api/v1/campaigns \ 
--cert path/XXXX.p12 \ 
--pass **** \ 
-H "Authorization: orgId=xxxx" \ 
-d '{"budgetAmount":{"currency":"USD","amount": 50.0},"name": "weixinCampagin", "adamId":"414478124","adGroups": [{"name": "weixinCampaginAdGroup","startTime":"2017-03-17 00:00:00","defaultCpcBid": {"amount": 1,"currency":"USD"},"storeFronts": ["US"]}]}' 

我得到了以下錯誤消息:

{"data":null,"pagination":null,"error":{"errors":[{"messageCode":"INVALID_ATTRIBUTE_TYPE","message":"This is an invalid request. At least one field format is not readable by the system.","field":"Line#:1 Column#:50"}]}} 

我已經通過不同的方式嘗試了很多次,但仍然沒有工作。有沒有聰明的人可以幫助我?

在此先感謝!

回答

0

我想你需要指定你發送一個json對象。

curl \ 
--cert ./<FILENAME>.p12 \ 
--pass <PASSWORD> \ 
-H "Authorization: orgId=<ORG_ID>" \ 
-H "Content-Type: application/json" \ 
-d "<CAMPAIGN_DATA_FILE>.json" \ 
-X POST "https://api.searchads.apple.com/api/v1/campaigns" 
相關問題