Apple Search Ads API Ad Group Bid

264 Views Asked by At

I'm trying to update ad group bids for a campaign.

Sending this data:

{"id": 12345, "campaignId": 6789, "name": "campaign", "defaultCPCBid": 
{"amount": "0.58", "currency": "USD"}}

Getting this response:

{"data":null,"pagination":null,"error":{"errors": 
[{"messageCode":"INVALID_ATTRIBUTE_TYPE","message":"Invalid 
field","field":"id"}, 
{"messageCode":"INVALID_ATTRIBUTE_TYPE","message":"Invalid 
field","field":"campaignId"}, 
{"messageCode":"INVALID_ATTRIBUTE_TYPE","message":"Invalid 
field","field":"defaultCPCBid"}]}}

Do you know what's the issue?

Note the path's and ids have been changed for confidentiality reasons.

Here's Everything Below:

Data Being Sent:

{"id": 12345, "campaignId": 6789, "name": "campaign", "defaultCPCBid": 
{"amount": "0.58", "currency": "USD"}}

CURL Command being sent to apple:
curl --verbose \
 -X PUT \
 -d @put.json \
 -H "Authorization: orgId=123456" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 --cert '/home/field1/field2/Certificates/name.pem' \
 --key  '/home/path1/path2/Certificates/name.key' \
 --pass deletedText \
 'https://api.searchads.apple.com/api/v1/campaigns/123456/adgroups/789
1

There are 1 best solutions below

0
On

Having looked at the apple search ads api reference: https://searchads.apple.com/v/advanced/help/b/docs/pdf/management-api.pdf

It appears that the issue is that those fields are not updatable. If you look for "Adgroup Fields" under "Adgroup object" in the api reference linked above you will find a table with a column of properties for each field, only certain fields have an "updateable" property (eg. name, status etc.). I imagine the only way to change the other fields is to create a new Adgroup and delete the old one.

Hope this helps someone.