I am required to change some data in a campaign using the apple search ads API which I haven't used before. I have managed to generate a token and do a get request for the data but when I make a put request the response received is an response[400]. The code im using is as follows:
import jwt
import json
import requests
headers={'Authorization': f'Bearer{"access token",
'X-AP-Context': f'orgId={orgId}',
}
payload = {"dailyBudgetAmount":{"amount": "300"}}
payload = json.dumps(payload, indent=1)
requests.put('https://api.searchads.apple.com/api/v4/campaigns/campaignId',json_data = payload, headers=headers)