sponsored_products Reports BUG #66
pengpengker
started this conversation in
General
Replies: 1 comment 1 reply
-
Check the help: https://python-amazon-ad-api.readthedocs.io/en/latest/sp/reports.html You are using wrong you need to pass your values as a dictionary: from ad_api.api.sp.reports import Reports file = open("ad_groups.json") record_type = 'adGroups' result = Reports().post_report( payload = result.payload While the dictionary should look like this: { |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
1-bug: reports.py-41 kwargs.pop('body') is error,Nofound body in kwargs.
2-bug: client.py-239 Content-type is incorrect, resulting in a return status of 400/422, params should not use the passed data.In general there are multiple errors here
sponsored_products Reports post_report
Not submitting the request with the Content-type will result 422/400 status_code。
To Reproduce
Steps to reproduce the behavior:
recordType="campaigns",
metrics='impressions',
reportDate="20220729"
)
Additional context
I'll submit new code when I'm done, if you're willing to accept。 grateful!
Beta Was this translation helpful? Give feedback.
All reactions