Posts

Post not yet marked as solved
1 Replies
1.1k Views
I am using Apple search ads API for accessing data out of Apple Ads. But lately, it is giving me error while making the below API call which gives error message "This is an invalid request. At least one field format is not readable by the system.":API_URL = "https://api.searchads.apple.com/api/v2/reports/campaigns" params = {"startTime": startdate.strftime("%Y-%m-%d"), "endTime": enddate.strftime("%Y-%m-%d"), "selector": { "orderBy": [{"field": "impressions", "sortOrder": "DESCENDING"}], "fields": ["campaignId", "campaignName", "servingStatus", "appName", "STOREFRONT"], "pagination": {"offset": 0, "limit": 100} }, "granularity": "DAILY" } resp = requests.post(API_URL, cert=('ThePEMKey.pem', 'TheKey.key'), json=json.dumps(params)And after printing the response content I am getting the following details:b'{"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#:1"}]}}'I have gone through various documents but was unable to resolve the issue. Could anyone please help me with this?
Posted
by sameer-k.
Last updated
.